The Setupe API for your apps and AI agents. One request, every channel.
Create, schedule and publish posts to Instagram, TikTok, LinkedIn, YouTube, X and 15 more networks from your own code, or let AI assistants do it through our hosted MCP server. Get a signed webhook when a post goes live or fails. Included with Automation on Setupe plans.
curl -X POST "https://setupe.com/api/automation/v1/posts" \ -H "Authorization: Bearer $SETUPE_API_KEY" \ -H "Idempotency-Key: launch-2026-11-20" \ -H "Content-Type: application/json" \ -d '{ "account_ids": [12, 15, 18], "caption": "Meet our autumn blend. Out tomorrow.", "media_urls": ["https://example.com/launch.jpg"], "mode": "scheduled", "schedule_at": "2026-11-20T09:00:00", "timezone": "Europe/London" }'
const res = await fetch("https://setupe.com/api/automation/v1/posts", { method: "POST", headers: { Authorization: `Bearer ${process.env.SETUPE_API_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json", }, body: JSON.stringify({ account_ids: [12, 15, 18], caption: "Meet our autumn blend. Out tomorrow.", media_urls: ["https://example.com/launch.jpg"], schedule_at: "2026-11-20T09:00:00", timezone: "Europe/London", }), }); const { data } = await res.json();
import os, uuid, requests res = requests.post( "https://setupe.com/api/automation/v1/posts", headers={ "Authorization": f"Bearer {os.environ['SETUPE_API_KEY']}", "Idempotency-Key": str(uuid.uuid4()), }, json={ "account_ids": [12, 15, 18], "caption": "Meet our autumn blend. Out tomorrow.", "media_urls": ["https://example.com/launch.jpg"], "schedule_at": "2026-11-20T09:00:00", "timezone": "Europe/London", }, ) print(res.json()["data"])
{
"ok": true,
"data": [
{ "id": 9041, "account_id": 12, "status": 3, "scheduled_at": "2026-11-20T09:00:00+00:00" },
{ "id": 9042, "account_id": 15, "status": 3, "scheduled_at": "2026-11-20T09:00:00+00:00" },
{ "id": 9043, "account_id": 18, "status": 3, "scheduled_at": "2026-11-20T09:00:00+00:00" }
]
}
REST API
JSON over HTTPS. Check your key, list your connected accounts, and create drafts, scheduled posts or instant posts.
MCP server
Hosted tools for Claude, ChatGPT, Cursor and any MCP client. Sign in with OAuth, no key to paste.
Webhooks
post.created, post.published and post.failed, sent to your URL and signed with HMAC-SHA256. Failed deliveries are retried.
Safe to retry
Every post request carries an Idempotency-Key. Send the same request twice and you get the first answer back, never a double post.
Post to every channel with one API call
Three steps, about five minutes.
Create an API key
In Setupe, open Developer and create a key. It starts with spauto_ and is shown once: keep it in your server secrets, never in a browser.
Get your account ids
Connect your social accounts in the Setupe dashboard, one sign-in per network. GET /accounts lists them with their ids.
Send the post
Pick one or many accounts, then save it as a draft, schedule it for a time, or publish it now.
curl "https://setupe.com/api/automation/v1/accounts" \ -H "Authorization: Bearer $SETUPE_API_KEY"
{
"ok": true,
"data": [
{ "id": 12, "provider_key": "instagram",
"display_name": "Northbeam Coffee", "username": "northbeam.coffee" },
{ "id": 15, "provider_key": "linkedin",
"display_name": "Northbeam Coffee", "username": "" }
]
}
curl "https://setupe.com/api/automation/v1/me" \ -H "Authorization: Bearer $SETUPE_API_KEY"
{
"ok": true,
"workspace_owner_user_id": 1,
"team_id": 4,
"permissions": ["posts:write", "accounts:read"]
}
Authentication and permissions
Send your key on every request as Authorization: Bearer spauto_…. The X-Automation-Key header works too. A key belongs to the workspace it was created in. Revoke it any time from the same Developer page. Call the API from a server or script, not from a web page, because the key is a secret.
| Permission | Allows | Default |
|---|---|---|
accounts:read | GET /accounts: list the connected accounts you can post to. | On |
posts:write | POST /posts as a draft or a scheduled post. | On |
posts:publish | POST /posts with mode publish_now, which sends the post straight away. | Off |
Base URL: https://setupe.com/api/automation/v1. Every response is JSON with "ok": true or "ok": false and a message.
POST /posts
Creates one post per account in account_ids. The Idempotency-Key header is required: 8 to 255 characters with no spaces, such as a UUID. Reuse the same key when you retry. A repeat returns the first response with Idempotency-Replayed: true.
| Field | Type | Description |
|---|---|---|
account_idsRequired | array of integers | One or more account ids from GET /accounts. One post is created per account. |
captionOptional | string | The post text. Up to 5,000 characters. |
media_urlsOptional | array of URLs | Up to 10 public http(s) links to photos or videos. |
modeOptional | string | draft, scheduled (the default) or publish_now. publish_now needs the posts:publish permission. |
schedule_atFor scheduled | string | A future date and time, e.g. 2026-11-20T09:00:00. Read in timezone, or include a UTC offset. |
timezoneOptional | string | An IANA timezone such as Europe/London. Defaults to your workspace timezone. |
campaign_idOptional | integer | Add the post to one of your campaigns. |
label_idsOptional | array of integers | Labels to tag the post with. |
network_optionsOptional | object | Extra settings per network, keyed by network, e.g. { "tiktok": { … } }. |
notesOptional | string | Internal notes for your team. Up to 1,000 characters. |
sourceOptional | string | A label for where the post came from, e.g. zapier or my-app. |
external_referenceOptional | string | Your own id for the post, so you can match it later. |
Post status codes: 1 draft, 2 processing, 3 scheduled, 4 published, 5 failed.
| Status | Meaning | When |
|---|---|---|
| 201 | Created | The posts were created. The body lists one entry per account. |
| 400 | Bad request | The Idempotency-Key header is missing or not valid. |
| 401 | Unauthorized | The API key is missing, wrong or revoked. |
| 403 | Forbidden | The key lacks the permission, or your plan does not include Automation. |
| 409 | Conflict | The Idempotency-Key was used with a different body, or the first request is still running. |
| 422 | Unprocessable | A field is not valid. The errors object says which one. |
| 429 | Too many requests | Slow down and try again shortly. |
Webhooks
Add a webhook URL on the Developer page and pick the events you want. Setupe sends a JSON POST each time one happens. Each webhook has its own signing secret.
| Event | Sent when |
|---|---|
post.created | A post is created through the API. |
post.published | A post goes live on the network. |
post.failed | A post could not be published. The payload includes the error. |
| Header | Value |
|---|---|
X-Automation-Event | The event name |
X-Automation-Request-Id | Unique per delivery. Stays the same on retries, so you can skip duplicates. |
X-Automation-Timestamp | Unix time in seconds |
X-Automation-Signature | sha256=HMAC of timestamp + "." + body |
import crypto from "node:crypto"; function verify(rawBody, headers, secret) { const ts = headers["x-automation-timestamp"]; const expected = "sha256=" + crypto .createHmac("sha256", secret) .update(ts + "." + rawBody) .digest("hex"); const given = headers["x-automation-signature"] || ""; return given.length === expected.length && crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected)); }
{
"event": "post.published",
"occurred_at": "2026-11-20T09:00:04+00:00",
"post": {
"id": 9041, "status": 4, "status_key": "published",
"caption": "Meet our autumn blend. Out tomorrow.",
"account_id": 12, "provider_key": "instagram",
"remote_post_id": "17985…", "url": "https://www.instagram.com/p/…",
"error": null
},
"account": { "id": 12, "username": "northbeam.coffee", "provider_key": "instagram" }
}
Delivery: answer with any 2xx status within 20 seconds. If your server times out, returns 408 or 429, or returns a 5xx error, Setupe tries again after 30 seconds, then after 2 minutes, for 3 attempts in total. Redirects are not followed, so use the final URL.
What the API supports on each network
Accounts are connected in the Setupe dashboard through our own approved apps. There is no developer app for you to register and no review to pass on each network.
| Network | Account type | What a post can carry | API |
|---|---|---|---|
| Professional account | A photo, a video published as a Reel, or a carousel of photos and videos. Media required. | Available | |
| TikTok | Any account | A video, or a photo post. Media required. | Available |
| Personal profiles and company pages | Text with a photo or a video. | Available | |
| YouTube | Channel | A video, titled from the first line of the caption. | Available |
| X | Any account | Text with photos, a GIF or a video. Keep text to 280 characters. | Available |
| Pages | Text, photos or a video. | Available | |
| Threads | Profile | Text, a photo or a video. | Available |
| Account and board | A photo or a video Pin, titled from the first line. Media required. | Available | |
| Bluesky | Account | Text up to 300 characters, with photos or a video. | Available |
| User account and subreddit | A text post (first line is the title) or a link post. | Available | |
| Telegram | Channel, with our bot as admin | Text, or a photo or video with a caption. | Available |
| Discord | Channel webhook | Text with photos. | Available |
| Slack | One channel, picked when adding our app | Text with photos. | Available |
| Mastodon | Account on any server | Text (500 characters on most servers) with photos or a video. | Available |
| WordPress | Self-hosted site, Author or above | A blog post titled from the first line. The first photo becomes the featured image. | Available |
| Medium | Account, with an integration token | A story titled from the first line. The first photo is the cover. | Available |
| DEV | Account, with its API key | An article titled from the first line, Markdown body. No video. | Available |
| Hashnode | Blog, with a personal access token | An article titled from the first line, Markdown body. No video. | Available |
| Tumblr | Main, side and group blogs | Text, with photos or a video. | Available |
| Google Business Profile | Verified locations you manage | An update with text and one photo. No video. | Available |
Media goes in as public links in media_urls, up to 10 per post. Use links that do not expire before the post goes out. Each network still applies its own limits on text length and file size.
MCP server for AI assistants
Setupe runs a hosted Model Context Protocol server at https://setupe.com/mcp. Add it to Claude, ChatGPT, Cursor or any MCP client, sign in to Setupe once with OAuth, and ask in plain words: "schedule this for Tuesday at 9 on Instagram and LinkedIn" or "how did last week's posts do?".
// Settings → Connectors → Add custom connector Name: Setupe URL: https://setupe.com/mcp
// ~/.cursor/mcp.json { "mcpServers": { "setupe": { "url": "https://setupe.com/mcp" } } }
claude mcp add --transport http setupe https://setupe.com/mcp
| Tool | What it does |
|---|---|
list_accounts | List the social accounts connected to your workspace. |
create_post | Draft, schedule or publish a post to one or many accounts. |
list_posts | Find scheduled, published and failed posts by date or account. |
update_post | Change the caption, media or time of a scheduled post. |
delete_post | Remove a draft or a scheduled post. |
get_analytics | Reach, engagement and follower growth per account or post. |
next_free_slot | Find the next open time in your posting schedule. |
generate_caption | Write a caption in your brand voice with Setupe AI. |
Safe by default: the assistant only sees the workspaces you approve when you sign in, and you can disconnect it any time from the Developer page in Setupe.
Built for AI agents
Connect through the MCP server, or give your agent the REST endpoints as tools. Because every post needs an Idempotency-Key, an agent that retries never posts twice. Keep the agent on drafts with a posts:write key, and let a person publish from the Setupe calendar.
Drafts for review
Send "mode": "draft" and the post waits in Setupe for a person to check it.
Automation workflows
Chain AI writing, approval, a delay and scheduling on the visual Automation canvas, no code needed.
Trace every post
Set source and external_reference to see which agent or app created each post.
Start building with Setupe
Create a key, connect your accounts and send your first post in minutes. Questions about the API? We are happy to help.