Post from your own code
Upload media, create a post, and check delivery using JSON requests and one API key per profile.
One request shape covers all 6 networks we support. Availability depends on each platform’s permissions — the status page says exactly which, and your integration does not change as they clear.
Connect once. Give your agent the guide.
Connect your accounts during onboarding, create a profile API key, and use the complete contract below for uploads, network options and reliable retries.
Authentication
Create a key in the app under API keys. It is shown once — we store only a hash, so it cannot be recovered afterwards. Send it as a bearer token.
Authorization: Bearer pilot_your_key_hereEndpoints
/api/v1/accountsThe accounts this key can post to./api/v1/postsRecent posts and where each one landed, per network./api/v1/postsCreate a post — queue it, schedule it, or publish immediately./api/v1/posts/{id}Inspect a delivery before retrying./api/v1/posts/{id}/cancelCancel an unstarted scheduled post; keep it as a draft./api/v1/media/presignGet a direct upload URL, up to 512 MiB./api/v1/media/completeVerify storage and get a media ID./api/v1/accounts/{id}/optionsDiscover network-specific creator settings./api/v1/posts/{id}/retryRetry only failures known not to have published./api/v1/posts/{id}/reconcileRecord verified delivery after an uncertain response./api/v1/mediaSmall uploads up to 4 MiB. Prefer presign for videos.Upload media, get an id back
For videos use presign, PUT the bytes to storage, then complete. The agent guide has the full flow. For images up to 4 MiB, upload once to /api/v1/media and attach the returned id to any post. When the bytes are on your machine, send multipart form-data:
curl -X POST https://attentionpilot.com/api/v1/media \
-H "Authorization: Bearer $PILOT_API_KEY" \
-F "file=@launch.jpg"URL imports require an operator-approved host, HTTPS, no redirects, and a file under 4 MiB. Send JSON with a url instead and we fetch it:
curl -X POST https://attentionpilot.com/api/v1/media \
-H "Authorization: Bearer $PILOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://cdn.example.com/launch.jpg"}'Both return 201 with the stored file. filename, width, height and durationMs are optional on either path — send them if you already know them, skip them if you don't.
{
"media": {
"id": "9b2e…",
"filename": "launch.jpg",
"kind": "image",
"mime": "image/jpeg",
"size": 184320,
"width": null, "height": null, "durationMs": null
}
}Post to every network
Attach media ids with media — the order you list them is the carousel order. Omit schedule and it drops into your next free queue slot. Pass "now" to publish immediately, or an ISO timestamp for a specific time.
curl -X POST https://attentionpilot.com/api/v1/posts \
-H "Authorization: Bearer $PILOT_API_KEY" \
-H "Idempotency-Key: launch-post-001" \
-H "Content-Type: application/json" \
-d '{
"caption": "We shipped per-network retries today.",
"media": ["9b2e…"],
"accounts": ["your-account-id"],
"schedule": "draft"
}'On some networks media is not optional: Instagram and TikTok will not accept a text-only post at all, and YouTube needs a video. Target one of them without the right attachment and pre-flight rejects the request with a 422 naming the network — before anything is scheduled.
Pick networks by name
accounts takes account ids, platform names, or handles — whichever you have to hand.
{
"caption": "Short version for the fast networks.",
"accounts": ["x", "linkedin"],
"schedule": "2026-12-01T09:00:00Z"
}What comes back
Publishing immediately returns the per-network outcome, because each network succeeds or fails on its own. A partly-published post is a normal result, not an error.
{
"id": "0f3c…",
"status": "partial",
"targets": [
{ "platform": "linkedin", "status": "posted",
"url": "https://www.linkedin.com/feed/update/urn:li:share:…" },
{ "platform": "x", "status": "failed",
"error": "Account authorization was revoked during delivery." }
]
}Errors worth handling
400Bad body, unknown accounts, or an unparseable schedule.401The key is missing, malformed or revoked.402Live publishing requires an active trial or $9.99/month subscription. Drafts and dry-run validation remain available.409Request key conflict or delivery needs reconciliation.503Inspect the post or retry the exact payload with the same Idempotency-Key.422Pre-flight failed — the response lists which network and why.Live: the same API over MCP
Point Claude or any MCP client at https://attentionpilot.com/api/mcp with your key as a bearer token and the agent gets the same capabilities — list accounts, add media, create a post, read back the delivery. Setup takes one config block.
Posting is an API call. Make one.
First profile: 3 days free with a card, then $9.99/month. Cancel before the trial ends to avoid a charge.