Skip to content
concord.app
Book a demo
esc
concord.app
Book a demo

API reference

Workflows. 19 operations.

The Workflows operations of the concord.app REST API, each with its parameters, body fields and responses.

Workflows — automation rules, custom events and escalation chains.

Every path is on https://app.concord.app.

POST/api/v1/workflows/analyze-impact

Analyze workflow rule impact

Analyzes the historical impact a workflow rule change would have had.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
conditions object, or null Money inside it (a deal-value bound, or a value compared with or written to a money field: the contract value or a contract-term amount) is an integer count of the currency's smallest step (e.g. 100050 = 1,000.50), never a float; a value on any other field keeps its own unit.
event_type
required
string
resource_type
required
one of "agreement", "task"

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/workflows/custom-events

List custom and built-in event types

Returns the event types this organization can emit and trigger on: its own enabled custom event definitions (event type, category, payload schema, retention) and, unless includeBuiltins is false, the fixed list of built-in business event types. Definitions only — no emitted events are returned, and the response is not paginated.

Parameters

NameInTypeDescription
include_builtins query boolean

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/workflows/custom-events/emit

Emit a custom workflow event

Validates the payload against the JSON schema registered for this event type, then appends a workflow.custom_event_emitted record to the organization's append-only event ledger; an unregistered or disabled event type is rejected with 400, and a payload over 64 KB is recorded by size only, without its body. Agent event triggers bound to workflow.custom_event_emitted fire, and composite workflow triggers that match are recorded as fired — no workflow rule action runs as a direct result, and outbound API webhooks are not delivered for this event type.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
event_type
required
string
payload
required
object
resource_type string
resource_id string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/workflows/custom-events/register

Register a custom event type

Adds an event type to the organization's custom event taxonomy, with a JSON payload schema enforced when the event is emitted. Re-using an existing eventType overwrites its category, description, payload schema and retention and re-enables it; no published operation disables or deletes a definition.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
event_type
required
string
category
required
string
description string, or null
payload_schema
required
object
retention_seconds integer, or null

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/workflows/diff-rule-versions

Diff workflow rule versions

Returns the diff between two versions of a workflow rule.

Parameters

NameInTypeDescription
rule_id
required
query string
from_version_id
required
query string
to_version_id
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/workflows/escalation-chain

Get a workflow rule's escalation chain

Returns the ordered escalation steps configured on one workflow rule: each step's order, its delay in minutes, the recipient type and value, the notification channels, whether the step runs sequentially or in parallel, its contract-type filter and whether it reassigns the task. A rule with no chain returns an empty array; an unknown rule returns 404.

Parameters

NameInTypeDescription
rule_id
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/workflows/escalation-chain

Replace a workflow rule's escalation chain

REPLACES the entire escalation chain for one workflow rule: the rule's existing steps are deleted and the supplied ones inserted in a single transaction, so this is not an append and posting an empty steps array removes escalation from the rule altogether. Each step sets its order, delay in minutes, recipient type and value, notification channels, sequential or parallel mode, contract-type filter and task reassignment. An unknown rule returns 404.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
rule_id
required
string
steps
required
array of object

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/workflows/my-automation-limits

Get my automation limits

Returns the automation-policy switches that are turned off for the caller — the capabilities their admin has turned off for members. Always empty for an organization admin.

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/workflows/my-delegation

Get my active out-of-office delegation

Returns the caller's own out-of-office delegation if one is active right now — the delegate's user id, the window it covers and whether approvals are auto-reassigned. Takes no input: it is keyed on the authenticated user, never another member. Returns null when the caller has no delegation currently in window.

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/workflows/rollback-rule

Roll a workflow rule back to a version

Restores an earlier version of a workflow rule as its live content and makes that version active: conditions, actions, enabled state and the rule's inbound webhook secret all revert, so callers using the current secret stop working. The rule keeps its status, and the caller becomes its author, so a rule that starts an agent runs it with the caller's access from then on. Only PUBLISHED versions can be restored — a draft version is rejected with 422 — and rolling back a rule that is not currently published first requires every stored test for it to pass.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
rule_id
required
string
target_version_id
required
string
reason string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/workflows/rule

Get one workflow automation rule

Returns a single workflow automation rule by id — its trigger event and resource type, conditions, actions and else-actions, priority, rollout percent and enabled state.

Parameters

NameInTypeDescription
id
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/workflows/rule

Create a workflow automation rule

Creates a workflow automation rule: the business event and resource type it triggers on, optional conditions, and the actions it runs when they match (notify, set_field, assign, transition_state, request_approval, create_task, call_webhook, loop). WITH NO status FIELD THE RULE IS STORED AS A DRAFT and fires on nothing; publish it to make it live. Sending status="published" inserts it as a draft and publishes it only after the rule's stored tests pass. The response carries cycle-detection warnings, and a webhook-triggered rule created without a secret returns its minted signing secret once — no later read returns it.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
name
required
string
event_type
required
string
resource_type
required
string
conditions object, or null Money inside it (a deal-value bound, or a value compared with or written to a money field: the contract value or a contract-term amount) is an integer count of the currency's smallest step (e.g. 100050 = 1,000.50), never a float; a value on any other field keeps its own unit.
actions array of object, or null Money inside it (a deal-value bound, or a value compared with or written to a money field: the contract value or a contract-term amount) is an integer count of the currency's smallest step (e.g. 100050 = 1,000.50), never a float; a value on any other field keeps its own unit.
else_actions array of object, or null Money inside it (a deal-value bound, or a value compared with or written to a money field: the contract value or a contract-term amount) is an integer count of the currency's smallest step (e.g. 100050 = 1,000.50), never a float; a value on any other field keeps its own unit.
enabled boolean
trigger_source one of "internal", "webhook", "cron", "api"
cron_expression string, or null
webhook_secret string, or null
priority integer
tags array of string
category string, or null
status one of "draft", "published", "canary", "scheduled", "archived"
rollout_percent integer
dedup_window_ms integer, or null
evaluation_timeout_ms integer, or null
change_reason string
quiet_hours_start string, or null
quiet_hours_end string, or null
max_runs_per_window integer, or null
run_window_minutes integer, or null

Responses

StatusDescription
201OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

PATCH/api/v1/workflows/rule

Update a workflow automation rule

Updates a workflow automation rule in place — name, trigger event, resource type, conditions, actions, priority, tags, status or enabled flag; omitted fields are left untouched. Publishing or scheduling a draft, or editing the content of a rule that is already published or scheduled, first runs the rule's stored tests and rejects the change with 422 when any fail. Supplying webhookSecret rotates the credential on the rule's public webhook URL and the previous secret stops working immediately. Archived rules are not updatable — they return 404.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
name string
event_type string
resource_type string
conditions object, or null Money inside it (a deal-value bound, or a value compared with or written to a money field: the contract value or a contract-term amount) is an integer count of the currency's smallest step (e.g. 100050 = 1,000.50), never a float; a value on any other field keeps its own unit.
actions array of object, or null Money inside it (a deal-value bound, or a value compared with or written to a money field: the contract value or a contract-term amount) is an integer count of the currency's smallest step (e.g. 100050 = 1,000.50), never a float; a value on any other field keeps its own unit.
else_actions array of object, or null Money inside it (a deal-value bound, or a value compared with or written to a money field: the contract value or a contract-term amount) is an integer count of the currency's smallest step (e.g. 100050 = 1,000.50), never a float; a value on any other field keeps its own unit.
enabled boolean
trigger_source one of "internal", "webhook", "cron", "api"
cron_expression string, or null
webhook_secret string, or null
priority integer
tags array of string
category string, or null
status one of "draft", "published", "canary", "scheduled", "archived"
rollout_percent integer
dedup_window_ms integer, or null
evaluation_timeout_ms integer, or null
scheduled_activate_at string (date-time), or null
change_reason string
quiet_hours_start string, or null
quiet_hours_end string, or null
max_runs_per_window integer, or null
run_window_minutes integer, or null
id
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

DELETE/api/v1/workflows/rule

Archive a workflow rule

Archives a workflow rule: it is disabled, stops firing on the next matching event, and no endpoint brings it back. Afterwards getRule, updateRule and rollbackRule all return 404 for it and it drops out of the default rule list; listRules with status="archived" is the only way to see it again.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
id
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/workflows/rule-versions

List a workflow rule's version history

Returns every stored version of one workflow rule, newest first: version number, the full rule snapshot it can be rolled back to, draft/published status, change reason, author, and whether the version was AI-generated with its confidence and explanation. The rule's webhook secret is stripped from every snapshot before it leaves the service.

Parameters

NameInTypeDescription
rule_id
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/workflows/rules

List workflow rules

Cursor-paginated list of the organization's workflow automation rules, highest priority first, filterable by workspace, trigger event type, status, enabled flag, category, tags and a substring search over name, event type and resource type. Archived rules are excluded unless status="archived" is passed explicitly, and every row reports only whether a webhook secret exists plus its last four characters.

Parameters

NameInTypeDescription
starting_after query string Opaque cursor anchor from a previous page's next_page_url — returns the page starting after this item. Pair with limit. (cursor is the internal pagination dialect and is rejected on the public surface.)
limit query integer
workspace_id query string
event_type query string
status query one of "draft", "published", "canary", "scheduled", "archived", "paused_by_policy"
enabled query boolean
category query string
tags query array of string
search query string
agent_id query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/workflows/rules/invoke

Invoke an API-triggered workflow rule

Fires one workflow rule by id. The rule must opt in to API invocation by declaring triggerSource 'api', must be published (or canary) and enabled, and the caller must hold the workflow-rule invoke permission. The rule's conditions are evaluated against the supplied payload and its actions run synchronously; the response reports whether it matched, how many actions ran, and the evaluation-trace id. Rules with a dedup window have repeat invocations inside that window suppressed.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
rule_id
required
string
payload object

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/workflows/run-rule-tests

Run a workflow rule's saved tests

Evaluates every stored test for one rule against the rule's current definition and returns each result — expected match, actual match, pass/fail, evaluation time — plus an allPassed flag. Only the evaluator runs: no rule action fires. The run does write lastRunStatus and lastRunAt onto the rule's test rows and records a run-completed event.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
rule_id
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/workflows/test-rule

Dry-run every published rule

Evaluates EVERY published workflow rule in the caller's organization against the supplied context and returns, per rule, whether it matched and which actions it would have run. Nothing is executed and nothing is written, and the call takes no rule id.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
context
required
object
with_trace boolean

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

See it on your contracts.

Book a demo

Trusted by teams at

  • 4M+ documents signed since 2014