Get an API key
- Sign in and open Settings → API keys in the dashboard.
- Give the key a name, such as “Release script”, and create it.
- Copy the key straight away. It starts with
smcp_and is shown only once.
Keep the key secret, like a password: anyone with it can post to your accounts. Store it in an environment variable or your CI secrets, never in your code. If a key leaks, delete it in the same place and create a new one.
Connect your accounts (X and LinkedIn) in the dashboard first. The API posts to the accounts you have connected.
Your first request
Send the key in the Authorization header with every request:
curl https://getsocialmcp.com/api/v1/me \
-H "Authorization: Bearer $SOCIALMCP_KEY"
This returns your accounts, settings and plan. To post right away:
curl https://getsocialmcp.com/api/v1/posts \
-H "Authorization: Bearer $SOCIALMCP_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "v2.4 is live: faster search and dark mode.", "networks": ["x", "linkedin"] }'
To schedule it instead, add a time with a timezone offset, for example "scheduledAt": "2026-12-01T09:00:00+01:00". The response shows the post and its result on each network.
Good to know
- Times: send ISO 8601 times with an offset or
Z. Responses use UTC. - Threads on X: send
partsinstead oftext, one item per post in the thread. LinkedIn gets the parts combined into one post, or only the first one, as set in your settings. - A different version per network: use
overrides, for example a longer LinkedIn text and a short X thread in the same request. - Images: upload with
POST /media(a file, or anhttpslink), then pass the returned id inmediaIds. - Posting times: with
"postingTime": "next"the post goes into the next open slot of the posting times set in your dashboard. - No double posts: send an
idempotencyKey. If your script retries with the same key, you get the first post back and nothing is posted twice. - Pages of results:
GET /postsreturnsnextCursor. Pass it ascursorto get the next page. - Approvals: posts made with your own API key go out as planned. The “wait for my approval” setting applies to AI agents only.
Errors
Every error has the same shape. Branch on code; the message is written for people and may change.
{
"error": {
"code": "too_long",
"message": "Part 1 is 312 characters on X; the limit is 280.",
"details": { }
}
}
Common codes:
invalid_api_key(401): the key is wrong or was deleted.invalid_requestortoo_long(422): the request doesn’t fit. The message says what to change.daily_limit,posting_gapormonthly_limit(429): your plan has no room at that time. For a full day or a too-close post,detailssuggests the next time with room.plan_no_imagesand otherplan_codes (403): your plan doesn’t include this. The message says which plan does.dashboard_only(403): this can only be done in the dashboard, for example creating API keys.
A post that was accepted can still fail on one network later, for example when a network signs SocialMCP out. That shows up on the post itself: each entry in targets has a status and, if it failed, an error such as reconnect_needed. Check it with GET /posts/<id>.
Limits
The API uses the same plan and limits as everything else in SocialMCP: posts per day and per month, links on X, images, and a short gap between posts on one account. GET /me shows your limits and what you’ve used.
Machine-readable spec
The full OpenAPI 3.1 spec is at https://getsocialmcp.com/api/v1/openapi.json. Use it to generate a client in your language or to import the API into tools such as Postman.
If you have questions, email hello@getsocialmcp.com.