What an error response looks like, the codes to handle, and the rate limit.
Every error has the same body:
{
"error": {
"code": "read_only_key",
"message": "This access key is read-only."
}
}
code is for your code to check. message is for people and may change. Some errors also carry field, the request field that was wrong.
| Status | Meaning |
|---|---|
400 |
The request is wrong, or an upload is too large. message says what to fix. |
401 |
The key is missing, expired or revoked. |
403 |
Your role may not call this endpoint, or the key is Read only (read_only_key). A key of a vendor organization gets vendor_org_restricted ("Vendor organizations can’t use this.") on every /api/v1 endpoint, and client_inactive ("The organization this vendor works for is not active.") while the client organization it works for is not approved. It gets vendor_org_disabled ("The organization you work for has turned off access for your organization.") instead of vendor_org_restricted once that client has turned the vendor organization off. In any organization, membership_disabled ("Your access to this organization is disabled. Ask its admin to enable it.") means the organization disabled the key owner's membership. None of these pass on retry. |
404 |
The item does not exist in your organization. |
409 |
The item changed since you read it, or its state does not allow the action. Read it again, then retry. With segment_held, someone has the segment open in the editor; message names them. Try again later, not at once. |
422 |
Quality checks block a segment confirm (QAErrorsBlocked). qa_issues lists each failed check with its check_type, severity and message. Fix the translation, then confirm again. |
429 |
Too many requests (rate_limited). |
500 |
Something failed on our side. A create that answers 500 has saved nothing, so you can send it again. |
503 |
The server is busy; the request itself is fine. Either the key could not be checked right now (unavailable, "The service is busy. Try again in a moment."; the key is still valid, do not discard it), or an upload, export or sentence join of an XML or HTML file found too many large files in work (parser_busy, "Too many large files are being read right now. Try again in a moment."). Retry shortly. |
POST /api/v1/jobs/{jobID}/segments/{translationID}/split and POST /api/v1/jobs/{jobID}/segments/join refuse with these codes.
| Status | code |
When |
|---|---|---|
400 |
split_position |
offset is not a valid cut: it is inside a tag pair or {…}, or not between two words. |
400 |
split_unsupported |
The segment cannot be split, for example a PO plural form. |
400 |
split_tags |
The segment's tags cannot be split, for example XLIFF inline codes with escaped markup. |
400 |
join_count |
Fewer than two segments. |
400 |
join_not_adjacent |
The segments do not follow each other. |
400 |
join_other_unit |
The segments are not sentences of one paragraph or pieces of one split segment ("Only sentences of one paragraph, or the pieces of one split segment, can be joined."). In Word and PDF files, paragraphs join too when both have the same style and nothing sits between them; a pair that may not join answers "These paragraphs cannot be joined: their styles differ, or a table, picture or break sits between them." |
400 |
join_partial |
The join leaves out a piece of a split sentence. Include every piece. |
400 |
join_unsafe |
The sentences cannot be joined in this file format. |
409 |
segment_locked |
A segment is locked. |
409 |
segment_in_flight |
A segment is being pre-translated. |
409 |
pipeline_running |
Pre-translation is running on the job. |
409 |
conflict |
expected_updated_at no longer matches. Read the segment again. |
409 |
segment_held |
Someone has a segment open in the editor. |
Retry the 409 codes when the cause has passed.
The filter profile endpoints and a filter_profile_id on an upload refuse with these statuses. They carry no specific code; check the status and read message, which calls a filter profile a file configuration, its name in the app. Filter profiles has the calls.
| Status | When |
|---|---|
400 |
filter_profile_id on an upload is not a profile of the file's format, or the format has no filter profiles. |
400 |
options has a column that is not a column letter, a sheet name outside 1 to 31 characters, an element or attribute name that is not a valid name, an attribute that is not a text attribute or any attribute of meta, link, base, html or head (see Filter profiles), an XML do-not-translate marker without a value, or a list longer than its cap. |
400 |
tag_patterns has more than 20 patterns ("A file configuration can have at most 20 tag patterns."), a pattern over 200 characters ("Tag pattern N is too long: at most 200 characters."), a name over 100 characters ("The name of tag pattern N is too long: at most 100 characters."), a pattern that is not a valid regular expression ("Tag pattern N is not a valid regular expression: …") or one that matches empty text ("Tag pattern N matches empty text."). N counts from 1. |
409 |
The profile is built-in: it cannot be replaced or deleted. |
409 |
updated_at on a replace no longer matches the profile. Read it again and resend. |
409 |
A profile with this name already exists for the format. |
409 |
Templates still use the profile you delete. Choose another profile for them first. |
409 |
The profile you delete is the organization's default for its format. Set another default first. |
Each key has its own limit: 10 requests per second, with short bursts of up to 40. Over the limit, the API returns 429 with a Retry-After header that gives the seconds to wait.