AI agents and API
Common API errors and how to fix them
What 401, 402, 404 and 429 mean from the PostEverywhere API, the right base URL, and how Idempotency-Key stops duplicate posts.
Most API problems come from the wrong address or a key problem. The base URL is https://app.posteverywhere.ai/api/v1. There is no api.posteverywhere.com.
Check the basics
- Call
GET https://app.posteverywhere.ai/api/v1/mewith your key in theAuthorization: Bearer pe_live_...header. - A
200means the key works. The response shows your plan, scopes and quota. - Any other answer is a JSON object with
error.code,error.messageanderror.retryable.
Error codes
| Status | Code | What it means | What to do |
|---|---|---|---|
| 401 | invalid_api_key, api_key_revoked or api_key_expired |
Missing, invalid, revoked or expired API key | Check the header. Keys start with pe_live_. Create a new one on the Developers page if needed. |
| 402 | subscription_required |
Your trial ended, the plan was cancelled, or a payment failed | Open Settings › Billing and start or fix the plan. The message says which. |
| 403 | insufficient_scope |
The key lacks the Read, Write or AI permission the call needs | Create a key with the right permissions. |
| 404 | not_found |
No endpoint at that path | Check the path against posteverywhere.ai/docs. |
| 429 | rate_limit_exceeded |
Requests arrived faster than the rate limits allow | Wait the seconds given in Retry-After. See "429: too many requests" below. |
| 400 | preflight_failed |
A problem we can already see, for example an account that needs reconnecting or a platform daily cap | Read error.details.preflight.blockers. Each one has a message and a fix. Retrying the same request fails the same way. |
429: too many requests
A 429 means requests arrived faster than the rate limits allow. It is not a cap on how much you post: every plan includes unlimited posts.
- Each API key can make 60 requests a minute and 1,000 an hour. Each post in a bulk request counts as one request.
- Per user, you can schedule 100 posts a minute and 1,000 an hour, and post now 60 a minute, 200 an hour and 1,000 a day.
- The response tells you when to try again, in the
Retry-Afterheader. The request that got the429was not created. - Wait that long and send the request again. Use an
Idempotency-Keyso the retry can't create a duplicate.
All the limits are on API rate limits.
Idempotency-Key
Send an Idempotency-Key header on POST /v1/posts and POST /v1/posts/bulk. If your code retries the same request after a timeout, the API replays the first response (header Idempotent-Replayed: true) instead of publishing again.
- Same key, same body, still running:
409 idempotency_request_in_progress. Retry in a few seconds. - Same key, different body:
422 idempotency_key_reused. Use a new key. - Keys are kept for 24 hours.
MCP connection errors
If an AI agent cannot connect:
- "Missing or invalid API key" means the agent is using a key, and the key is wrong or revoked. Create a new one.
- A sign-in loop means you are not logged in to app.posteverywhere.ai in that browser. Log in first, then retry.
- "Too many attempts" on the connect page: wait a minute and try again.
- A 402 after connecting means the plan or trial is not active.
Related articles
Still stuck? Email support@posteverywhere.ai and we will help.