Developers
The Optimate API
Connect Optimate to your own software, Zapier or Make. Schedule and publish posts to LinkedIn, Instagram, Facebook, X, YouTube, Pinterest, Threads, Google Business, Bluesky, Mastodon, Telegram and Discord, save drafts for someone to finish, make branded designs, and pull your analytics and best posting times, all with one key. LinkedIn: personal profiles for now; Company Pages once LinkedIn approves Optimate.
The API is included on Pro, Studio and Agency, and during the free trial. It does the same things, with the same checks, as Optimate in Claude, ChatGPT or Copilot.
1. Get a key
- In Optimate, open Settings → Automations and find API keys.
- Name the key after what will use it, like “Zapier”, so you know which to revoke later.
- Choose Read and post to schedule and publish, or Read only for reports and dashboards.
- Copy the key straight away. It starts with
opt_live_and is shown only once.
Step by step, with Zapier and Make: Connect your own tools with the Optimate API.
2. Your first request
Send the key in the Authorization header on every request. Everything is JSON. Start by checking the key works:
curl https://www.optimatesocial.com/api/v1/me \
-H "Authorization: Bearer opt_live_YOUR_KEY"Then see which accounts you can post to. Each one has an accountId you can use to pick it:
curl https://www.optimatesocial.com/api/v1/accounts \
-H "Authorization: Bearer opt_live_YOUR_KEY"If you manage several clients, GET /clients lists them. Pass a client's name or id as client to work on that client: in the JSON body of any call that posts, schedules, drafts, edits or makes a design or an image, and in the query string of GET /accounts, GET /analytics, GET /analytics/top-posts, GET /best-times, GET /brand, GET /media, GET /instagram/posts, GET /posts, DELETE /posts/{id}, GET /approvals, GET /inbox, GET /inbox/{id}, GET /competitors and GET /reports. When your workspace has more than one client, a call that posts, schedules, drafts, repurposes, or makes a design or an image must name its client, or it is refused with a 400. A call on one post or conversation by its id (reading a conversation, drafting a reply to it, editing or cancelling a post) without client uses that post's or conversation's own client. Other calls without client use whichever client is active in Optimate.
3. Scheduling and publishing
Give a caption, the platforms and a time. Times are local time with no offset, read in the client's own timezone when it has one, otherwise the one your Optimate account uses (/accounts tells you which).
curl https://www.optimatesocial.com/api/v1/posts \
-H "Authorization: Bearer opt_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Our autumn menu starts Monday",
"platforms": ["instagram", "facebook"],
"scheduledFor": "2026-12-07T09:00",
"mediaUrl": "https://…"
}'Instagram needs a photo or a video, and YouTube a video. Pinterest and Google Business take pictures only. A mediaUrl must be a file already in Optimate: one from GET /media, POST /designs or POST /images. For several photos in one post (a carousel, or up to 4 on X), send them in order as mediaUrls instead. A Pin's destination link goes in link.
TikTok from an assistant or the API: it asks you who can see each post and whether it's promotional, then schedules it (it can't post a TikTok instantly). It can also save a TikTok draft to finish in Create Post.
Check before you send. Add "preview": true to see exactly what would happen, without scheduling anything. The answer includes a confirmToken. Send the same request again with that confirmToken (and without preview) to go ahead.
Retrying is safe with a token. If a request with a confirmToken times out, send it again with the same token: Optimate reports what already happened instead of posting twice. A request without a token also returns the token it used, so keep it.
Or send an Idempotency-Key. A request without a token that times out on your side may already have posted, and it never got its token back. Add an Idempotency-Key header (any unique value up to 255 characters, such as a UUID, the same on every retry of one post) and a retry is recognised: Optimate answers with what the first request did instead of posting again. A retry is matched on the key and the body together, so send the same body each time; a different body under a reused key is treated as a new post. Use a new key for each new post. POST /posts, POST /posts/bulk, POST /posts/publish, POST /drafts, POST /drafts/bulk and POST /repurpose take this header; on the three draft endpoints a retry is answered with the drafts the first request saved. Any other POST that sends it is refused with a 400 and nothing runs; on a GET, PATCH or DELETE it is ignored.
Choosing an account. When a client has more than one account on a platform and you name none, the post goes to the first one /accounts lists for that platform, and the answer's warnings says which. To choose, send the accountId values in accounts.
POST /posts/publish works the same way but posts straight away, and can't be undone. Client approval still applies: a scheduled post for a client who approves posts waits for their approval, and such a client can't be published to straight away.
4. Zapier and Make
There is no Optimate app inside Zapier or Make yet, but both can call the API directly, so you can connect Optimate today.
- Zapier: add a Webhooks by Zapier action, choose Custom Request, set the method to POST, the URL to
https://www.optimatesocial.com/api/v1/posts, add a headerAuthorizationwith the valueBearer opt_live_YOUR_KEY, and put the JSON from step 3 in the data box. Add a second header,Idempotency-Key, set to the trigger's record ID, so a step Zapier retries doesn't post twice. - Make: add an HTTP → Make a request module with the same URL, method, header and JSON body, plus an
Idempotency-Keyheader set to the trigger's record ID, so a scenario Make retries doesn't post twice.
For a Zap that runs on its own, consider POST /drafts instead: the post waits in your Planner for you to check and schedule. Keep the same Idempotency-Key header there, so a retried step doesn't save the draft twice.
5. Every endpoint
All paths start with https://www.optimatesocial.com/api/v1. The full reference, with every field, is the OpenAPI document, which tools like Postman can import.
| Endpoint | What it does | Key needs |
|---|---|---|
| GET /me | Check your key: its scopes and your plan. | Read |
| GET /clients | The clients (brands) in your workspace, which one is active in the app, and which are paused. Pass a client's name or id as `client` to the other endpoints to work on it. | Read |
| GET /accounts | The social accounts connected to the active client (or the one named in `client`), with the accountId values the post endpoints take, which of them need reconnecting (needsReconnect; posts to them fail), and the timezone times are read in. | Read |
| GET /analytics | Followers, reach, impressions and engagement per platform over 7, 30 or 90 days. | Read |
| GET /analytics/top-posts | Your best-performing posts by engagement, optionally for one platform. | Read |
| GET /best-times | The days and hours your own posts do best, and the next free best slot (or the next `count` of them). | Read |
| GET /brand | The active client's brand (or the one named in `client`): name, tone, content pillars, words to avoid and colours. | Read |
| POST /brand/setup | Reads a business's website and answers with what it found (name, description, phone, hours, address, colours) and an excerpt of its text, saving nothing. Send save: true with the values to keep and they fill the active client's (or `client`'s) empty brand fields; a field that already has a value is kept. A workspace with no brand yet gets its first one. A business with no website of its own sends save: true with businessName and the other values, and no website. | Read and post |
| GET /media | Photos and videos in your Optimate media library, with links you can attach to a post. | Read |
| GET /instagram/posts | A connected Instagram account's own posts, newest first, read live from Instagram, each with where it has already been posted (matched by caption). Page back with cursor. | Read |
| POST /instagram/import | Copies one of your Instagram posts' photos or video into your Optimate media and answers with its caption, mediaUrls and where it has already been posted. Nothing is posted. | Read and post |
| GET /posts | Upcoming scheduled posts, drafts, failed posts, or all of them — with when each attempted post went out, each platform's result, and the next retry time for a post being retried. | Read |
| POST /posts | Schedule a post for a future time. Send preview: true first to check what would happen without scheduling anything. | Read and post |
| POST /posts/bulk | Schedule up to 25 posts in one request, each with its own caption, platforms and time, under one confirmation. If any post is refused, nothing is scheduled and the reply says which and why. If a post can't be saved once confirmed, the others still are and the answer is 207, with each post's result. Send preview: true first to check without scheduling anything. | Read and post |
| POST /posts/publish | Publish straight away to your connected accounts. This cannot be undone. Each account's result is reported separately. | Read and post |
| PATCH /posts/{id} | Change the caption or time of a post that hasn't gone out yet. The post's own client is used, whichever client is open in the app; `client` in the body is optional. An id that isn't one of your posts answers 404. | Read and post |
| DELETE /posts/{id} | Cancel a scheduled, draft or paused post that hasn't gone out yet. The post's own client is used, whichever client is open in the app; `client` is optional. An id that isn't one of your posts (or one already cancelled) answers 404. | Read and post |
| POST /drafts | Save a post as a draft for someone to finish and schedule in Optimate. Nothing is published. | Read and post |
| POST /drafts/bulk | Save up to 20 drafts in one request, each with its own caption and platforms. Each is saved on its own, and the reply says which were saved; if only some were, the answer is 207. Nothing is published. | Read and post |
| POST /repurpose | Save per-platform versions of an existing post as drafts, each with its own caption. The source post's photo or video is reused. If only some versions were saved, the answer is 207 with each one's result. Nothing is published. | Read and post |
| GET /approvals | Posts held for the client's approval or sent back by them, with the client's comments. | Read |
| GET /inbox | Comments, replies, mentions and reviews in the Inbox, with a preview and mood label. Pro and up. | Read |
| GET /inbox/{id} | One conversation's messages, its reply length limit and whether a reply can be sent from Optimate. | Read |
| POST /inbox/{id}/draft | A suggested reply in the brand's voice (1 AI credit). Nothing is sent. Send an empty JSON object as the body. | Read and post |
| GET /competitors | Your Instagram and YouTube figures beside each tracked competitor's. Pro and up. | Read |
| GET /reports | The last complete week's or month's performance, with the period before for comparison. | Read |
| POST /designs | Make a graphic in your logo and brand colours from a headline (1 AI credit). Returns a link you can attach to a post. | Read and post |
| POST /images | Generate a picture from a description (10 AI credits). Returns a link you can attach to a post. | Read and post |
6. Errors and limits
When something is refused, the answer has an HTTP error status and a sentence you can show a person:
{ "error": { "message": "scheduledFor must be at least a minute in the future." } }400: the request is malformed, such as an unknown field.401: the key is missing, wrong or revoked. Changing your Optimate password, or using Sign out everywhere else with “Also disconnect connected apps and API keys” ticked, switches off every API key: make a new one.403: the key is read-only, your team role is view-only, you've left the workspace the key was made in, or the plan doesn't include the API.404: no post or conversation with that id among yours, such as a post a first cancel already removed.409: the same confirmToken or Idempotency-Key is still being worked on by an earlier request, so nothing new was sent. Wait a few minutes (at least the seconds in theRetry-Afterheader) and send the same request again to get the first request's result.422: Optimate understood the request but couldn't do it, such as a time in the past. A publish that every account refused is a422too, with each account's reason indetails.results.207: a publish went out on some accounts but not others, or a bulk schedule, bulk drafts or repurpose saved some posts but not all.resultssays which, and why.202(publish only): at least one account gave no answer in time, so it may already be live. Check the accounts inunknownbefore posting again.429: too many requests, or too many images, designs or Inbox drafts in a short time. Wait for the number of seconds in theRetry-Afterheader.503: a passing problem on our side. Wait for the number of seconds in theRetry-Afterheader and send the same request again. Usually nothing was sent; whendetails.outcome(or an item'soutcomeindetails.results) isunknowna save may have gone in, so send it again with the sameconfirmTokenorIdempotency-Key, which never adds it twice. A draft sent without anIdempotency-Keywhose save can't be confirmed is a422withoutcomeunknowninstead: checkGET /api/v1/postsfor it before sending it again, as a repeat could save it twice. A post scheduled without anIdempotency-Keyor aconfirmTokenwhose save can't be confirmed is a422withoutcomeunknowntoo, carryingdetails.confirmToken: send the same request again with thatconfirmTokento find out, which never schedules it twice, and don't send it without the token.
Each key can make 60 requests a minute, and each account 120 across all its keys. Of those, 20 a minute may schedule, publish, edit or create. Designs use 1 AI credit and AI images use 10, from the same credits as the app.
7. Keeping your key safe
- A key works like your password for the API. Keep it on a server or in Zapier, never in a web page or an app people can download.
- Make one key per tool, and give it Read only unless it needs to post.
- We store only a scrambled fingerprint of each key, so nobody at Optimate can read it back.
- Revoke a key in Settings → Automations and it stops working on the very next request. Settings also shows when each key was last used.
- Changing your Optimate password, or using Sign out everywhere else with “Also disconnect connected apps and API keys” ticked, switches off every API key: make a new one.
- If you're a team member, a key works in the workspace that was open when you made it, with your role there, and stays there when you switch. A view-only member's key can only read. The workspace owner can see and revoke it in their own Settings → Automations, and it stops if you leave the workspace.
8. Webhooks: hear when a post goes out
The API above is you asking Optimate. A webhook is Optimate telling you: when a post is scheduled, goes out, partly goes out or fails, we send a POST request with the details to an address you choose. Use it to post in Slack when something fails, update a spreadsheet or client report, or start the next step of a Zap. Webhooks are on the same plans as the API.
Set one up: in Zapier, start a Zap with Webhooks by Zapier → Catch Hook (in Make, Webhooks → Custom webhook) and copy the address it gives you. In Optimate, open Settings → Automations → Webhooks, paste it, tick what you want to hear about and press Add webhook, then Send test so Zapier or Make can see the fields. An agency can send one client's posts to one address.
post.scheduled: A post is saved to go out later.post.published: Every account it was sent to posted it.post.partial: Some accounts posted it and some didn't.post.failed: It didn't go out on any account.
A post sent to several accounts is one event with a results entry per account. A post saved as one copy per platform sends one event per copy, sharing a post_group_id. Every request is JSON like this:
{
"id": "5f0c2a9e-3b1d-4c7a-9e21-7d0b8f6a4c11",
"type": "post.partial",
"created_at": "2026-12-01T09:30:00.000Z",
"test": false,
"data": {
"post": {
"id": "00000000-0000-4000-8000-000000000000",
"status": "partial",
"caption": "This is a test from Optimate. Your real posts will look like this.",
"title": null,
"platforms": [
"instagram",
"facebook"
],
"content_types": [
"feed"
],
"scheduled_for": "2026-12-01T09:30:00.000Z",
"posted_at": "2026-12-01T09:30:00.000Z",
"created_at": "2026-12-01T09:30:00.000Z",
"link_url": null,
"media_urls": [],
"post_group_id": null,
"approval_status": null,
"error": "One or more platforms failed.",
"results": [
{
"platform": "instagram",
"platform_name": "Instagram",
"content_type": "feed",
"success": true,
"platform_post_id": "test-instagram-id",
"error": null
},
{
"platform": "facebook",
"platform_name": "Facebook",
"content_type": "feed",
"success": false,
"platform_post_id": null,
"error": "Facebook: the post didn't publish and no reason was given. Retrying usually works."
}
]
},
"client": {
"id": "9b2f6c1d-0e4a-4f8b-a1c3-5d7e9f0a2b4c",
"name": "Bloom Florist"
}
}
}error and each result's error are our own sentences, the same ones the app shows. A test from Settings carries "test": true and a made-up post.
Headers: Optimate-Event (the event), Optimate-Delivery (the same id on every retry of one delivery, so you can ignore a repeat) and Optimate-Signature, t=<unix time>,v1=<HMAC-SHA256> of t, a full stop and the raw body, keyed with the signing secret shown when you add the webhook. Zapier and Make don't need to check it; your own server should:
import crypto from "node:crypto";
// rawBody: the request body exactly as received, before JSON.parse.
function isFromOptimate(rawBody, signatureHeader, secret) {
const parts = Object.fromEntries(signatureHeader.split(",").map((p) => p.split("=")));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false; // older than 5 minutes
const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
const given = Buffer.from(parts.v1 ?? "");
return given.length === expected.length && crypto.timingSafeEqual(given, Buffer.from(expected));
}Answering: reply with any 2xx status within 10 seconds. Anything else, including a redirect, is a failure, and we try again after 1 minute, 5 minutes, 30 minutes, 2, 6 and 12 hours (7 tries in all). Most arrive within a minute of the post changing; very occasionally one arrives twice, so use Optimate-Delivery to skip a repeat. A 410 Gone reply turns the webhook off straight away, and so do 3 days of nothing but failures. Settings shows a delivery log for each webhook, with Resend.
Addresses must be public and start with https://.
Questions?
Questions or something missing? Get in touch.