ErrorsAll pages

Errors

Errors are RFC 9457 problem documents with a stable code. Branch on the code; the title is for people and follows your Accept-Language.

The problem document#

Every error answers with Content-Type: application/problem+json:

409 response
HTTP/1.1 409 Conflict
Content-Type: application/problem+json

{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.10",
  "title": "This idempotency key was already used with a different request.",
  "status": 409,
  "code": "idempotency_conflict",
  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}
  • code is stable: branch on it, never on title or the status alone.
  • title is a readable message in the language of your Accept-Language header: en, pt-PT, fr, de or it, English otherwise.
  • status repeats the HTTP status. type and traceId may appear; quote the traceId when you ask us about a request.
  • Some codes add data: feature and available_from, reason, limit and max, state and action (see the table).
  • Validation problems add errors: each field with a list of {code, message}. Payload fields are named payload.<key>, and values are never repeated, because they may be sensitive.
400 response
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json

{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
  "title": "Some fields need your attention.",
  "status": 400,
  "code": "validation_failed",
  "errors": {
    "payload.amount": [
      {
        "code": "field_invalid",
        "message": "This value doesn't match the field's type."
      }
    ]
  },
  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}

Codes#

StatuscodeWhen
400validation_failedOne or more fields are missing, invalid or unknown. errors names each one; see the field codes below.
400bad_requestThe body of POST /v1/tasks isn't valid JSON.
400request_body_invalidThe body isn't a JSON object, or a known property of POST /v1/tasks has the wrong type.
400https_requiredThe request used plain HTTP.
401unauthorizedThe API key is missing, malformed, unknown or revoked. Comes with WWW-Authenticate: Bearer.
402task_limit_reachedYour monthly tasks are used up (reason: "plan_limit", with the allowance's max and, when a plan allows more, available_from), or a cap the owner set is reached (hard_cap, spend_cap). Not counted. The Free plan never charges for extra tasks: it stops here until the next month or an upgrade.
402not_enough_creditsThe organization's free credits can't cover the most this task could cost, and automatic buying didn't cover it. With needed, available, held, reason and auto_buy (below). Not created; nothing is stored, so a retry with the same Idempotency-Key works once credits are there.
402test_task_limit_reachedA test key's request when this calendar month's test tasks are used up. With limit, max and available_from. Not created.
403feature_not_in_planYour plan doesn't include this door: intake.api, intake.webhook, or intake.test_mode for test keys; or the task type has a consensus step and your plan no longer includes routing.quorum; or it has an open step and your plan no longer includes routing.approver_at_creation or routing.human_groups; or the request sends its own chain and your plan doesn't include routing.chain_override (or that chain needs routing.backup or routing.quorum). With feature and available_from.
403plan_limit_reachedThe request sends its own chain with more steps than your plan's limit.chain_steps. With limit, max and, when a plan allows more, available_from.
403open_steps_not_availableThe task type has an open step, and open steps aren't switched on in TaskToHuman yet (your plan includes them). Not created; a task type without an open step works now. Don't retry. Also from GET /v1/task-types and GET /v1/humans.
403quorum_not_availableThe task type has a consensus step, and consensus steps aren't switched on in TaskToHuman yet (your plan includes them). Not created; a task type without a consensus step works now. Don't retry.
403organization_on_holdThe organization is on hold and can't create tasks.
403organization_suspendedThe organization is suspended.
403organization_pending_deletionThe organization is being deleted.
403workspace_inactiveThe workspace is over your plan's workspace limit.
404not_foundNo such task for this key (another workspace or mode, or older than your plan's history), or an unknown webhook URL.
409idempotency_conflictThe Idempotency-Key was already used with a different body.
409task_already_finishedCancelling a task that is resolved, expired or cancelled. With state and action.
410attachment_removedDownloading a file that was removed to fit the organization's storage allowance (removed files). The task and its decision are kept. Don't retry.
422no_owner_availableNobody in the chain can be notified and the default action is to expire. Not counted.
429rate_limitedToo many requests. Wait for the seconds in Retry-After.
5xxserver_errorSomething failed on our side. Retry with the same Idempotency-Key.

Field codes#

Inside errors of a validation_failed:

FieldcodeWhen
anyunknown_propertyPOST /v1/tasks got a property it doesn't know.
task_typetask_type_unknownNo task type with this key in the key's workspace (or it is archived).
titletext_too_longOver 200 characters.
payloadpayload_not_objectNot a JSON object.
payloadpayload_too_large_bytesOver 64 KB.
payload.<key>field_requiredA required field is missing or null.
payload.<key>field_invalidThe value doesn't match the field's type.
payload.<key>field_too_longA text over its limit.
payload.<key>field_unknownThe task type has no field with this key.
deadline_minutesdeadline_invalidOutside 1 to 525600.
ownerhuman_invalidNot an active human of the workspace.
ownerowner_not_allowed_on_quorumThe task type's first step is a consensus step: its people can't be replaced per task.
ownerowner_not_allowed_on_open_stepThe task type's first step is an open step: name its human in approvers.
ownerowner_not_allowed_with_chainThe request sends its own chain: its first step is who gets the task first.
chainchain_override_not_allowedThe task type doesn't let a task replace its chain. The other chain codes are listed under Send your own chain.
approversapprover_requiredAn open step has no approver, or an open consensus step has fewer valid people than it needs; the message names the steps and how many people they need. Also from the webhook URL, when a step has no mapping or its path finds nothing; there every approver code is keyed approver.<step> instead.
approversapprover_group_emptyThe group an open step chooses from has fewer people who can be asked than the step needs (one, or its approvals needed).
approversapprovers_too_manyMore than 100 entries.
approvers.<n>approvers_too_manyMore people for an open consensus step than its max_approvers (at the first one too many).
approvers.<n>approver_not_allowedThe step is not open or doesn't exist (also on a task type without open steps).
approvers.<n>approver_duplicateA single open step is named more than once, or the same person is named twice for an open consensus step.
approvers.<n>approver_unknownNot exactly one human of this workspace who can be asked, by id or by email address (for a group step by address: also when not in the group). The same answer whatever the reason.
approvers.<n>approver_not_in_groupThe human, named by id, isn't a member of the step's group.
callback_urlcallback_url_invalidNot an absolute URL.
callback_urlcallback_url_https_requiredNot https.
callback_urlcallback_url_credentialsContains a user name or password.
callback_urlcallback_url_blockedPoints at a private, internal or reserved address, a local or reserved name (.local, .internal, .test, .example…), or a host name with an underscore, a trailing dot or a last part that does not start with a letter.
callback_urlcallback_url_port_not_allowedUses a port other than 443 or 8443 (support can allow another port for your organization).
callback_urlcallback_url_own_hostPoints at TaskToHuman itself.
callback_urlcallback_url_ip_not_allowedThe host is an IP address while callbacks are sent through Cloudflare's network (Where callbacks come from): use a host name.
idempotency_keyidempotency_key_invalidThe Idempotency-Key header is over 255 characters.
statebad_requestGET /v1/tasks got an unknown state.

Task type settings#

Task types are set up in the app, not through the API, so your code never meets these codes; the app shows them next to the setting. They are listed here so you can look one up. A save that is refused answers 400 validation_failed with the codes below under errors, or one of the problem codes in the second table.

FieldcodeWhen
callbackPayload.templatepayload_template_too_longThe custom payload template is over 16,000 characters (max).
callbackPayload.templatepayload_template_syntaxThe template can't be read (line, column).
callbackPayload.templatepayload_template_variable_not_allowedA variable that doesn't exist, or a field the task type doesn't have (name).
callbackPayload.templatepayload_template_sensitive_fieldA sensitive field (name): they never leave in a callback.
callbackPayload.templatepayload_template_tag_not_allowedA tag outside the allowed set (name).
callbackPayload.templatepayload_template_filter_not_allowedA filter outside the allowed set (name).
callbackPayload.templatepayload_template_invalid_jsonA sample task renders to text that isn't valid JSON (sample, position).
callbackPayload.templatepayload_template_not_objectA sample task renders to JSON that isn't an object (sample).
callbackPayload.templatepayload_template_too_largeA sample task renders to more than 256 KB (sample, max).
github.repositorygithub_repository_invalidNot a valid owner/repo.
github.workflowgithub_workflow_invalidNeither a workflow file name ending in .yml or .yaml nor a numeric id.
github.refgithub_ref_invalidNot a valid branch or tag name.
github.eventTypegithub_event_type_invalidEmpty, over 100 characters, or not plain printable text.
github.inputsgithub_inputs_invalidMore than 25 inputs, a name that is invalid or repeated, or a value that can't be mapped (index, reason).
github.templategithub_inputs_not_flatAn inputs template renders values that aren't text, numbers, yes or no, or null.
github.templategithub_client_payload_too_manyA client_payload template renders more than 10 top-level properties.
github.templategithub_payload_too_largeA template renders inputs over 65,535 characters, or a client_payload of 60,000 bytes or more.
githubgithub_mode_incompleteA workflow without its file or branch, or a repository event without its event type (or with inputs).
tokengithub_token_invalidThe token isn't a GitHub personal access token (github_pat_… or ghp_…, 20 to 255 characters, no spaces).
StatuscodeWhen
403feature_not_in_planSaving a custom payload template without callback.custom_payload, or a GitHub destination without callback.github. Keeping or removing one needs no plan.
409github_destination_missingAdding a token before the task type's GitHub destination is saved.
409github_token_missingChecking the connection before a token is added.
429rate_limitedChecking the connection more than 10 times an hour for one task type, or 30 times for the organization.

A delivery that fails is shown on the task, with its own codes: see Callbacks and GitHub Actions.

Not enough credits#

When credits are on, a new task sets aside the most it could cost. If the organization's free credits can't cover that, the task is refused:

402 response
HTTP/1.1 402 Payment Required
Content-Type: application/problem+json

{
  "title": "Not enough credits for this task.",
  "status": 402,
  "code": "not_enough_credits",
  "needed": 4,
  "available": 2,
  "held": 196,
  "reason": "auto_buy_off",
  "auto_buy": false,
  "traceId": "00-7d3e1c2b9a8f4e6d5c4b3a2918071625-1a2b3c4d5e6f7081-01"
}
  • needed is what the task would set aside, available the free credits, and held the credits open tasks have set aside, which come back as those tasks end. The numbers are the organization's, whichever workspace the key belongs to.
  • reason says what to do: auto_buy_off (an owner can turn on automatic buying in Plan › Credits), spending_cap (automatic buying reached this month's limit), top_up_failed (the automatic purchase failed, for example because the bank wants the payment confirmed: buy a pack once in Plan › Credits), purchase_limit (too many purchases today), no_credits (automatic buying can't help, for example without a paid subscription; buy a pack) or purchases_disabled (purchases aren't open, or automatic buying is paused by TaskToHuman).
  • auto_buy is whether the organization has automatic buying on.
  • What uses credits, how much a task sets aside and how to avoid this refusal: Credits.
  • Tasks created through MCP never buy automatically: create the task through the API, or buy credits first.

Handling them#

  • Fix and resend: 400, 404, 409 idempotency_conflict. Sending the same request again fails the same way.
  • Tell a person: 402, 403, 422. These need a change in the app or the plan, not in your code.
  • Retry later, unchanged: 429 after Retry-After, 5xx with backoff, always with the same Idempotency-Key.