Run workflow
Trigger an API-callable workflow with your brand API key.
POST /v1/workflows/{id}/run
Starts a run of an active workflow whose trigger is configured for external calls. trumpet accepts the request immediately and executes steps asynchronously. The response contains a dispatch id so you can correlate the run — it does not include per-step results.
Beyond the REST API
The Public API reference pages mostly cover resource operations — creating and updating Pods, listing statuses, and similar calls. Workflows are a separate automation layer: you design triggers, steps, branches, enrollment, and input mappings in the trumpet builder, then start runs from CRM events, in-app signals, or this endpoint. See Workflows.
API key
Use a brand API key in the Authorization: Bearer header. See Authentication for format and key management.
Before you call this endpoint
The workflow must be active and set up in trumpet to accept external runs. Publish it in the builder first, then pass a data object that matches what that workflow expects.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Required | The workflow ID (MongoDB ObjectId), e.g. from the workflow URL in the trumpet dashboard. |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
data | object | Required | Payload passed into the workflow. Keys must match the fields your workflow is configured to accept. Values are validated before a dispatch is created. |
Example request
curl -X POST https://trumpet.app/api/v1/workflows/69f0bafc4cc54b506b0355d8/run \
-H "Authorization: Bearer trpt_a1b2c3_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"data": {
"dealId": "12345",
"ownerEmail": "alice@yourcompany.com"
}
}'Replace dealId and ownerEmail with fields your workflow declares on its trigger. Omitted required fields are rejected before a run starts.
The request body does not choose which trumpet user runs the workflow. Enrollment on the workflow does. See Enrollment for audience types, owner-matching on integration triggers, and service-account patterns.
Success response
Returns 202 Accepted when the dispatch is queued:
{
"success": true,
"data": {
"dispatchId": "69f0bafc4cc54b506b0355e2",
"workflowId": "69f0bafc4cc54b506b0355d8",
"status": "pending",
"enrolledUserCount": 1,
"createdAt": "2026-11-24T10:15:30.000Z"
}
}The run continues in the background. Configure notifications and run history in trumpet if you need to track outcomes beyond this response.
Error responses
| Status | Error | Cause |
|---|---|---|
400 | Invalid workflow ID format | The id path segment is not a valid ObjectId. |
400 | Validation error | Request body failed schema validation (for example missing data or wrong shape). |
400 | Workflow is not fully configured | The workflow is missing a trigger or has configuration errors. |
400 | Workflow contains steps that cannot be run via API yet | One or more steps are not supported for API dispatch. |
400 | Workflow contains steps that are not available for this workspace | A step is disabled or unavailable for your brand. |
400 | Invalid trigger data | data does not match the trigger's declared inputs (message describes the field). |
401 | Invalid or revoked API key | Missing, malformed, revoked, or deleted key. |
404 | Workflow not found | No active workflow with that id exists for your brand, or it cannot be started through this endpoint. |
422 | Workflow enrollment is not configured | Enrollment is required before a run can start. |
429 | Rate limit exceeded | More than 30 requests per minute for this key. Retry after a short delay. |
Runs are asynchronous
A 202 response only means the dispatch was accepted. Step failures after that do not change the HTTP status of this request. Use workflow history in trumpet, configured completion webhooks, or downstream logging to observe outcomes.
Related
Workflows overview
Triggers, steps, catalog, and how automation fits together.
Enrollment
Who receives a run and how fan-out works.
Workflow catalog
Trigger and step reference for building workflows.
Getting Started
API keys and your first Pod request.
Webhooks
Real-time Pod and engagement events (separate from workflow runs).