Skip to main content
A direct case workflow can have cases created from outside Champ with a single HTTP request — from your own backend, a form handler, or another tool. Each case you create kicks off the workflow’s automation against the data you submit. The flow is:
  1. Create an API token in the dashboard.
  2. POST a case to your workflow’s cases endpoint with its attributes.
  3. Fetch the case to read its current status and attributes.
  4. Optionally, update the case’s status — for example to close it from your own system.
This endpoint only works for workflows whose case source is direct. Ticketing and email workflows take in cases through their own channels and can’t be written to with this API.

Create an API token

  1. Go to Tokens in the dashboard.
  2. Click Create Token, choose the API scope, and click Create.
  3. Copy the token immediately — it’s shown once and cannot be retrieved again. API tokens look like api_xxxxxxxx….
The token is scoped to your organization. Treat it as a secret: store it in an environment variable or secrets manager, and delete it from the Tokens page if it’s ever exposed.

Find your workflow ID

Open the direct case workflow in the dashboard. The numeric ID is the last segment of its URL (https://dash.champ.ai/app/workflows/<WORKFLOW_ID>). You’ll use it in the request path below.

Create a case

Send a POST request to the workflow’s cases endpoint:
integer
required
Path parameter. The numeric ID of a direct case workflow.
string
required
Request header. Bearer <YOUR_API_TOKEN> — an API-scoped token from the Tokens page.
string
Request body. A human-readable title for the case. If you omit it or leave it blank, Champ stamps a timestamped default like Refund Intake via API - 2026-05-28 17:04:12 UTC.
object
Request body. The case’s field values, validated against the workflow’s attribute schema. Any attribute that is required in the workflow must be supplied here. Omit it (or pass {}) for workflows with no required attributes.
string
default:"live"
Request body. "live" (default) or "test". Test cases run the workflow end to end but don’t count as real work — they’re excluded from webhooks, billing, metrics, and digests, and their runs execute in test mode. Point your staging environment here.
The body accepts only subject, attributes, and mode. Any other top-level key is rejected with a 422 before the case is created.
The case is created immediately and the workflow’s automation starts asynchronously. The response is the new case:

Fetch a case

Read a case’s current status and attributes by ID:
The response is the same case shape as above. As the workflow runs, the status and attributes reflect the latest state.
Cases normally evolve through the workflow’s own automation. To watch a case progress, poll this endpoint or set up a webhook subscription.

Update a case’s status

Move a case to a new status yourself — for example to close it when it’s resolved on your side, or to reopen it:
string
required
Request body. The status to move the case to. Must be one of the statuses declared on the workflow (see Case statuses). Error is engine-managed and can’t be set through the API.
This is more than writing a field: the update is recorded on the case’s timeline and starts the workflow run attached to the new status, which counts toward your usage like any other run. Use it when you intend the case to actually move, not to sync statuses.
The response is the updated case in the same shape as above.
The body accepts only status. Any other top-level key is rejected with a 422.

Test cases

Create a case with "mode": "test" to exercise a workflow without creating real work:
Test cases behave like live ones — the workflow runs end to end, statuses transition, attributes update — but they are excluded from webhooks, billing, metrics, and reporting digests, and their runs are marked test mode. This makes them safe to fire from a staging environment or CI check.
Test cases still execute the workflow’s real steps. If your workflow calls external systems or sends messages, design it to branch on the case’s mode where those actions shouldn’t run for test traffic.

Case statuses

Every case carries a status. A new case always starts as Open, and the workflow’s automation moves it through the rest as it runs. You can also move it yourself with the update endpoint. Each workflow ships with three default statuses that are always present: A workflow can also define custom statuses on top of these defaults (for example Awaiting customer or Pending review) to model the intermediate stages of its own process. A case’s status is always one of the statuses declared on its workflow, so the exact set you’ll see depends on how that workflow is configured — open the workflow in the dashboard to view its full status list.
A case can only ever be in a status its workflow has defined. Error is set by the engine when a run fails and can’t be set through the API — recover an errored case by moving it to another status.

Validation errors

If attributes doesn’t match the workflow’s schema — a missing required field, a wrong type — the request returns 422 with a validation_errors array. Each entry points to the offending field with a JSON Pointer:

Errors

Errors return a JSON body with an error message.