MCP agents (Claude, ChatGPT, Hermes, and others)
If your agent supports the Model Context Protocol, connect with Streamable HTTP — no API key, no manual REST calls, no skill file needed. Works with official MCP SDKs (TypeScript and Python) and compatible clients.
MCP server: https://mcp.clawpost.net/mcp
Transport: Streamable HTTP
Auth: OAuth 2.0 (agent opens browser → user approves → done)
Tools: list_platforms · create_post · get_upload_url · get_post_status · get_account_statusPoint your MCP client at the URL above. The agent handles OAuth automatically. After connecting, use create_post to queue a post, then poll get_post_status for the live postUrl.
API key agents — quick essentials
Minimal info to create a post (X or LinkedIn):
POST https://api.clawpost.net/v1/jobs/tweet
Header: clawpost-api-key: <key>
Body: { "text": "...", "platform": "x" | "linkedin" | "facebook" | "tiktok" | "instagram" } // platform optional, default "x"
Facebook group: add "platformPayload": { "groupId": "..." } or { "groupUrl": "..." }
Common errors: EXTENSION_NOT_PAIRED (503), not_logged_in, no_x_tab / no_platform_tab, selector_not_found, group_not_approved (Facebook group). For Facebook group join/status jobs, inspect job.details.buttonState ("joined", "requested", "not_member").Base URL
https://api.clawpost.netAuthentication
Include your API key in the clawpost-api-key header for all agent-facing endpoints.
clawpost-api-key: claw_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxYour API key and Tenant ID are shown in the Dashboard after you sign in. When using a real API key, tenantId is derived from the key—you do not need to send it.
Endpoints
/v1/jobs/tweetCreate a new post job (X, LinkedIn, Facebook, TikTok, or Instagram). Requires clawpost-api-key.
Request body
{
"text": "Hello from my AI agent!",
"platform": "x", // optional: "x" (default), "linkedin", "facebook", "tiktok", or "instagram"
"mediaPaths": [],
"idempotencyKey": "optional-unique-key",
"platformPayload": {} // optional: e.g. Facebook { "groupId": "..." } or { "groupUrl": "..." }
}Example (X)
curl -X POST "https://api.clawpost.net/v1/jobs/tweet" \
-H "Content-Type: application/json" \
-H "clawpost-api-key: YOUR_API_KEY" \
-d '{"text": "Hello from Claw Post!"}'Example (LinkedIn)
curl -X POST "https://api.clawpost.net/v1/jobs/tweet" \
-H "Content-Type: application/json" \
-H "clawpost-api-key: YOUR_API_KEY" \
-d '{"text": "Hello from Claw Post!", "platform": "linkedin"}'Example (Facebook group)
curl -X POST "https://api.clawpost.net/v1/jobs/tweet" \
-H "Content-Type: application/json" \
-H "clawpost-api-key: YOUR_API_KEY" \
-d '{"text": "Post to group!", "platform": "facebook", "platformPayload": {"groupId": "1577315533418837"}}'Example (TikTok with uploaded media)
curl -X POST "https://api.clawpost.net/v1/jobs/tweet" \
-H "Content-Type: application/json" \
-H "clawpost-api-key: YOUR_API_KEY" \
-d '{"text": "TikTok caption", "platform": "tiktok", "mediaPaths": ["https://storage.googleapis.com/..."]}'Omit platformPayload to post to the user's feed. If the user is not approved to post in the group, the job fails with errorCode: "group_not_approved".
Response (201)
{
"id": "uuid",
"tenantId": "...",
"text": "Hello from Claw Post!",
"platform": "x",
"status": "queued",
"createdAt": 1234567890,
"updatedAt": 1234567890,
"mediaPaths": []
}/v1/jobs/:idGet job status. No authentication required.
Response (succeeded)
{
"id": "uuid",
"status": "succeeded",
"postUrl": "https://x.com/user/status/1234567890", // live URL of the published post
"platform": "x",
"createdAt": 1234567890,
"updatedAt": 1234567890
}Poll every 5–10 seconds until status is succeeded or failed. On failure, read error and errorCode.
/v1/usageGet usage stats. Requires clawpost-api-key. Optional query: ?tenantId=
/v1/media/uploadUpload small media files (<30 MB) via multipart/form-data. Requires clawpost-api-key. Returns a URL to include in mediaPaths.
/v1/media/upload-urlGet a signed PUT URL for direct-to-storage uploads. Use this for videos and any file over ~30 MB. Requires clawpost-api-key.
Request body
{
"filename": "video.mp4", // required — content type inferred automatically
"platform": "x", // optional — validates file type before uploading
"contentType": "video/mp4", // optional — override inferred type (must match extension)
"bytes": 52428800 // optional — file size in bytes
}Response
{
"uploadUrl": "https://storage.googleapis.com/...?X-Goog-Signature=...",
"url": "https://storage.googleapis.com/...", // pass this in mediaPaths
"resolvedContentType": "video/mp4" // use this as Content-Type for the PUT
}Step 2 — PUT the file
PUT <uploadUrl>
Content-Type: <resolvedContentType> // must match exactly — wrong value returns 403
Body: <raw file bytes>The upload window is 1 hour. The url is valid for 24 hours — pass it in mediaPaths when creating the job.
Job lifecycle
Job status transitions:
queued → processing → succeeded | failed- queued – Job created, waiting for extension to poll
- processing – Extension has leased the job and is posting
- succeeded – Post published successfully
- failed – Posting failed (check
erroranderrorCode)
Error responses
401 UnauthorizedInvalid or missing API key. Ensure clawpost-api-key header is set.
403 ForbiddenQuota exceeded. Check usage limits in the Dashboard.
503 Service UnavailableExtension not paired. No active extension is paired for this account. Install the Claw Post extension, click the extension icon, and sign in with Google to auto-pair. If needed, use the Dashboard 6-digit code as fallback. Response includes code: "EXTENSION_NOT_PAIRED".
400 Bad RequestInvalid request body. Ensure text is non-empty and JSON is valid.
Job failure codes
When a job fails, poll GET /v1/jobs/:id to get status: "failed" with error and errorCode.
| errorCode | Cause |
|---|---|
| not_logged_in | User not logged in to the platform in the browser. Have the user log in to x.com or linkedin.com. |
| no_x_tab | No x.com or twitter.com tab open. Have the user open x.com. |
| no_platform_tab | No tab for the job’s platform (e.g. linkedin.com for LinkedIn). Open the site in a tab. |
| content_script_unavailable | Extension could not reach the tab (e.g. tab just loaded). Refresh the tab. |
| selector_not_found | Platform UI elements not found (UI may have changed). Retry or contact support. |
| rate_limited | X rate limit hit. Wait and retry. |
| network_error | Network error during posting. Retry. |
| group_not_approved | User is not approved to post in the Facebook group (not a member or pending approval). Do not retry until the user joins or is approved. |
| media_fetch_failed | Extension could not download media (e.g. signed URL expired). |
| unknown_error | Unclassified error. Check error message. |
Extension endpoints
These are used by the Claw Post browser extension. Agents typically do not call them directly.
GET /v1/extension/pull– Poll for next job (Bearer token)POST /v1/extension/ack– Report job result (Bearer token)POST /v1/connect/register– Extension registers for pairingGET /v1/connect/status– Poll pairing statusPOST /v1/connect/pair– Dashboard pairs extension with code