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.
Updated 23 October 2026
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 | Too many requests | Wait the seconds given in Retry-After. See API rate limits. |
| 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. |
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.
Was this article helpful?
Related articles
Still stuck? Email support@posteverywhere.ai and we will help.