Errors
Every error has the same JSON shape and a stable, machine-readable code. Branch on the code, show the message to people, and quote the request ID when you contact support.
The error object
Error responses use a 4xx or 5xx status and this body:
{
"error": {
"code": "insufficient_scope",
"message": "This API key is missing the scope `changes:approve`.",
"details": {
"required": [
"changes:approve"
],
"missing": [
"changes:approve"
]
},
"requestId": "req_8fK2mQx1Lz0a",
"docs": "https://semanticson.com/developers/errors#insufficient_scope"
}
}| Field | Description |
|---|---|
code | Stable identifier. Listed below; new codes may be added, so handle unknown codes by their HTTP status. |
message | A readable explanation in English. It can change; do not parse it. |
details | Optional. For validation errors, an array of { field, message } where field is prefixed with path., query. or body. (for example body.url). For scope errors, { required, missing }. For plan limits, { upgrade: true }. |
requestId | Also returned in the x-request-id header of every response. Include it in support requests. |
docs | A link to the explanation of the code on this page. |
Validation errors list every field at fault:
{
"error": {
"code": "invalid_request",
"message": "The request body is invalid.",
"details": [
{
"field": "body.url",
"message": "Invalid input: expected string, received undefined"
}
],
"requestId": "req_Qm41sLx9Ta2c",
"docs": "https://semanticson.com/developers/errors#invalid_request"
}
}HTTP statuses
| Status | Meaning |
|---|---|
| 200 OK | The request succeeded. |
| 201 Created | A resource was created; the body is the new object. |
| 202 Accepted | Work was queued (tool runs, crawl audits). Poll the returned object for the result. |
| 204 No Content | Deleted. The body is empty. |
| 400 Bad Request | Invalid JSON, invalid fields or an action the resource's state does not allow. |
| 401 Unauthorized | Missing, invalid or revoked key. |
| 402 Payment Required | A plan limit blocks the action (tool not in plan, run or AI allowance used up). |
| 403 Forbidden | The key is valid but not allowed: missing scope, wrong key type, read-only access or plan restriction. |
| 404 Not Found | No such endpoint, or a resource that does not exist or is not visible to this key. |
| 409 Conflict | Duplicate resource, Idempotency-Key conflict, or a precondition such as no synced pages. |
| 413 Payload Too Large | The body is larger than 4 MB. |
| 429 Too Many Requests | Per-minute rate limit or monthly allowance reached. See Retry-After. |
| 500 Internal Server Error | An unexpected error on our side. Safe to retry with backoff. |
Error codes
Each code has its own anchor, so an error's docs link lands on the right row.
Authentication
| Code | Status | Meaning | What to do |
|---|---|---|---|
| unauthorized | 401 | No API key was sent, or the Authorization header is not in the form Bearer <key>. | Send Authorization: Bearer <key> with every request (except POST /connect/exchange and the OpenAPI document). |
| invalid_api_key | 401 | The key is malformed, unknown, revoked, or a site key whose website record no longer exists. | Check that the full key was copied (it starts with so_live_ or so_site_). Create a new key in API Settings, or reconnect the website for site keys. |
| site_disconnected | 401 | The site key belongs to a website that was disconnected. | Connect the website again (one-click connect or POST /sites) and store the new site key. |
| account_inactive | 403 | The account that owns the key is suspended or closed. | Sign in to the dashboard or contact support. |
| api_access_not_in_plan | 403 | Account keys need a plan that includes API access. | Upgrade the plan. Site keys of connected websites keep working on every plan. |
| site_limit_exceeded | 403 | The account has more connected websites than its plan includes; the newest websites beyond the limit are paused. | Upgrade, or disconnect another website. The oldest websites keep working. |
| site_key_required | 403 | The endpoint belongs to the site protocol and only accepts a site key. | Call it with the so_site_ key issued when the website was connected. |
| user_key_required | 403 | Site keys cannot call this endpoint (for example connecting websites or approving changes through the general API). | Use an account key (so_live_). |
| insufficient_scope | 403 | The key does not have every scope the endpoint requires. details.required and details.missing list them. | Create a key with the missing scopes, or use a key with the Full access preset. |
| forbidden | 403 | Your role in the workspace does not allow this action (for example only owners and admins can delete a project). | Ask a workspace owner or admin to do it, or to change your role. |
| read_only | 403 | You have read-only (client) access to this project, so you cannot change it. | Ask the workspace owner for edit access. |
Request
| Code | Status | Meaning | What to do |
|---|---|---|---|
| invalid_request | 400 | A path, query or body value failed validation, or the action is not allowed in the resource's current state (for example approving a change that was already rejected). details lists each field and message when fields are at fault. | Fix the fields listed in details and send the request again. For state errors, read the resource first. |
| invalid_json | 400 | The request body is not valid JSON. | Send a JSON body with Content-Type: application/json. |
| invalid_input | 400 | The input of a tool run does not match the tool's fields. | Read the tool's fields from GET /tools and send values for the required ones. |
| payload_too_large | 413 | The request body is larger than 4 MB. | Send fewer items per request (for example fewer pages per POST /site/pages batch). |
| invalid_grant | 400 | One-click connect: the code is invalid, expired (10 minutes), already used, issued for another website address, or the PKCE verifier does not match. | Start the connection again from the website. Codes are single-use, even after a failed attempt. |
| invalid_url | 400 | The URL cannot receive webhooks, for example because it is not public http(s) or points to a private address. | Use a public https URL that resolves to a public IP address. |
| invalid_hierarchy | 400 | The topical map change breaks the map's structure: for example moving a page underneath itself, going deeper than the supporting level, or moving or deleting the central node. | Read the message for the exact rule and choose a different parent or type. |
| no_report_data | 400 | None of the chosen report sections has data in this project yet. | Pick sections that have data, or run the tools that produce it first. |
| no_pages_synced | 409 | A site audit was requested before the website synced any pages. | Run a full page sync from the website, then start the audit. |
Not found & conflicts
| Code | Status | Meaning | What to do |
|---|---|---|---|
| not_found | 404 | The URL does not match any API endpoint, or the resource no longer exists. | Check the method and path against the API reference. |
| *_not_found | 404 | Codes ending in _not_found (such as project_not_found, site_not_found, change_not_found, audit_not_found, tool_not_found) mean the resource does not exist or your key cannot see it. Other accounts' resources are always reported as not found. | Check the ID, and that the key belongs to an account with access. Site keys only see their own project. |
| conflict | 409 | A resource with the same unique values already exists. | Read the existing resource instead of creating it again. |
| project_archived | 409 | The project is archived, so its content cannot be changed. | Restore it with PATCH /projects/{projectId} and { "status": "active" }, then retry. |
| cluster_exists | 409 | A cluster with that name already exists in the project. details.clusterId is the existing cluster. | Use the existing cluster, or choose another name. |
| entity_exists | 409 | An entity with that name already exists in the project. details.entityId is the existing entity. | Update the existing entity instead. |
| relation_exists | 409 | That relation between the two entities already exists. | Nothing to do; read or update the existing relation. |
| link_exists | 409 | That internal link is already planned in the topical map. | Nothing to do; the link exists. |
| node_locked | 409 | The topical map page (or a page beneath it) is locked, so it cannot be moved or deleted. | Unlock it with locked: false, then retry. |
| execution_not_succeeded | 409 | The tool run has not succeeded (it is queued, running, failed or cancelled), so it cannot be exported. | Wait for status: "succeeded" before exporting. |
| webhook_limit_reached | 409 | The workspace already has the maximum number of webhooks. | Delete a webhook you no longer use, or subscribe an existing one to more events. |
| idempotency_key_reused | 409 | The Idempotency-Key was already used with a different method, path or body. | Use a new key for every distinct request. |
| idempotency_in_progress | 409 | A request with the same Idempotency-Key is still being processed. | Wait a moment and retry with the same key to receive the stored response. |
Not-found codes in use: audit_not_found, brand_profile_not_found, brief_not_found, change_not_found, cluster_not_found, delivery_not_found, document_not_found, entity_not_found, execution_not_found, issue_not_found, keyword_not_found, link_not_found, map_not_found, media_not_found, node_not_found, page_not_found, project_not_found, redirect_not_found, relation_not_found, report_not_found, schedule_not_found, site_not_found, term_not_found, tool_not_found, topical_map_not_found, version_not_found, webhook_not_found.
Limits
| Code | Status | Meaning | What to do |
|---|---|---|---|
| rate_limited | 429 | Too many requests per minute for this key, or tool runs started too quickly. The Retry-After header says how many seconds to wait. | Wait for Retry-After seconds, then retry. Spread requests out. |
| monthly_limit_reached | 429 | The account used every API request its plan includes for the current billing period. | Wait for the next period or upgrade. Site key traffic is not counted. |
| tool_not_in_plan | 402 | The tool is not included in the account's plan. details.upgrade is true. | Upgrade to a plan that includes the tool (GET /tools shows includedInPlan). |
| run_limit | 402 | The daily, weekly or monthly tool run limit of the plan is reached. | Wait for the limit to reset or upgrade. |
| tool_daily_limit | 402 | This tool's own daily run limit is reached. | Try again tomorrow or upgrade. |
| tool_monthly_limit | 402 | This tool's own monthly run limit is reached. | Wait for the next period or upgrade. |
| ai_token_limit | 402 | The plan's monthly AI allowance is used up and there are no credits left. | Add your own AI provider key in API Settings, buy credits (when offered) or upgrade. |
| project_limit | 402 | The plan's number of active projects is reached. | Archive a project or upgrade. |
| export_not_in_plan | 402 | The export format is not included in the plan. details.allowed lists the formats you can use. | Use an allowed format or upgrade. |
| feature_not_in_plan | 403 | The action needs a plan feature you do not have (for example deleting projects). | Follow the suggestion in the message (such as archiving instead) or upgrade. |
| white_label_not_in_plan | 403 | White-label branding (brand profiles on exports and reports) is not included in the plan. | Leave out brandId, or upgrade to a plan with white-label. |
| tool_disabled | 404 | The tool is temporarily unavailable. | Try again later or choose another tool from GET /tools. |
Server
| Code | Status | Meaning | What to do |
|---|---|---|---|
| internal_error | 500 | Something went wrong on our side. The error was logged. | Retry with backoff (with the same Idempotency-Key for writes). If it persists, contact support with the requestId. |
Handling errors
- Branch on
error.code, fall back to the HTTP status for codes you do not know. - Retry only what can succeed later:
429(afterRetry-After),409 idempotency_in_progressand5xx. Do not retry other4xxerrors unchanged. - Use exponential backoff for
5xxand network errors (for example 1 s, 2 s, 4 s … up to a minute), and send writes with an Idempotency-Key so a retry cannot act twice. - Show
messageto people where it helps (it is written for humans), and logrequestId.
Not found means “not yours” too
Resources owned by other accounts are reported as404, never 403, so IDs cannot be probed.