OpenSequence
DocsAPI referenceSDKs and CLIReference

Errors

The error envelope and every error code the API returns.

Edit on GitHub
This page is generated from the error helpers in packages/engine, packages/auth and apps/server by pnpm generate. Do not edit it by hand; change the source and regenerate.

Every failure is the same envelope, with the HTTP status that matches the code:

{
  "success": false,
  "error": { "code": "ALREADY_IN_SEQUENCE", "message": "2 of the 142 contacts are already in a sequence. Nobody was enrolled. Remove them from the selection or exit them from their current sequence first.", "details": { "conflicts": [] } },
  "meta": { "request_id": "req_k3…" }
}

Messages are plain English and may change; code is stable, so branch on it. details is structured when there is something to act on (the conflicts of ALREADY_IN_SEQUENCE, the problems of INVALID_DEFINITION, the missing scopes of SCOPES_MISSING). The TypeScript SDK throws OpenSequenceError with status, code, message, details and requestId.

HTTP error codes

CodeHTTPMessageWhat to do
ALREADY_IN_SEQUENCE409… of the … contacts are already in a sequence. Nobody was enrolled. Remove them from the selection or exit them from their current sequence first.Remove the listed contacts (details.conflicts) from the selection, or exit them first with POST /v1/enrollments/\{id\}/exit. Nobody was enrolled.
BAD_FLAG422A flag is "global" or "channel:<name>".
BAD_OUTCOME422Give the outcome of the task, like "connected" or "no_answer".
BAD_SCOPE422Unknown scope: …. Use read, enroll or admin.
BAD_TAG422A tag is up to 24 letters, digits, dots and dashes, like v2.
BATCH_TOO_LARGE422At most … contacts per call.
CREDENTIAL_INVALID409The … credential was marked invalid by a health check. Register a new one.
ENDPOINT_DISABLED409Enable the endpoint first; it is disabled.
HAS_ACTIVE_ENROLLMENTS409… contacts are still in this sequence. Exit them first, or send exit_active: true.Exit them first, or send exit_active: true to exit them with reason manual.
INSUFFICIENT_SCOPE403This key cannot do that; it needs the "…" scope.Use a key with the scope the route needs (read < enroll < admin).
INTERNAL_ERROR500Something went wrong on our side. Reference ….
INVALID_DEFINITION422The definition has errors; fix them before publishing. details.problems lists them.Fix every problem in details.problems (each has a path, a code and a sentence) and publish again. Saving a draft with errors is allowed; publishing is not.
INVALID_EVENT422The event is not valid: …
INVALID_SLUG422A slug is 3 to 48 lowercase letters, digits and dashes.
INVALID_STATE400The OAuth state is malformed, its signature does not match, or it belongs to another connection. Start the connection again.
MISSING_SECRET422An oauth2 credential needs client_id and client_secret.
NO_ACCOUNT422Google did not say which account consented. Connect again and allow the email permission.
NO_CONTACTS422Give at least one contact.
NO_PUBLISHED_VERSION409This sequence has no published version yet.Publish a version before enrolling.
NO_REFRESH_TOKEN422Google returned no refresh token. Connect again; the consent screen must be shown.
NOT_ACTIVE409This enrollment is … (only active and waiting_limit enrollments can be paused).
NOT_FOUND404… "…" was not found. (Also: no route for this method and path.)
NOT_PAUSED409This enrollment is … (only paused and waiting_limit enrollments can be resumed).
NUMBER_HAS_NO_SMS422… cannot send SMS.
PROVIDER_NOT_CONFIGURED409No Google OAuth client is registered for this tenant. Register one (client_id, client_secret) first.
REQUEST_ERROR400, 413, 429A request-level error with its own message: malformed JSON (400), a body over 2 MB (413), or "Rate limit exceeded, retry in …" (429, 600 requests per minute per key, with a Retry-After header).
SCOPES_MISSING422Google did not grant the Gmail permissions this connection needs. Connect again and allow every box.
SENDER_DISABLED409… is disabled.
SEQUENCE_NOT_ACTIVE409The sequence is ….
SLUG_TAKEN409The slug "…" is already used.
STALE_LOCK409Someone else saved this draft after you loaded it. Reload and try again.Reload the version, re-apply your change on the new lock_version, save again.
STATE_EXPIRED400The OAuth state expired (it lasts ten minutes). Start the connection again.
TAG_TAKEN409Version … already exists.
UNAUTHORIZED401Send a project API key as a Bearer token. / This API key is unknown or revoked. / This endpoint needs the operator token.Send Authorization: Bearer \<key\>; the key must exist and not be revoked. /v1/admin/* wants the operator token instead.
UNKNOWN_CHANNEL422"…" is not a channel.
UNKNOWN_EVENT_TYPE422Unknown event type: …. Use "*" or one of ….Use "*" or the types listed by GET /v1/schema/events.
UNKNOWN_NUMBER422… is not a number the Allo key can see.
UNSAFE_URL422The endpoint URL ….Endpoint URLs must be https, carry no credentials, and resolve to a public address.
VALIDATION_ERROR400The request did not match the schema. details lists each path and message.
VERSION_NOT_EDITABLE409Version … is … and cannot be edited. Create a new version from it. (Also: only drafts can be deleted.)Published and archived versions are frozen. Create a new draft from it: POST /v1/sequences/\{id\}/versions with from_version.
VERSION_NOT_PUBLISHED409Version … is …; only a published version can enroll.

Validation problems

Returned by POST /v1/sequences:validate, PUT .../draft (as problems, saving is allowed) and POST .../publish (inside a 422 INVALID_DEFINITION). Each problem is { path, code, message, severity }. See Validation for the fix of each one.

CodeSeverityExample message
BAD_EVENTerrorThe event "…" is waited for but has no next step.
BAD_OPERATORerror"…" cannot be used on … (…). Use one of: ….
BAD_TEMPLATEerror"{{ … }}" is not something a template can read. Use contact., attrs., sender.*, sequence.name or unsubscribe_url.
BAD_VALUEerror"…" needs a value.
CYCLEerrorSteps … loop without a wait in between; the contact would never leave them.
INVALID_DEFINITIONerrorThe definition is … KB; the limit is … KB.
MISSING_TRANSITIONerrorA … step must say where "…" goes.
NO_UNSUBSCRIBEwarningThis email has no {{ unsubscribe_url }}. Recipients cannot opt out with one click.
TOO_LONGwarningThe SMS is … characters (… segments).
TOO_MANY_SMSerrorA sequence can send at most one text; this one has ….
UNKNOWN_ACTIONerror"…" is not an action of …. Available: ….
UNKNOWN_CHANNELerrorAn outreach step needs a channel.
UNKNOWN_FIELDerror"…" is not a field conditions can read.
UNKNOWN_NODEerrorThe entry node "…" does not exist.
UNKNOWN_NODE_TYPEerror"…" is not a node type. Available: ….
UNREACHABLE_NODEerror"…" can never be reached from the entry step.

On this page