edit.pink
Pink Editor docs
MCP server

Responses and errors

The shape of a tool result, how failures come back, and every error code you can act on.

API v1

A successful call

Every tools/call answers with one text block holding the tool's result as JSON:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      { "type": "text", "text": "{\n  \"ok\": true,\n  \"sites\": [ … ]\n}" }
    ]
  }
}

Parse content[0].text as JSON to get the result. The tool reference shows each tool's inputs; results are described in each tool's text.

Every response also carries two headers:

HeaderMeaning
Pink-VersionThe API version that answered
Pink-Request-IdThis request's id. Quote it when you contact support.

Three kinds of failure

KindHow it arrivesExample
The request was refused before it reached the server's JSON-RPC handlingAn HTTP error status with a small JSON body401 without a valid key
A tool call failedHTTP 200, a normal JSON-RPC result with isError: trueOut of credits, a bad argument, a cap reached
The JSON-RPC message was malformedA JSON-RPC error objectUnknown method

Tool failures are results, not protocol errors, so the model sees them and can act: retry with a fixed argument, pick another site, wait and try again.

Refused requests (HTTP)

StatusBody errorMeaning
401unauthorizedNo credential. The WWW-Authenticate header points to the sign-in; see Authentication.
401invalid_tokenThe key is unknown, revoked or expired.
503temporarily_unavailableThe key could not be checked just now. Retry with the same key.
400JSON-RPC -32600Unsupported MCP-Protocol-Version header, an empty batch, or not a JSON-RPC message
400JSON-RPC -32700The body is not valid JSON

Failed tool calls

A tool that rejects a call returns a result with an error code, a message and, for some codes, more fields:

{
  "jsonrpc": "2.0",
  "id": 7,
  "result": {
    "isError": true,
    "content": [
      { "type": "text", "text": "{\n  \"error\": \"bad_input\",\n  \"message\": \"status must be one of published, draft, got \\\"Draft\\\"\",\n  \"allowed\": [\"published\", \"draft\"]\n}" }
    ]
  }
}

Account and access failures come back as plain text in the same isError result, ending with the code:

Insufficient credits: balance 3.0000 < required 10.0000 (tool "research").

Suggested next step: Top up at https://app.edit.pink/billing, or enable auto-recharge so this never happens again.

(error_code: credits_exhausted)

Either way, branch on the code, not the message: messages are written for the model and may change.

Malformed JSON-RPC

CodeMeaning
-32700Parse error
-32600Invalid request
-32601Method not found
-32602Invalid params, such as a tools/call without a tool name, or an unknown prompt
-32000The server failed while handling the request

Error codes

Access and account

CodeMeaningWhat to do
unauthenticatedNo usable credential reached the toolSign in again, or check the key
site_not_foundselect_site named a site that does not existlist_sites, then select a listed id
site_access_revokedYou are not an owner or member of that sitelist_sites; ask the owner to invite you
pinned_site_invalidThe bound site is gone or you lost access to itlist_sites, then select_site
site_read_onlyThis session may read the site but not change itAsk the owner to add you as a member
credits_exhaustedThe site owner's balance is below the call's priceTop up on the Billing page, or turn on auto-recharge there
rate_limitedOver the per-minute or daily request limit. Carries retry_after_ms.Wait retry_after_ms, then retry
unsupported_api_versionThe Pink-Version header or api_version value is not one the server speaks. Lists the supported versions.Use a listed version, or send none for v1

Tool input and state

CodeMeaningExtra fields
bad_inputAn argument is missing, of the wrong type, not an allowed value, or over a documented capallowed[] when the argument is a fixed list; code names the rule, e.g. slug_taken
bad_input with code: "slug_taken"On a Pink-hosted site, this site stored a page at the same address a moment ago (two publishes of one new page ran at once). Slugs are unique per site, so another site's page never causes it. Publish again to update the page.suggested_slug (articles; may be null)
not_foundThe page, question, topic or row you named doesn't exist on this site
missing_keyword_bindingdb_insert of a topic or page without keyword_idsGet keyword ids with get_keywords first
unknown_keyword_idskeyword_ids that don't exist
column_not_writabledb_insert / db_update on a column the tools may not write, such as publishedUse the matching tool (add_article, set_article)
use_add_competitor_tooldb_insert into the competitors tableUse add_competitor
delete_blocked_publisheddb_delete of a published page or questionUnpublish with set_article / set_answer status: "draft" first
not_undoableundo found nothing it can reverse
no_copyset_article / set_answer without copy, on a page or answer that has no published prose to re-publishFirst publish with add_article; for an answer, send copy
no_researchadd_answer on a question that has not been researchedResearch it first
no_contextThe page's context could not be loadedRetry; contact support with the request id if it persists

Caps and upstream data

CodeMeaningExtra fields
concurrency_limit_exceededToo many web, reddit or URL research calls are running at once across Pinkmax_concurrent, retry_after_ms, current_count
daily_refresh_cap_reachedserp_keyword_refresh used its daily per-site allowancecap
gsc_not_connectedThe site has no Search Console property linkedLink one in Pink Editor
gsc_bq_not_configuredgsc_hidden_winners / gsc_forecast need the BigQuery bulk exportSet it up in Pink Editor
backlink_fetch_failedBacklink data could not be fetchedNothing is charged; retry later

Calls refused with bad_input, not_found, concurrency_limit_exceeded, daily_refresh_cap_reached, gsc_not_connected, gsc_bq_not_configured, no_copy, no_research or no_context are refunded in full. See Credits.

Other codes can appear for faults on our side (for example db_error). Treat any code you don't recognise as a failure, show the message, and quote Pink-Request-Id if you contact us.

On this page