Errors and limits
The shape of every error, what each code means and what to do, rate limits, pagination and request ids.
Updated
In short. Every error is
{ "error": { "code", "message", "request_id" } }with a matching HTTP status. Act on thecode, show people themessage, and quote therequest_idif you contact us. Each key can make 60 requests a minute unless your plan says otherwise.
The error shape
{
"error": {
"code": "permission_denied",
"message": "This key doesn't have the \"Use credits\" permission.",
"request_id": "req_6b1f0c2d9e8a7f3b4c5d6e7f",
"permission": "spend"
}
}
codeis stable and meant for your code. Themessageis a plain sentence that may be reworded.- Some errors add fields, such as
permissionabove,requiredandbalanceoninsufficient_credits, orfieldon a bad input. request_idis also in theX-Request-Idheader of every answer.
Codes
Your key
| Status | Code | What it means |
|---|---|---|
| 401 | missing_key |
No Authorization header. Send Authorization: Bearer peach_sk_…. |
| 401 | invalid_key |
The key isn't a Peach key, or doesn't exist. |
| 401 | key_revoked |
The key was revoked. Make a new one. |
| 401 | key_expired |
The key passed its expiry date. |
| 401 | key_rotated |
The key was replaced by a new one and its 24 hours of overlap have ended. |
| 403 | browser_not_allowed |
The request came from a browser. Call the API from your server. |
| 403 | ip_not_allowed |
The key's IP allowlist doesn't include this address. |
| 403 | key_owner_left |
The person who made the key is no longer in the account. Make a new key. |
Access to the API
| Status | Code | What it means |
|---|---|---|
| 403 | api_access_not_approved |
The account has no approved API access. See Request API access. |
| 403 | api_access_pending_payment |
Approved, but the Enterprise plan isn't paid yet, or its payment has stopped. Pay from the developer console. |
| 403 | pilot_ended |
The pilot has ended. Pay for the plan to carry on. |
| 403 | api_access_paused |
Access is paused. Email hello@gotopeach.com. |
| 403 | mcp_not_included |
The plan doesn't include the MCP server. |
| 403 | mcp_needs_growth |
Connecting an AI tool by signing in comes with the Growth plan and above; this account is on Free or Starter. |
Permissions and sites
| Status | Code | What it means |
|---|---|---|
| 403 | permission_denied |
The key lacks a permission. permission names it. |
| 404 | site_not_found |
The account has no such site, or the key can't see it. |
| 404 | not_found |
Nothing with that id, or it belongs to a site the key can't see. |
| 403 | site_not_allowed |
The key is limited to other sites. |
| 403 | needs_all_sites |
Account-wide data needs a key that can see every site. |
Credits
| Status | Code | What it means |
|---|---|---|
| 402 | insufficient_credits |
The balance is lower than the price. Nothing ran. required, balance and buy_url say more. |
| 402 | key_credit_cap_reached |
The call would take the key past its monthly credit cap. keyUsed and keyCap say more. |
Requests
| Status | Code | What it means |
|---|---|---|
| 400 | bad_request, or a code naming the problem |
Something in the request is wrong. field often names it. |
| 400 | invalid_idempotency_key |
An Idempotency-Key must be 1 to 200 visible characters. |
| 404 | not_found |
No such endpoint. Check the method and path. |
| 405 | method_not_allowed |
The path exists with a different method. |
| 409 | conflict, or a code naming it |
The request clashes with the current state, for example check_running, edited_elsewhere, not_approved or no_analysis. |
| 409 | idempotency_in_progress |
A request with this Idempotency-Key is still running. Wait a moment and try again. |
| 413 | too_large |
The upload is over its size limit. |
| 422 | idempotency_key_reused |
This Idempotency-Key was used for a different request. |
| 429 | rate_limited |
Too many requests. Wait for Retry-After seconds. |
Peach's side
| Status | Code | What it means |
|---|---|---|
| 500 | internal_error |
Something went wrong in Peach. Any credits taken are refunded. Try again in a minute. |
| 503 | unavailable, queue_unavailable or credits_unavailable |
Peach couldn't do it just now. Any credits taken are refunded. Try again in a minute. |
A paid call that fails with a 4xx or 5xx is refunded in full, except where the credits page says otherwise.
Rate limits
- Each key can make 60 requests a minute, unless your plan sets another number. An MCP connection has the same limit.
- Every accepted answer carries
X-RateLimit-LimitandX-RateLimit-Remaining. - Over the limit, the answer is
429 rate_limitedwith aRetry-Afterheader andretryAfterSec. Wait that long, then try again. - Some endpoints have limits of their own: one-off questions 20 an hour per account, the free checks 300 an hour per key, marking articles published 30 an hour and re-checking findability 20 an hour per account.
- Your plan's limits apply as they do in the app: sites, tracked questions, engines and seats.
GET /melists them.
Pagination
Lists answer a page at a time.
limit: items per page, 1 to 200 (50 by default).cursor: thenext_cursorfrom the page before.next_cursorisnullon the last page.
curl "https://app.gotopeach.com/api/v1/sites/acme.com/questions?limit=100" \
-H "Authorization: Bearer $PEACH_API_KEY"
{ "prompts": [ { "id": "…", "text": "…" } ], "next_cursor": "MTAw" }
The list's name is the one the endpoint always uses, such as data, prompts or opportunities. Treat the cursor as an opaque string.
Request ids
Every answer carries X-Request-Id, and errors repeat it as request_id. The developer console's Logs page finds any request by its id, with its time, endpoint, status, latency and credits. Logs are kept for 30 days. Request and response bodies are never stored.
If you need help with a request, email hello@gotopeach.com with its id.