---
title: "Incremental category trigger operations at account scope"
method: PATCH
path: "/category-action-triggers"
tags: ["Category Action Triggers"]
---

# Incremental category trigger operations at account scope

`PATCH /category-action-triggers`

Perform incremental operations on category action triggers at the account scope.

Supports two operations:
- **add**: Register new category triggers or update existing ones. Only the submitted triggers are affected—existing registrations are preserved. If a trigger ID already exists, its registration is replaced (upsert). All registrations are processed synchronously.
- **remove**: Remove category triggers by trigger ID. Removed triggers are excluded from enrichment lookups. Trigger IDs that are not currently active are silently ignored (idempotent).

Successful `add` operations return `201`; successful `remove` operations return `200`.

**Limit:** The total number of active triggers at a scope cannot exceed 300. An `add` operation that would push the total past this limit will receive a `400` error.

**Important:** Only one operation can be in progress per scope at a time. Concurrent requests return 409.

To learn more about action triggers, please read the [Category Action Triggers Guide](https://docs.spade.com/reference/category-action-triggers-guide).

## Request body

- CategoryActionTriggerPatchRequest — Request body for incremental category action trigger operations. - For `add`: `categoryTriggers` is required. `triggerIds` is optional and ignored if provided. - For `remove`: `triggerIds` is required and must be a non-empty list.
  - `operation` 'add' | 'remove', required — The operation to perform: - `add`: Register new category triggers or update existing ones - `remove`: Remove category triggers (excluded from enrichment lookups)
  - `categoryTriggers` CategoryTriggerItem[] — List of category triggers to add. Required for the `add` operation. If a trigger ID already exists, the old registration is replaced (upsert behavior). **Field requirements:** - `id`, `categoryId`, and `action` are always required
    - `id` string, required — Your identifier for this trigger, unique within the scope you are registering against. This ID will be returned in the `actions` field of enrichment responses when this trigger matches a transaction.
    - `categoryId` string, required — The Spade category ID to match against. Category IDs use the format `xxx-xxx-xxx-xxx` where each `x` is a digit — use [`GET /categories`](https://docs.spade.com/api-reference/category-personalization/get-all-default-and-custom-integration-level-categories) to discover valid IDs.
    - `action` object, required — A custom JSON object that will be returned in the enrichment response when this trigger matches. Use this to store any data relevant to your use case (e.g., reward amounts, offer IDs, campaign metadata). The optional `type` field has reserved values with special behavior: - `BLOCK`: Adds `authRecommendation: "BLOCK"` to the action in the enrichment response. Use this to flag transactions that should be declined. - `ALLOW_ONLY`: Adds `authRecommendation: "ALLOW"` when the transaction matches a registered category. If the transaction does **not** match any `ALLOW_ONLY` trigger, the action is returned with `authRecommendation: "BLOCK"` (inverse semantics). Use this to create allowlists where only registered categories are permitted. - `REWARD`: No special behavior. Passed through as-is. - Any other value: Treated as a custom type and passed through as-is.
      - `type` string — Optional action type. Reserved values `BLOCK` and `ALLOW_ONLY` have special authorization semantics (see above). All other values are passed through without modification.
  - `triggerIds` string[], nullable — List of trigger IDs to remove. Required and must be non-empty for the `remove` operation. Trigger IDs that are not currently active are silently ignored (idempotent). For `add` operations, this field is optional and ignored if provided — you may pass `null`, `[]`, or omit it entirely.

## Response `200`

Remove operation completed successfully

- ActionTriggerPatchResponse — Response for the remove PATCH operation.
  - `status` 'succeeded'
  - `version` integer — The version number of this operation.

## Other responses

- `201` — Add operation completed successfully
- `400` — Invalid input
- `403` — Unauthorized
- `409` — A registration is already in progress for this scope
- `500` — Unexpected Error

---

[API](https://skmtc.net/spade/apis/spade-api.md) · [All operations](https://skmtc.net/spade/apis/spade-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spade/spade-api/versions/a37c626f84de/schema)
