curl --request PUT \
--url 'https://api.workstream.stateset.com/v1/brands/{brand_id}/workflow-bindings/{workflow_type}' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"workflow_type": "string",
"template_key": "string",
"template_version": 1,
"task_queue": "string",
"binding_config": {},
"priority": 100,
"enabled": true,
"metadata": {}
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workflow_type": "string",
"template_key": "string",
"template_version": 1,
"task_queue": "string",
"binding_config": {},
"priority": 1,
"enabled": true,
"metadata": {},
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
Upsert workflow binding
Create or update the brand’s binding for . Upserts on (brand_id, workflow_type, template_key, template_version)…
PUT
/
v1
/
brands
/
{brand_id}
/
workflow-bindings
/
{workflow_type}
curl --request PUT \
--url 'https://api.workstream.stateset.com/v1/brands/{brand_id}/workflow-bindings/{workflow_type}' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"workflow_type": "string",
"template_key": "string",
"template_version": 1,
"task_queue": "string",
"binding_config": {},
"priority": 100,
"enabled": true,
"metadata": {}
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workflow_type": "string",
"template_key": "string",
"template_version": 1,
"task_queue": "string",
"binding_config": {},
"priority": 1,
"enabled": true,
"metadata": {},
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
Create or update the brand’s binding for {workflow_type}. Upserts on (brand_id, workflow_type, template_key, template_version).
Because template_key is part of that key, writing a DIFFERENT template_key for a workflow_type the brand already has would create a SECOND row — an ambiguity the dispatch read path refuses to arbitrate (it skips the auto-trigger entirely when more than one enabled row matches). Such a write returns 409 WORKFLOW_BINDING_TEMPLATE_CONFLICT naming the conflicting template_key, unless
?replace=true is passed, which deletes the other-template_key rows in the same transaction. DELETE followed by PUT is the equivalent explicit path.
For workflow_type payment-recovery with enabled: true, binding_config.connector_key_mail is required and must be a non-blank string — without it the Stripe auto-trigger cannot send and would silently skip every event (400 otherwise).
NOTE: PATCH /v1/brands/{brand_id} with a workflow_bindings array delete-and-reinserts ALL bindings for the brand and will clobber rows created here.
Path parameters
Query parameters
Delete the brand’s existing bindings for this workflow_type under a DIFFERENT template_key, in the same transaction. Without it such a write is a 409 (see the endpoint description).
Request body
WorkflowBindingWrite
Deterministic config for the bound workflow. May hold connector KEYS, never secrets. For an enabled payment-recovery binding, connector_key_mail is required and must be non-blank.
Response
WorkflowBindingRecord
Status codes
| Code | Meaning |
|---|---|
200 | Success |
400 | Validation error |
401 | Unauthorized |
404 | Not found |
409 | WORKFLOW_BINDING_TEMPLATE_CONFLICT — the brand already has a binding for this workflow_type under a different template_key. Retry with ?replace=true, or DELETE the existing binding first. |
429 | Rate limited |
500 | Internal error |
curl --request PUT \
--url 'https://api.workstream.stateset.com/v1/brands/{brand_id}/workflow-bindings/{workflow_type}' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"workflow_type": "string",
"template_key": "string",
"template_version": 1,
"task_queue": "string",
"binding_config": {},
"priority": 100,
"enabled": true,
"metadata": {}
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workflow_type": "string",
"template_key": "string",
"template_version": 1,
"task_queue": "string",
"binding_config": {},
"priority": 1,
"enabled": true,
"metadata": {},
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
Last modified on August 31, 2026