Durable Workflows

Create Workflow

Changed on

Creates a workflow and publishes its graph as version 1 in one step, ready to run. An invalid graph returns 422 graph_invalid and a duplicate name returns 409 conflict; neither creates anything. With an Idempotency-Key, a retry of the same request within 24 hours replays a snapshot of the original body with HTTP 200. Unlike run creation, this is not durable.

post/v3/workflows

Request

  • Base URL
    https://api.heygen.com
  • URL
    https://api.heygen.com/v3/workflows
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Headers

Idempotency-Keystring

Optional client-supplied key for safely retrying mutations. Subsequent calls within 24 hours that share this key replay the original response — even if the request body differs slightly (a warning is logged). A retry that arrives while the original is still in flight gets a 409 request_in_progress. Keys must be 1–255 characters from [A-Za-z0-9_:.-]; a UUID is a safe default. Scope is per-endpoint and per-resource: the same key on a different route or path parameter is independent.

Request body

namestring required

Human-readable workflow name (unique per space). Creating a workflow with a name that already exists in this space fails with 409 conflict.

metaobject nullable

Optional caller-supplied metadata stored with the workflow.

Response

Idempotency-key replay of a previously created workflow.

Changes