SyndaiSign inStart free

API errors

How the Syndai API reports an error: the problem details body, every error code with its HTTP status, and what your client should do next.

When the API says no, it sends a problem details body (RFC 7807). The content type is application/problem+json. The only routes that answer in a different shape are the two syndai login routes. See Device login errors.

The error body

{
  "type": "about:blank",
  "title": "Admission denied",
  "status": 429,
  "code": "RUN_CONCURRENCY_LIMIT",
  "detail": "Customer concurrent run limit reached",
  "instance": "https://api.syndai.ai/api/v1/external/coding/runs",
  "reason": "concurrency_limit",
  "active_runs": 3,
  "max_concurrent_runs": 3
}
fieldwhat it holds
typealways about:blank
titlea short name for the error
statusthe HTTP status
codethe error code. Your client should branch on this.
detailone line for a person to read. The words can change, so never parse them.
instancethe URL you called
existing_run_idon IDEMPOTENCY_REPLAY for a run: the run you already made

Some codes add fields of their own beside these:

fieldsent with
reasona refused run (BUDGET_EXHAUSTED, QUOTA_EXCEEDED, RUN_CONCURRENCY_LIMIT, CUSTOMER_DISABLED, and RATE_LIMITED from the daily spend limit), or OVERSCOPE_ACK_REQUIRED
active_runs, max_concurrent_runsRUN_CONCURRENCY_LIMIT
required_scopeINVALID_SCOPE: the scope your key lacks
review_urlHUMAN_APPROVAL_REQUIRED: the page where the owner decides
refusal, run_id, promptRUN_IN_FLIGHT and TEXT_EDIT_REFUSED

Error codes

codestatuswhat it meanswhat to do
BUDGET_EXHAUSTED402Syndai refused to start the work for a reason with no code of its own, such as a plan that is not active or a budget that is not valid. reason says which.Read reason and detail. Fix the plan or budget, then try again.
QUOTA_EXCEEDED429The workspace is out of credits, or it hit its monthly spend limit.Add credits or wait for the next month. Don't retry in a loop.
RUN_CONCURRENCY_LIMIT429The workspace already has as many runs going as its plan allows.Wait for a run to end, or cancel one, then try again.
CUSTOMER_DISABLED403The workspace is turned off.Contact Syndai support. Don't retry.
REPO_NOT_BOUND422PUT /policy/defaults named a coding_repository_id that is not in this workspace.Check the id with GET /repos.
IDEMPOTENCY_REPLAY409Your request id matched one you sent before. Location points at what you already made. A run also sends existing_run_id.This is a safe repeat. Read what Location points at. Use a new request id for new work.
CONFLICT409The request clashes with the current state of the run or thing you changed.Read it again, then decide if the change still makes sense.
MISSION_BUSY_RETRY409Another write held the run for a moment. Nothing changed.Wait a moment and send the same request again.
HITL_REQUEST_CONFLICT409The run can't take your answer yet. Nothing changed.Wait a moment and send the same answer again.
HITL_REQUEST_SETTLED409The question was already answered, timed out, or is closed.Don't retry. Read the run again.
RUN_TERMINATED_BEFORE_RESPONSE409The run ended before your answer got there.Don't retry. Read the run again.
INVALID_POLICY400The request body was not valid. This is most often a bad policy_config. detail names the field.Fix the body. See Policy.
INVALID_SCOPE403Your key lacks the scope this route needs. required_scope names it.Make a key with that scope.
RATE_LIMITED429Too many calls in a short time, or the workspace hit its daily spend limit. It may send Retry-After.Wait the Retry-After seconds when it is there. Back off, and don't retry at once.
INSTALLATION_INCOMPLETE422Part of the code list. No route sends it today.None.
SUBSCRIPTION_USAGE_UNAVAILABLE400Syndai could not check your subscription's usage before the run.Try again in a little while.
INVALID_TOKEN400/401401: the API key is missing, wrong or revoked. 400: the invite token is not valid or was used.Use a working key, or ask for a new invite.
ROLE_REQUIRED403You are signed in, but your role can't do this. Only owners and admins can.Ask an owner or admin. Signing in again won't help.
PLAN_UPGRADE_REQUIRED403The workspace plan doesn't include this feature.Upgrade the plan. A new key won't help.
EMAIL_MISMATCH403You are signed in with an email that is not the one on the invite.Sign in with the invited email, or ask for a new invite.
EXPIRED_TOKEN410The invite has expired, or a syndai login code expired or was used.Ask for a new invite, or run syndai login again.
NOT_FOUND404The thing you asked for does not exist, or this workspace can't see it.Stop using that id. List again to get fresh ids.
OVERSCOPE_ACK_REQUIRED409PUT /secrets/{key} or POST /secrets/import: the token can do more than its recipe needs. reason says how. Nothing was saved.Use a narrower token, or send it again with acknowledge_risk: true.
VERIFY_FAILED422The provider said no to a token Syndai checked before saving it. On publish, the app failed content review or the site is suspended.Fix or replace the token. For publish, read detail.
PUBLISH_IN_FLIGHT409POST .../publish: this app is already going live.Poll GET .../publication until it is done, then publish again if you need to.
PUBLISH_UNSUPPORTED_REPO422POST .../publish: only projects Syndai hosts can be published.Don't retry. A project on GitHub ships through its own pipeline.
PUBLICATION_NOT_LIVE409The app isn't live, so this setting or its data can't change now.Publish the app or wait for it to be live, then try again.
NO_APP_DATA404GET .../publication/data.json: the app has no data store. A static site has none.Don't retry. Only apps with sign-in have data.
FEATURE_REQUESTS_NEEDS_MEMBERS400PATCH .../publication set feature_requests to members, but the app has no member sign-in.Choose public or off.
EMPTY_UPDATE400A PATCH sent no field to change.Send at least one field the route takes. detail lists them.
BAD_CURSOR400The cursor was not made by this API.Start again with no cursor, then page with next_cursor.
HUMAN_APPROVAL_REQUIRED403A key asked for something only a person signed in at app.syndai.ai may do. Merge anyway and Go live on a held change are two of these. So are loosening protected files and editing text in a protected file. Nothing changed.Don't retry with the key. Send the owner to review_url.
PROTECTED_PATHS_MANAGED_ONLY422PATCH /repos/{id} set protected_paths on a GitHub project. Protected files work only on projects Syndai hosts.Don't retry. Use GitHub's own branch rules.
RUN_IN_FLIGHT409POST /repos/{id}/text-edits or its undo: a run, or a change going live, holds this site. refusal says which one (RUN_IN_FLIGHT, CHANGE_LANDING or CHANGE_PENDING), and run_id names it. Nothing changed.Follow run_id with GET /runs/{id}/change until it is done, then edit again.
TEXT_EDIT_REFUSED400/409/422/503A text edit or its undo could not swap the text. refusal holds the reason. NOT_LITERAL means code builds the text, and prompt is a ready change request. Others are NOT_EDITABLE, SITE_CHANGED, UNDO_STALE, BUSY, MODERATION_HELD (422), INVALID_TEXT (400), and a site or review that can't be reached (503). Nothing changed.NOT_LITERAL: start a change with prompt. BUSY, SITE_CHANGED or 503: try again. Anything else: make the change with a run.
CLI_UPGRADE_REQUIRED426The syndai CLI that sent this is too old.Run npx -y syndai@latest.
PRODUCTION_STEP_UP_REQUIRED403POST /secrets/resolve asked for production values. No person has allowed this key in the browser in the last 10 minutes. No value was read.Start POST /cli/production-access. An owner or admin opens its verification_uri_complete and allows it. Poll POST /cli/production-access/token, then try again. The CLI does this for you in a terminal.
INTERNAL_ERROR5xxSyndai could not finish the request. This is on our side.Retry with backoff. Contact support if it keeps happening.

Device login errors

syndai login uses the device login of RFC 8628. Its two routes answer in that shape, not as problem details. Until the login ends, POST /api/v1/cli/device/token returns HTTP 400 with {"error": ...}:

errorwhat it meanswhat to do
authorization_pendingno one has said yes or no yetpoll again after interval seconds
slow_downyou polled faster than intervalwait 5 seconds longer, then poll again
access_deniedan owner or admin said nostop. Start a new login if that was a mistake.
expired_tokenno one said yes within 10 minutes, or the key was already handed outstop and start a new login

Retries

  • Retry 429 and 5xx with backoff. Start near one second and double each time. When Retry-After is there, wait that long first.
  • MISSION_BUSY_RETRY and HITL_REQUEST_CONFLICT are safe to send again after a short wait.
  • POST /runs is safe to retry with the same external_request_id. A repeat never makes a second run. It answers IDEMPOTENCY_REPLAY and points at the first one.
  • Any other 4xx fails the same way each time. Change the request before you send it again.

The CLI turns these codes into exit codes.