Create a label (or grow an existing one) with member events in one call
POST
/v1/insights/labels/assign
const url = 'https://api.monita.ai/v1/insights/labels/assign';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"label":"example","color":"example","kind":"event","members":[{"vendor":"example","event":"example"}]}'};
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.monita.ai/v1/insights/labels/assign \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "label": "example", "color": "example", "kind": "event", "members": [ { "vendor": "example", "event": "example" } ] }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
label
required
string
color
string
kind
string
members
required
Array<object>
object
vendor
required
string
event
required
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
ok
required
boolean
assigned
required
number
Examplegenerated
{ "ok": true, "assigned": 1}