Skip to main content
PUT
/
users
/
{userId}
/
category-action-triggers
Register category triggers at user scope
curl --request PUT \
  --url https://east.sandbox.spade.com/users/{userId}/category-action-triggers \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "categoryTriggers": [
    {
      "id": "<string>",
      "categoryId": "<string>",
      "action": {
        "type": "<string>"
      }
    }
  ]
}
'
{
  "version": 123,
  "categoryTriggers": [
    {
      "id": "<string>",
      "categoryId": "<string>",
      "action": {}
    }
  ],
  "totalCount": 123
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

userId
string
required

Your unique identifier for the user

Maximum string length: 512

Body

application/json

Request body for registering category action triggers.

categoryTriggers
object[]
required

List of category triggers to register for action matching. Each trigger must have a unique id.

Field requirements:

  • id, categoryId, and action are always required

Limit: A maximum of 300 triggers across all scopes. All registrations are processed synchronously.

Required array length: 1 - 300 elements

Response

Registration created successfully

Response containing the status of a category action trigger registration.

status
enum<string>

The current status of the action trigger registration. Category trigger registrations are processed synchronously, so the status is always one of:

  • succeeded: Registration complete, triggers are now active
  • failed: Registration failed, check your request and retry
Available options:
succeeded,
failed
Example:

"succeeded"

version
integer

The version number of this registration. Increments with each PUT, PATCH, or DELETE request to this scope.

Example:

1

categoryTriggers
object[]

The list of active category triggers registered for this scope. Present on GET responses; omitted on PUT and PATCH responses.

totalCount
integer

The total number of active category triggers registered for this scope. Present on GET responses; omitted on PUT and PATCH responses.

Example:

10