Errors
Every failed request answers with Content-Type: application/problem+json and
a JSON body. The status code tells you what happened at the HTTP level; the
code field tells you what happened in the application, and it is the field
your integration should branch on.
The envelope
{
"title": "errors.api.personalAccessTokenLimitReached.title",
"titleEnglish": "Personal access token limit reached",
"status": 409,
"code": "PERSONAL_ACCESS_TOKEN_LIMIT_REACHED",
"detail": "errors.api.personalAccessTokenLimitReached.detail",
"detailEnglish": "You have reached the maximum number of active personal access tokens. Revoke one before creating another.",
"errors": [
{"message": "PERSONAL_ACCESS_TOKEN_LIMIT_REACHED", "location": "code"}
],
"details": {}
}
That is a real response: it is what you get when you try to create an eleventh personal access token.
| Field | Always present | What it holds |
|---|---|---|
type | no | A URI identifying the problem type. Omitted when empty, which in practice is always. |
title | yes | A translation key for the summary, such as errors.api.notFound.title. |
titleEnglish | yes | The same summary as English text. |
status | yes | The HTTP status code, repeated in the body. |
code | yes | The stable machine-readable code, UPPER_SNAKE_CASE. Branch on this. |
detail | yes | A translation key for the explanation, such as errors.api.personalAccessTokenNotFound.detail. |
detailEnglish | yes | The same explanation as English text, with any parameters already interpolated. |
instance | no | A URI identifying the specific occurrence. Omitted. |
errors | no | An array of {message, location, value} entries. Absent when there are none. |
translationParams | no | Interpolation values used by the translation keys. Omitted when there are none. |
details | yes | A typed payload for the error. {} when the error carries none. |
Only status, code and details are guaranteed by the schema. Everything
else is omitted when empty rather than sent as null, so read defensively.
Translation keys versus text
title and detail are keys, not sentences. They are stable, they are safe to
match on, and they resolve to whatever language the caller's own interface
speaks. titleEnglish and detailEnglish are the human-readable versions of
the same two strings, in English only.
If you log an error, log code and detailEnglish. If you display it to
someone, either display detailEnglish or resolve detail yourself against
your own translations. Do not display the key.
When a message has variables in it, they arrive twice: interpolated into
detailEnglish, and separately in translationParams so that you can build
the sentence yourself.
{
"title": "errors.api.validationFailed.title",
"titleEnglish": "Invalid request",
"status": 422,
"code": "VALIDATION_FAILED",
"detail": "errors.api.unknownPersonalAccessTokenScope.detail",
"detailEnglish": "The scope transactions:admin is not a valid personal access token scope.",
"errors": [
{"message": "validation_failed", "location": "code"}
],
"translationParams": {"scope": "transactions:admin"},
"details": {}
}
code and details
code is always populated and always upper case, even where the underlying
failure was generic. It is the only field designed to be compared in code.
details is always present. Most errors have no typed payload and send an
empty object, so details being {} is normal and is not a sign that
something is missing. Where an error does carry a payload, the shape is
specific to that code — for example IDEMPOTENCY_KEY_CONFLICT puts the
offending field and key there, as shown in
Making Requests.
The errors array
errors lists individual problems, each with a message, a location naming
the field or place it applies to, and sometimes the rejected value. Field
validation failures appear here, one entry per field.
The array also carries a bookkeeping entry whose location is code. Its
message is the application code in its original spelling, which is not always
the spelling of the top-level code: the generic errors are written
lower_snake_case internally, so a 422 sends VALIDATION_FAILED at the top
level and validation_failed in the entry, while a specific code such as
PERSONAL_ACCESS_TOKEN_LIMIT_REACHED is already upper case and appears the
same in both places. Branch on the top-level code, and filter the code
entry out before showing the list to a person.
Status codes
| Status | Code | Meaning |
|---|---|---|
400 | BAD_REQUEST | The request could not be understood at all. |
401 | UNAUTHENTICATED | Not signed in. An operation needed a signed-in user and the request had none. |
401 | UNAUTHORIZED | Not signed in. The same meaning, raised by the framework before the operation ran. |
402 | PLAN_FEATURE_REQUIRED | The workspace owner's plan does not include the feature this request needs. details.requiredFeature names the plan feature (for example bills). Returned by the bill write endpoints (bills), by creating an attachment (POST /v1/workspaces/{workspaceID}/attachments, receipt_attachments; a business logo needs business_tools instead; listing, downloading and deleting attachments keep working after a downgrade) and the business profile and numbering writes (business_tools); reads still work so data created on an earlier plan stays visible. If the plan cannot be checked, the request fails with 503 instead; retry it. |
402 | PLAN_LIMIT_EXCEEDED | The request would go over a plan limit. Debt plan writes use it too when the owner's plan does not include debt management: limit_key is debt_management. Debt reads still work after a downgrade, so a plan set up earlier stays visible. The errors list has a limit_key entry naming the limit (for example workspaces.max) and a limit entry with the plan's maximum, and translationParams carries limit and current usage. Sharing is limited per account, not per workspace: inviting or adding a new person once the owner has reached their unique-people cap returns this with limit_key account_shares.max. |
402 | PLAN_LIMIT_EXCEEDED (business_workspaces.max) | Creating, converting or cloning into a business workspace when the owner has no business workspace left. See Workspace Kinds. |
402 | PLAN_LIMIT_EXCEEDED (clients.max) | Creating or restoring a client when the owner's plan has no client left. See Clients. |
403 | SECOND_FACTOR_REQUIRED | A browser session (cookie or X-Session-Token) was created with a password only, but the user has a second factor (authenticator app, recovery codes or a security key) turned on. Sign in again with the second factor; the app sends the user to /auth/login?aal=aal2. A session that signed in with a passkey, or with a password and a second factor, does not get it. Personal access tokens never receive it. The OAuth login step (POST /oauth2/budgetthing/login/accept) answers it too, instead of accepting the login. Public routes (for example shared documents and the plan list) still answer normally for such a session, and only routes that need a signed-in user answer 403. A session whose second-factor status cannot be determined is never accepted; see SECOND_FACTOR_CHECK_UNAVAILABLE. |
403 | RECENT_AUTHENTICATION_REQUIRED | An interactive (browser) session asked for a sensitive action, but its last real sign-in is older than the window. details.operation is the operation ID and details.maxAgeSeconds the window (900, 15 minutes). The sign-in time also counts as missing when it is unknown or implausibly far in the future. Sign in again (a Kratos refresh login) and repeat the request. Personal access tokens never receive it: the operations it guards are either refused to tokens already or, for creating or repointing a webhook, governed by scopes alone. See Operations that need a recent sign-in. |
404 | CLIENT_NOT_FOUND | No client with that ID in the workspace. |
409 | CATEGORY_HAS_BALANCE | Deleting a category (DELETE /v1/workspaces/{workspaceID}/categories/{categoryID}) that still holds money, or deleting a credit card or loan (DELETE /v1/workspaces/{workspaceID}/accounts/{accountID}/permanent) whose payment category still holds money. The balance is the net of every assignment, funding and category transfer, future months included. Nothing is deleted or moved: move the money to Ready to Assign or another category with a category transfer, then retry. The code entry in errors reads category_has_balance. |
409 | RESOURCE_LIMIT_EXCEEDED | The workspace would go over a limit Budget Thing sets on every workspace, whatever the plan: accounts, categories, payees, tags or transactions, or splits on one transaction. The errors list has a limit_key entry naming the resource (for example transactions), and translationParams carries limit and current. Restoring a backup (restore-workspace-backup) that holds more of one of them than a workspace may returns it too, and nothing is restored. |
409 | WORKSPACE_NOT_BUSINESS | A business operation (clients, projects, quotes, invoices, business profile, document numbering) was called in a personal workspace, or a backup holding business records was restored into one. See Clients and Business Profile and Document Numbering. |
422 | BACKUP_TOO_LARGE | The backup archive passed to restore-workspace-backup lists more than 5,000,000 records in its manifest, summed over every file. It is refused before any record is read and nothing is restored. A backup Budget Thing made of a workspace within its limits always fits. |
429 | BACKUP_RESTORE_IN_PROGRESS | restore-workspace-backup was called while another backup restore is running for the same workspace owner, or the API instance is already running its limit of concurrent restores. Nothing is restored and the upload is kept: repeat the request once the other restore has finished. |
422 | METADATA_INVALID_KEY | A metadata key is empty, longer than 40 characters or uses a character outside A-Z a-z 0-9 _ . -. translationParams.key names it. Also returned for a bad key in a metadata[key]=value list filter. |
422 | METADATA_VALUE_TOO_LONG | A metadata value is longer than 500 characters. translationParams.key names the key. |
422 | METADATA_VALUE_EMPTY | A metadata[key]= list filter has an empty value. translationParams.key names the key. (An empty value in a create or update body is not an error: it removes the key.) |
422 | METADATA_INVALID_VALUE | A metadata value has a control character other than tab. translationParams.key names the key. |
422 | METADATA_TOO_MANY_KEYS | The record would hold more than 50 metadata keys once the update is merged. |
422 | METADATA_TOO_MANY_FILTERS | A list was filtered by more than 10 metadata keys. |
409 | CLIENT_CODE_TAKEN | Another client in the workspace already uses that short code. details.code repeats it. |
409 | CLIENT_CODE_IN_USE | A client's code can't change once business records use it. details.resource names the kind of record. |
409 | CLIENT_IN_USE | A client can't be deleted while business records reference it. Archive it instead. |
404 | PROJECT_NOT_FOUND | No project with that ID in the workspace. See Projects and tasks. |
404 | PROJECT_TASK_NOT_FOUND | No task with that ID in the project. |
409 | PROJECT_CLIENT_ARCHIVED | A project can't be started for an archived client. |
409 | PROJECT_CODE_TAKEN | Another project in the workspace already uses that short code. details.code repeats it. |
409 | PROJECT_CODE_IN_USE | A project's code can't change once business records use it. details.resource names the kind of record. |
409 | PROJECT_ARCHIVED | An archived project is read-only; restore it to change it, its tasks or its time. |
409 | PROJECT_IN_USE | A project can't be deleted while business records reference it or one of its tasks. Archive it instead. |
409 | PROJECT_TASK_IN_USE | A task can't be deleted while business records (including logged time, a running timer, a quote line or an invoice line) reference it. |
404 | PROJECT_EXPENSE_NOT_FOUND | No project expense with that ID in the workspace. See Project expenses. |
404 | TIME_ENTRY_NOT_FOUND | No time entry with that ID in the workspace. See Time entries and timer. |
404 | TIMER_NOT_RUNNING | The caller has no running timer in the workspace. |
409 | TIMER_ALREADY_RUNNING | The caller already has a running timer; details name it. Stop it, or start with switchFromRunning. |
404 | QUOTE_NOT_FOUND | No quote with that ID in the workspace. See Quotes. |
404 | QUOTE_LINE_NOT_FOUND | No line with that ID in the quote. |
409 | QUOTE_NOT_DRAFT | A quote that has been sent can't be changed or deleted; create a new version. details.status repeats its status. |
409 | QUOTE_INVALID_TRANSITION | The quote's status doesn't allow that action (sending a sent quote, accepting a draft). details.status and details.action repeat them. |
409 | QUOTE_ALREADY_HAS_PROJECT | A quote's project is set once: linking a quote that already has one is refused. See Quotes. |
409 | QUOTE_CLIENT_ARCHIVED | A client-only quote can't be created, changed or sent for an archived client. |
409 | QUOTE_HAS_INVOICES | A quote that has invoices can't get a new version; create a separate quote for the change. |
404 | INVOICE_NOT_FOUND | No invoice with that ID in the workspace. See Invoices. |
404 | INVOICE_LINE_NOT_FOUND | No line with that ID in the invoice. |
409 | INVOICE_NOT_DRAFT | An invoice that has been issued can't be changed or deleted; void it. details.status repeats its status. |
409 | INVOICE_INVALID_TRANSITION | The invoice's status doesn't allow that action (issuing an issued invoice, voiding a draft). details.status and details.action repeat them. |
409 | INVOICE_HAS_PAYMENTS | An invoice with payments can't be voided. details.paymentCount says how many. |
404 | INVOICE_PAYMENT_NOT_FOUND | No payment with that ID on the invoice. |
404 | INVOICE_SCHEDULE_NOT_FOUND | No recurring invoice schedule with that ID in the workspace. |
409 | INVOICE_SCHEDULE_EXISTS | The project already has a recurring invoice schedule (a client can have several client-only ones). details.scheduleId names it. |
409 | TAX_SET_ASIDE_PAYMENT_NOT_IN_BUDGET | The payment has no income transaction, so there is no money in the budget to set aside. |
409 | TAX_SET_ASIDE_ALREADY_CONFIRMED | Money was already set aside for the payment, or the set-aside was reversed. |
422 | TAX_SET_ASIDE_NOT_CONFIGURED | No set-aside percentage, or no usable category, in the business profile. |
422 | TAX_SET_ASIDE_AMOUNT_INVALID | The set-aside amount is zero, negative or more than the payment. |
422 | TAX_SET_ASIDE_CATEGORY_INVALID | The set-aside category isn't an active category of this workspace that can receive funds. |
404 | TAX_RATE_NOT_FOUND | No tax rate with that ID in the workspace. See Tax rates. |
409 | TAX_RATE_NAME_TAKEN | Another active tax rate already has that name. Names are compared without regard to case. Also returned when unarchiving a rate whose name an active rate has taken. |
409 | TAX_RATE_IN_USE | A quote line, an invoice line or a recurring schedule line uses the tax rate, so it can't be deleted. Archive it instead. |
422 | TAX_RATE_INVALID | A tax rate needs a name of 1 to 40 characters and a percent from 0% to 100% (percentE4 from 0 to 1000000). |
422 | TAX_RATE_LIMIT | A workspace can have up to 20 active tax rates. Archive one to add or restore another. |
422 | TAX_RATE_ARCHIVED | A line uses an archived tax rate. Returned when a line is given one, and when an invoice is issued or a quote is sent with a taxed line on one (an applied-deposit line is the only exception). Move the line to an active rate or to no tax. See Invoices. |
422 | DEPOSIT_TAX_RATE_REQUIRED | The quote's lines have different tax rates, or mix taxed and untaxed lines, so a deposit needs taxRateId (a rate ID, or an empty string for no tax). See Invoices. |
422 | ACCENT_LOW_CONTRAST | The document style accent is too light to read against its own tint. details.suggestedHex is the nearest darker color that passes. |
409 | INVOICE_NOT_PAYABLE | Only an issued invoice takes payments. details.status repeats its status. |
409 | TRANSACTION_HAS_INVOICE_PAYMENTS | A transaction change (a lower amount, converting to a transfer) would leave its linked invoice payments without enough behind them. details.allocated and details.paymentCount say what rests on it. |
409 | QUOTE_NOT_BILLABLE | Only lines of an accepted quote can be invoiced. details.quoteId and details.status name the quote. |
409 | PROJECT_EXPENSE_BILLED | An invoice bills the project expense, so it can't be edited or deleted; void the invoice. details.projectExpenseId names it and details.invoiceId the invoice. |
409 | PROJECT_EXPENSE_WRITTEN_OFF | An invoice's billing wrote the project expense off, so it can't be edited or billed until that invoice is deleted or voided. details.projectExpenseId names it and details.invoiceId the invoice. See Project expenses. |
409 | PROJECT_EXPENSE_ALREADY_LINKED | The transaction is already linked to a project. details.projectExpenseId names the link. |
409 | TRANSACTION_BILLED_ON_INVOICE | A transaction's project expense is billed on an invoice, so the transaction can't be deleted or lowered below the billed cost. details.transactionId, details.projectExpenseId and details.invoiceId name them. See Project expenses. |
409 | TRANSACTION_HAS_PROJECT_EXPENSE | A transaction linked to a project expense can't become a transfer; delete the link first. |
409 | TIME_ENTRY_BILLED | Time that an invoice bills can't be edited, deleted, restored or billed again; void the invoice. details.timeEntryId names the entry and details.invoiceId the invoice. |
409 | TIME_ENTRY_WRITTEN_OFF | Time that billing wrote off can't be edited or billed until it is restored. details.timeEntryId and details.invoiceId name them. See Time entries and timer. |
409 | INVOICE_DEPOSIT_APPLIED | Other invoices apply the deposit this invoice bills, so it can't be voided. details.quoteId and details.applied say which and how much. |
422 | DEPOSIT_EXCEEDS_QUOTE | The deposits on a quote's invoices would add up to more than its subtotal (the quote total before tax). details.quoteId and details.available say how much is left. |
422 | NO_DEPOSIT_TO_APPLY | The quote has no billed deposit left to apply. details.quoteId names it. |
422 | DEPOSIT_EXCEEDS_AVAILABLE | An applied deposit is more than the deposit left to apply. details.quoteId and details.available say how much. |
422 | PAYMENT_EXCEEDS_BALANCE | An invoice payment is more than the invoice still owes. details.balance says how much. |
422 | PAYMENT_TRANSACTION_NOT_INCOME | Only an income transaction can be linked to an invoice payment. |
422 | PAYMENT_TRANSACTION_OVER_ALLOCATED | The invoice payments linked to a transaction can't add up to more than it. details.available says how much is free. |
404 | SHARE_LINK_NOT_FOUND | The quote or invoice has no share link with that ID. See Shared documents. |
404 | SHARED_DOCUMENT_NOT_FOUND | A public share link doesn't open a document: unknown, expired, revoked, or the document is no longer shareable. The answer is the same for every cause. |
409 | DOCUMENT_NOT_SHAREABLE | Only a sent quote or an issued invoice can be shared. |
409 | SHARE_LINK_LIMIT_REACHED | The document already has the most active share links (10). |
422 | INVOICE_PAYMENT_METHOD_RESERVED | The stripe payment method is reserved and can't be set when recording or changing a payment. |
409 | DOCUMENT_NOT_SENDABLE | Only a sent quote or an issued invoice can be emailed. See Emailing documents. |
409 | EMAIL_RECIPIENT_SUPPRESSED | Earlier mail to this address bounced for good or was reported as unwanted. Correct the contact's address and try again. |
409 | EMAIL_SENDING_PAUSED | Sending email from the workspace is paused because too much mail in the last 30 days bounced for good or was reported as unwanted. It lifts by itself as those reports age. See Sending pause. |
409 | EMAIL_REPLY_TO_ALREADY_VERIFIED | The business's reply-to address is already verified. See Email settings. |
422 | EMAIL_REPLY_TO_INVALID | The reply-to address isn't one valid email address. |
422 | EMAIL_REPLY_TO_REQUIRED | No reply-to address is saved, so there is nothing to verify. |
422 | EMAIL_REPLY_TO_CODE_INVALID | The verification code is wrong. details.attemptsLeft says how many guesses are left. |
422 | EMAIL_REPLY_TO_CODE_EXPIRED | The verification code expired. Request a new one. |
422 | EMAIL_FROM_NAME_INVALID | The sender name has an address or @, passes for Budget Thing, or is over 80 characters. |
429 | EMAIL_REPLY_TO_CODE_ATTEMPTS_EXCEEDED | Five wrong guesses used the code up. Request a new one. |
429 | EMAIL_REPLY_TO_CODE_RATE_LIMITED | A verification code was requested less than a minute ago. |
422 | EMAIL_RECIPIENT_REQUIRED | The client has no contact with an email address. |
422 | EMAIL_RECIPIENT_NOT_ALLOWED | The address isn't a contact of the document's client. |
422 | EMAIL_ATTACHMENT_TOO_LARGE | The PDF is too large to send by email. |
502 | EMAIL_SEND_FAILED | The mail server did not accept the message. The attempt is kept as failed; try again. |
503 | SECOND_FACTOR_CHECK_UNAVAILABLE | A browser session (cookie or X-Session-Token) could not be checked for a second factor because the identity service is unreachable or failing. The session is not accepted; retry in a moment. The app shows its service-unavailable page. |
503 | EMAIL_NOT_CONFIGURED | This deployment has no outgoing mail server. |
500 | DOCUMENT_RENDER_FAILED | The PDF of a quote or invoice could not be created. The document is unchanged; ask again. See Invoices. |
422 | INVOICE_EMPTY | An invoice needs at least one line before it is issued. |
422 | INVOICE_TOTAL_NOT_POSITIVE | An invoice's total, tax included, must be above zero to issue it. |
422 | INVOICE_NUMBERING_CODE_MISSING | The numbering pattern uses {PROJECT} and the project has no code, or the invoice is client-only and has no project. |
422 | INVOICE_HAS_NO_PROJECT | A client-only invoice can't bill logged time or link a line to a project task. It can bill quote lines and deposits of its own client's accepted quotes. See Invoices. |
422 | INVOICE_CLIENT_MISMATCH | An invoice was created for a project and a different client than the project's. |
409 | INVOICE_CLIENT_ARCHIVED | A client-only invoice can't be created or changed for an archived client. |
422 | TIME_ENTRIES_MULTIPLE_PROJECTS | A bill or preview of logged time names entries of more than one project; time is billed one project at a time. details.projectIds lists the projects. |
422 | PROJECT_EXPENSE_NOT_BILLABLE | A project expense can't be invoiced: it is flagged not billable, or belongs to another project than the invoice's. details.reason says which. |
422 | PROJECT_EXPENSES_MULTIPLE_PROJECTS | A bill names project expenses of more than one project; bill one project per call. details.projectIds lists them. |
422 | TIME_ENTRY_NOT_BILLABLE | Time can't be invoiced: it isn't billable, has no hourly rate, or belongs to another project. details.reason says which. |
422 | QUOTE_EMPTY | A quote needs at least one line before it is sent. |
422 | QUOTE_DEPOSIT_EXCEEDS_TOTAL | A quote's deposit is more than its subtotal (before tax). |
422 | QUOTE_NUMBERING_CODE_MISSING | The numbering pattern uses {PROJECT} and the project has no code, or the quote is client-only and has no project. |
422 | QUOTE_HAS_NO_PROJECT | A line of a client-only quote can't link to a project task. See Quotes. |
422 | QUOTE_CLIENT_MISMATCH | A quote was created for a project and a different client than the project's, or linked to a project of another client. |
409 | STALE_BUDGET_SCHEDULE_VERSION | The budget schedule changed since the version you edited. details.expectedVersion and details.currentVersion say which. Refresh and try again. |
409 | STALE_CATEGORY_TARGET_VERSION | The category's target changed since the version you edited. details name the resource and both versions. Refresh and try again. |
409 | STALE_INVESTMENT_TARGET_VERSION | The account's investment target changed since the version you edited. details name the resource and both versions. |
404 | NOT_FOUND (category target) | The category has no funding target. details.resourceId is the category. |
422 | BUDGET_SCHEDULE_INVALID_KIND | The budget period type isn't one the schedule supports. |
422 | BUDGET_SCHEDULE_ANCHOR_REQUIRED | The schedule needs an anchor date: the start of one known budget period. |
422 | BUDGET_SCHEDULE_INVALID_INTERVAL | The repeat interval isn't a whole number of at least 1 and within the maximum, or its unit isn't supported. |
422 | BUDGET_SCHEDULE_INVALID_WEEK_START | The week start day isn't a valid weekday. |
422 | BUDGET_SCHEDULE_INVALID_SEMI_MONTHLY_DAYS | Twice-monthly budgeting needs two different start days, the first earlier than the second. |
422 | BUDGET_SCHEDULE_INVALID_MONTHLY_START_DAY | The monthly start day must be between 1 and 31. |
422 | BUDGET_SCHEDULE_UNSUPPORTED_FIELD | A field doesn't apply to this budget period type and must be left empty. |
422 | BUDGET_SCHEDULE_INVALID_EFFECTIVE_FROM | A new schedule can only start on or after the earliest date that leaves already-planned periods unchanged. |
422 | INVALID_BUDGET_PERIOD_START | The date isn't the first day of a budget period in the workspace. |
422 | INVALID_BUDGET_PERIOD_RANGE | The requested budget period range isn't valid. |
422 | CATEGORY_TARGET_INVALID_TYPE | The target type isn't a supported one. |
422 | CATEGORY_TARGET_INVALID_RECURRENCE | The funding cadence isn't valid for that target type. |
422 | CATEGORY_TARGET_INVALID_AMOUNT | A target amount must not be negative. |
422 | CATEGORY_TARGET_INVALID_DATE | A by-date target needs a date, and no other target type takes one. |
422 | INVALID_CATEGORY_TARGET_CATEGORY | The category can't hold a funding target. |
409 | BANK_SYNC_RECONNECT_REQUIRED | The bank connection must be reconnected before it can be used again. |
422 | BANK_SYNC_MANAGE_ACCOUNTS_UNSUPPORTED | The connection's provider doesn't support managing additional accounts. |
409 | WORKSPACE_HAS_BUSINESS_DATA | A business workspace can't be converted back to personal while it still holds business records. details.resource names the kind of record that remains (client). |
409 | DOCUMENT_NUMBER_CONFLICT | The rendered number is already used by another document. Nothing was issued and the sequence did not move. details.number is the number. |
409 | DOCUMENT_NUMBER_SEQUENCE_EXHAUSTED | A number sequence reached 999,999,999. Change the numbering pattern so it starts a new one. |
422 | DOCUMENT_NUMBER_PATTERN_INVALID | A numbering pattern breaks the grammar. details.reason says how (needs_separator, missing_sequence, …) and details.position where. |
422 | DOCUMENT_NUMBER_NEXT_VALUE_TOO_LOW | The next number is at or below one already issued. details.minimum is the lowest allowed. |
422 | DOCUMENT_ISSUE_DATE_OUT_OF_ORDER | The issue date is in the future, or earlier than the latest date used in the number sequence. details.lastIssueDate is set only for the earlier-than-sequence case; for a future date details is empty. |
422 | OWNERSHIP_TRANSFER_BLOCKED | Handing a workspace to this member would put their plan over a limit. details carries blocked, recipientName, the reasons (limit key, the plan's limit and the usage after the transfer) and an optional suggestedPlanId. See workspace ownership transfers, which also lists the other OWNERSHIP_TRANSFER_* codes. |
410 | INVITATION_EXPIRED | The workspace invitation has lapsed (14 days after it was created or last resent). Returned only to someone who may know the invitation exists: the address it was sent to, or the workspace's owner. See workspace invitations. |
429 | INVITATION_RESEND_TOO_SOON | The invitation was sent or resent less than 10 minutes ago. |
429 | INVITATION_RATE_LIMITED | The inviter, or the address being invited, has reached its sending limit. Deliberately generic: it says nothing about how many invitations an address has received. |
403 | FORBIDDEN | Not allowed. The credential is valid but the action is refused. |
404 | NOT_FOUND | The requested item could not be found. |
409 | CONFLICT | The action conflicts with the current state. |
413 | HTTP_ERROR | The request body is larger than 1 MiB. See Limits. |
422 | VALIDATION_ERROR | The request failed schema validation before any handler ran. |
422 | VALIDATION_FAILED | The request parsed, but a service rejected the values. |
429 | — | Rate limited. A different body; see Limits. The INVITATION_* 429 codes above use the standard problem body instead. |
500 | INTERNAL_ERROR | Something went wrong on our side. |
The Kratos sign-in host (auth.<domain>, not the API) also answers 429
when a client sends too many sign-in, registration, settings, recovery or
verification submissions from one address. See
Authentication.
Those are the generic definitions. Most failures narrow them: the status stays
the same while code becomes something specific, such as
PERSONAL_ACCESS_TOKEN_LIMIT_REACHED on the 409 above.
A 404 is used for anything you may not see, not only for things that do not
exist. Revoking a token that belongs to somebody else answers 404, not 403.
Operations that need a recent sign-in
These operations require the caller's interactive session to have signed in
within the last 15 minutes. Otherwise they answer 403
RECENT_AUTHENTICATION_REQUIRED and do nothing. Each documents that 403 in
the OpenAPI document.
| Operation ID | Action |
|---|---|
create-personal-access-token | Create a personal access token |
create-workspace-export, download-workspace-export | Create or download a workspace export |
create-workspace-backup, restore-workspace-backup | Back up or restore a workspace |
invite-workspace-member, add-workspace-member, update-workspace-member | Invite, add or change the role of a member |
create-webhook | Create a webhook endpoint |
sign-out-everywhere | Sign out of every other session and device |
update-webhook | Only when the request changes the endpoint's url. Other edits are not affected. |
decide-budgetthing-consent | Only when allowing an OAuth connection (both access levels). Denying is never affected. |
delete-workspace | Delete a workspace |
create-ownership-transfer | Start an ownership transfer |
assign-admin-user-platform-role, remove-admin-user-platform-role, request-admin-user-deletion | Platform administration |
Account self-deletion keeps its own accountDeletionFreshAuthRequired error
and confirmation token; it uses the same 15 minute window.
A personal access token is unaffected, so integrations see no change.
The OAuth login step for AI assistant connectors (POST /oauth2/budgetthing/login/accept) applies the same window differently. Instead of a 403, a stale session gets a redirectTo that points to a Kratos refresh login returning to the same login challenge, so the connection resumes after the sign-in.
Server errors
A 500 is deliberately opaque. The underlying cause is logged on the server
and never returned, the code is always INTERNAL_ERROR, and the errors array
is left out entirely — there is no field-level diagnostic to report.
{
"title": "errors.api.unexpected.title",
"titleEnglish": "Something went wrong",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "errors.api.unexpected.detail",
"detailEnglish": "Something went wrong on our side. Try again in a moment.",
"details": {}
}
Quote the X-Request-Id from the response when you report one — it is how the
call is found in the logs.
Responses that do not use the envelope
Three failures are written by middleware, before an operation has been matched
or run. They still use application/problem+json, but the body is shorter:
there are no translation keys, no errors array and no details. Do not
assume the full envelope when you parse a failure.
Missing or invalid credentials. Written by the authentication layer.
{
"status": 401,
"code": "unauthenticated",
"detail": "authentication required"
}
A token without the required scope, or an operation that is closed to tokens entirely.
{
"status": 403,
"code": "PERSONAL_ACCESS_TOKEN_SCOPE_DENIED",
"detail": "personal access token is not permitted to perform this operation"
}
An MCP-only token used outside the MCP endpoint.
{
"status": 403,
"code": "PERSONAL_ACCESS_TOKEN_MCP_ONLY",
"detail": "This token is restricted to the AI assistant (MCP) endpoint and can't be used on other API routes."
}
A workspace-restricted token reaching a different workspace.
{
"status": 403,
"code": "PERSONAL_ACCESS_TOKEN_WORKSPACE_DENIED",
"detail": "personal access token is not permitted to access this workspace"
}
Read status and code first, and treat every other field as optional. That
one rule covers the full envelope, the three short bodies above, and the
rate-limit responses in Limits.
Retrying
429 and 503 are worth retrying — see Limits for the
signals that tell you when. A 500 may be worth one retry with backoff.
Everything in the 4xx range other than 429 describes a problem with the
request itself, and repeating it unchanged produces the same answer.
Requests that create something should carry an idempotency key before you retry them, so that a response you never saw does not become a duplicate.