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"]
    }
}'
KeyTypeDescription
action.property_idStringThe property ID.
action.commandStringThe name of the Action to perform, like Ban or Roles.
action.operationStringOne of:
- add
- remove

This is context specific to the action. For roles, it might mean adding or removing a role.
action.targetArray of StringAn array of users to apply this action onto, if the action requires targets.
action.valueArray of String|NumberAn 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"]
    }
}'