Post Events
POST
/v1/events
const url = 'https://api.cloud.agentums.ru/v1/events';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"events":[{"event":"example","props":{}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.cloud.agentums.ru/v1/events \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "events": [ { "event": "example", "props": {} } ] }'Записать батч продуктовых событий. Незнакомые события отбрасываются (белый список).
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
EventsBatch
object
events
Events
Array<object>
EventInobject
event
required
Event
string
props
Props
object
key
additional properties
any
Examplegenerated
{ "events": [ { "event": "example", "props": {} } ]}Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
EventsAck
object
recorded
required
Recorded
integer
Examplegenerated
{ "recorded": 1}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}