Before you start, ensure you read Properties: Actions to see supported Actions
and to get started.
Base Request
curl --location --request POST 'https://sux.chatsight.ai/api/properties/actions' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"action":{
"property_id":<PROPERTY_ID>,
"command":<ACTION>,
"operation":<OPERATION>,
"target":["user_a","user_b"],
"value": ["1010403320176840745"]
}
}'
Key | Type | Description |
---|---|---|
action.property_id | String | The property ID. |
action.command | String | The name of the Action to perform, like Ban or Roles . |
action.operation | String | One of: - add - remove This is context specific to the action. For roles, it might mean adding or removing a role. |
action.target | Array of String | An array of users to apply this action onto, if the action requires targets. |
action.value | Array of String|Number | An array of items to apply this action onto, if the action requires items. For example this array would contain the roles to assign end users when used with the role Action . |
Example Action: Roles
curl --location --request POST 'https://sux.chatsight.ai/api/properties/actions' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"action":{
"property_id":"D#1234",
"command":"roles",
"operation":"remove",
"target":["905482338006360074","090102565737829589"],
"value": ["1010403320176840745"]
}
}'