This guide covers category action triggers. For an overview of all trigger types, see the Action triggers guide. For merchant action triggers, see the Merchant action triggers guide.
Overview
Category action triggers let you register rules that fire custom actions when transactions are enriched into specific Spade categories. Triggers match on Spade’s category taxonomy rather than individual merchants, so a single trigger can cover every merchant in a category — to target specific merchants instead, see merchant action triggers. Common use cases:- Category-based rewards: 3x points on all Travel transactions
- Spending controls: Block all Gambling transactions
- Category allowlists: Only allow transactions in approved categories (e.g., Fuel, Office Supplies)
Quick Start
- Discover categories — Call
GET /categoriesto get the list of available category IDs - Register triggers — Use the PUT endpoint with your category trigger configuration
- Enrich transactions — Matched triggers appear in the
actionsfield of the enrichment response - (Optional) Update triggers incrementally — Use the PATCH endpoint to add or remove individual triggers without re-registering the full list
Discovering categories
Use theGET /categories endpoint to retrieve the full list of Spade categories. Each category has an id that you’ll use as the categoryId when registering triggers.
id value as the categoryId in your trigger registrations.
Registration Scopes
Category action triggers can be registered at four scopes. See the Action triggers guide for how scope inheritance works.| Scope | Endpoint | Limit |
|---|---|---|
| Account | /category-action-triggers | 300 triggers |
| Program | /programs/{programId}/category-action-triggers | 300 triggers |
| User | /users/{userId}/category-action-triggers | 300 triggers |
| Card | /users/{userId}/cards/{cardId}/category-action-triggers | 300 triggers |
succeeded immediately upon a successful request.
Registering category action triggers
Use the PUT endpoint to register category action triggers.Request body
Each trigger requires:id— Your unique identifier for this trigger (max 512 characters)categoryId— A valid Spade category ID (useGET /categoriesto discover valid IDs)action— Your custom action data (same semantics as merchant triggers)
You do not need to provide a
categoryName — it is resolved from the system during enrichment and returned in the response.Example: REWARD trigger on Travel
Example: BLOCK trigger on Gambling
Response
Checking Registration Status
Use the GET endpoint to check the status of your category action trigger registration.Status Values
| Status | Description |
|---|---|
succeeded | Registration complete, triggers are now active |
failed | Registration failed, check your request and retry |
succeeded or failed immediately after a PUT or PATCH request.
Example: Check Status
Response
Updating Triggers
Use the PATCH endpoint to incrementally add or remove triggers without replacing the entire list.Adding triggers
Useoperation: "add" with categoryTriggers to register new triggers or update existing ones. If a trigger ID already exists, its registration is replaced (upsert behavior).
Removing triggers
Useoperation: "remove" with triggerIds to deactivate triggers. Trigger IDs that are not currently active are silently ignored (idempotent).
Clearing Triggers
Use the DELETE endpoint to clear all category triggers at a given scope.DELETE creates a new version with an empty trigger list. The version number is incremented, not reset.
Example: Clear Account-Scoped Triggers
ALLOW_ONLY Inverse Semantics
When category triggers useALLOW_ONLY, the behavior inverts for non-matching transactions:
- Transaction in a registered category:
authRecommendation: "ALLOW" - Transaction in any other category:
authRecommendation: "BLOCK",source: null
Example: Allow only Fuel and Office Supplies
Receiving Triggered Actions
When a transaction matches a category trigger, the enrichment response includes the trigger in theactions array with type: "category_trigger". Category triggers include additional categoryId and categoryName fields.
Example: Enrichment Response with Category Trigger
Example: Both Merchant and Category Triggers
When a transaction matches both merchant and category triggers, all matched triggers appear in theactions array:
The
actions field is null when no triggers match, and is omitted entirely if your account does not have the actions feature enabled.Best Practices
Unique Trigger IDs
Trigger IDs must be unique within each scope. A scope is defined by the URL path you register against (account, program, user, or card level).- Within a single request: All trigger IDs must be unique. Duplicate IDs in the same request will return a
400error. - Across requests in the same scope: Submitting a trigger with an ID that already exists in that scope will replace the previous registration (upsert). This applies to both
PUT(full replacement) andPATCH addoperations. - Across different scopes: The same trigger ID can be used independently in different scopes without conflict.
Action Structure
Design youraction schema upfront. This is your custom data — use it to store reward amounts, offer IDs, or any information you need when processing matched transactions.
The type field is required. Reserved keywords (BLOCK, ALLOW_ONLY) have special authorization behavior. REWARD and all other values are passed through as-is.
Scope Selection
- Use account scope for triggers that apply to all users (e.g., company-wide category restrictions)
- Use program scope for triggers scoped to a specific program (e.g., different reward tiers per card product)
- Use user scope for user-specific preferences
- Use card scope for card-specific rules (e.g., a dedicated rewards card with higher multipliers)
Choosing PUT vs. PATCH
- Use PUT when replacing your full set of triggers (e.g., initial setup or a periodic full sync)
- Use PATCH when adding or removing a small number of triggers relative to your total list
Error Handling
- Implement retry logic for 5xx errors
- Handle 409 Conflict by waiting for the in-progress registration to complete
- Validate your trigger data before submission to avoid 400 errors

