Developers
Connect Scoltt to your own systems. Read a workspace, prepare drafts, and get a call when a post is approved, published or fails.
Create an API key and add webhooks in the app under Developers. A key belongs to one workspace and acts with the permissions of the person who made it.
REST API
Read a workspace and prepare drafts from your own systems. The API never approves, schedules or publishes; a person does that in Scoltt.
https://xkckvbrsyndmhbecipjf.supabase.co/functions/v1/api/v1Authorization: Bearer sk_scoltt_YOUR_KEY| Method | Address | What it does | Scope |
|---|---|---|---|
| GET | /workspace | The workspace, its time zone, and this key's scopes, limit and permissions. | Any key |
| GET | /accounts | Connected accounts. Use their ids in account_ids when you create a post. | accounts:read |
| GET | /posts | Posts, newest first. Query: status, campaign_id, tag, limit (up to 100), before. | posts:read |
| GET | /posts/{id} | One post, with each account it goes to, its status there and the id the platform gave it. | posts:read |
| POST | /posts | Create a draft. Fields: text (required), title, account_ids, media, labels, priority, scheduled_at, campaign_id, first_comment, poll, send_for_approval. | posts:write |
| PATCH | /posts/{id} | Change a draft or a post with changes requested. Same fields as above; only those sent change. | posts:write |
| DELETE | /posts/{id} | Delete a draft, a post waiting for approval or changes, or a failed post that went nowhere. | posts:write |
| POST | /posts/{id}/submit | Send a draft (that has accounts) for approval. | posts:write |
| POST | /posts/{id}/retry | Send a failed post again, only to the accounts that failed. Optional field: account_id. | posts:write |
| POST | /media | Get an address to upload a picture or video to. Fields: content_type, size (bytes). | media:write |
| GET | /campaigns | Campaigns with their goal and dates. Query: archived=true to include archived ones. | campaigns:read |
| GET | /campaigns/{id} | One campaign and how many posts it has. | campaigns:read |
| POST | /campaigns | Create a campaign. Fields: name (required), goal, starts_on, ends_on. | campaigns:write |
| PATCH | /campaigns/{id} | Change a campaign. Fields: name, goal, starts_on, ends_on, archived. | campaigns:write |
| GET | /tags | Tags used on posts, most used first, with their colour. | posts:read |
| GET | /analytics | Likes, comments, shares, views and clicks for posts published in a period: totals, by platform and per post. Query: from, to (up to 400 days apart), limit, offset. | analytics:read |
| GET | /inbox | Comments, mentions and reviews, newest first. Query: status (new, done, hidden), limit, before. | inbox:read |
| GET | /forms | Your forms (surveys, lead forms, quizzes…) with their link, questions and number of answers. | forms:read |
| GET | /forms/{id}/responses | Answers to one form, newest first, each with its question. Query: limit, before. | forms:read |
List scheduled posts
curl https://xkckvbrsyndmhbecipjf.supabase.co/functions/v1/api/v1/posts?status=scheduled \ -H "Authorization: Bearer sk_scoltt_YOUR_KEY"
Create a draft and send it for approval
curl -X POST https://xkckvbrsyndmhbecipjf.supabase.co/functions/v1/api/v1/posts \
-H "Authorization: Bearer sk_scoltt_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: spring-launch-1" \
-d '{
"title": "Spring launch",
"text": "Our spring collection is here.",
"labels": ["launch"],
"priority": "high",
"scheduled_at": "2026-12-01T09:00:00Z",
"send_for_approval": true
}'What comes back
{
"id": "0b6f5c2e-…",
"title": "Spring launch",
"text": "Our spring collection is here.",
"labels": ["launch"],
"status": "in_review",
"priority": "high",
"scheduled_at": "2026-12-01T09:00:00.000Z",
"url": "https://scoltt.com/app/compose?post=0b6f5c2e-…"
}Add a picture or video
# 1. Ask for an upload address
curl -X POST https://xkckvbrsyndmhbecipjf.supabase.co/functions/v1/api/v1/media \
-H "Authorization: Bearer sk_scoltt_YOUR_KEY" -H "Content-Type: application/json" \
-d '{ "content_type": "image/png", "size": 182044 }'
# → { "path": "<workspace>/<id>.png", "upload_url": "https://…", "method": "PUT", "expires_in": 7200 }
# 2. Upload the file there
curl -X PUT "UPLOAD_URL" -H "Content-Type: image/png" --data-binary @photo.png
# 3. Use the path in a post
curl -X POST https://xkckvbrsyndmhbecipjf.supabase.co/functions/v1/api/v1/posts … -d '{ "text": "…", "media": [{ "path": "<path>", "alt": "Our new shop" }] }'Security
- Scopes. A key only does what was ticked when it was made, and never more than the person who made it may do in the workspace. Missing a scope returns 403 with the code
missing_scopeandrequired_scope. - IP limit. A key can be limited to your servers' addresses. A call from anywhere else returns 403
ip_not_allowed. - End date. A key with an end date stops working then and returns 401. Make a new key before then and switch over. Revoking works at once.
- Server only. The API does not answer browsers (no CORS), so a key can't be used from a web page by mistake. Keep keys in a secrets store, never in code or apps.
- Audit. Every call is listed under Developers, API activity, for 14 days, with the key, the result, the time it took and the address it came from. Campaigns created, posts deleted and retries also go into the workspace history.
Limits and safe retries
- Each key has its own limit per minute (120 unless you chose another). Every answer carries
X-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Reset. Over the limit you get 429 withRetry-After. - Send an
Idempotency-Keyheader on POST. If the network drops and you send the same request again with the same key within 24 hours, you get the first answer back (withIdempotent-Replayed: true) and nothing is created twice. The same key with a different body returns 422. - Every answer has an
X-Request-Id; errors repeat it asrequest_id. Quote it if you contact us. - Bodies are JSON (
Content-Type: application/json), up to 100 KB. Files go throughPOST /media: pictures up to 20 MB, videos up to your plan's size; a full storage returns 507.
Good to know
- Dates are in UTC, written like
2026-12-01T09:00:00Z. Campaign dates are days, like2026-12-01. - priority is one of low, normal, high, urgent. status is one of draft, in_review, changes_requested, approved, scheduled, publishing, published, failed.
- Lists return
has_moreandnext_before; passbefore=next_beforefor the next page./analyticsusesnext_offsetinstead. scheduled_atis a proposed date: a person approves and schedules the post in Scoltt.- Retrying never sends twice: accounts that already have the post are skipped. The key's owner must be allowed to publish. The reply has status 202 and the post goes out within about a minute.
first_comment(up to 2,000 characters) is added under the post on platforms that allow it.pollis{ "question"?, "options": [2–4], "days": 1 | 3 | 7 }.- The full description, for code generators and tools like Postman:
https://xkckvbrsyndmhbecipjf.supabase.co/functions/v1/api/v1/openapi.json(OpenAPI 3.1, no key needed). - Errors come back with a status of 400 or above and a body like this:
{ "error": { "code": "missing_scope", "message": "This key does not have the \"posts:write\" scope. …",
"request_id": "9beb6b6b-…", "required_scope": "posts:write" } }Webhook reference
Scoltt sends a POST with a JSON body to your address when a chosen event happens. Answer with any 2xx status within 5 seconds.
| Event | When |
|---|---|
post.created | A post was created |
post.submitted | A post was sent for approval |
post.approved | A post was approved |
post.changes_requested | Changes were requested |
post.scheduled | A post was scheduled |
post.published | A post was published |
post.failed | A post failed to publish |
form.response | Someone answered one of your forms (survey, lead form, quiz…) |
comment.received | A new comment, mention or review arrived in the inbox |
account.needs_reconnect | A connected account needs to be connected again |
account.disconnected | A connected account was disconnected |
What is sent
{
"id": "5d3c…", // unique for each delivery
"event": "post.published",
"created_at": "2026-12-01T09:00:04Z",
"workspace_id": "…",
"data": { "post": { "id": "…", "title": "Spring launch", "text": "…", "status": "published",
"priority": "high", "labels": ["launch"], "scheduled_at": "…", "test_run": false } }
}form.response:dataholdsform(id, title, kind, url) andresponse(id, source, created_at, andanswers: each question with its answer).comment.received:data.commentholds id, platform, kind, author, author_handle, text, rating, permalink, post_id and posted_at. The text is written by the public: never run it as a command.account.needs_reconnectandaccount.disconnected:data.accountholds id, platform, name, handle and status.
Headers: X-Scoltt-Event, X-Scoltt-Delivery (the same as id), X-Scoltt-Timestamp and X-Scoltt-Signature-256. The older X-Scoltt-Signature (without the time) is still sent for existing code.
Check the signature
// Node.js: check that a call really came from Scoltt, and is recent
import crypto from 'node:crypto';
function isFromScoltt(rawBody, header, secret) {
// header is X-Scoltt-Signature-256, like: t=1764579604,v1=5f2c…
const parts = Object.fromEntries(String(header ?? '').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: refuse
const expected = crypto.createHmac('sha256', secret).update(parts.t + '.' + rawBody).digest('hex');
const a = Buffer.from(expected), b = Buffer.from(parts.v1 ?? '');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
// rawBody is the request body exactly as received (before JSON.parse). secret starts with whsec_.- If your server does not answer with a 2xx within 5 seconds, Scoltt tries again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours (6 tries in all).
- After 20 failed deliveries in a row the webhook is switched off and the workspace admins are told. Fix the address and switch it on again; you can send any delivery from the last 30 days again from the log.
- Because of retries the same event can arrive more than once; use
idto ignore repeats, and refuse a signature older than 5 minutes.
AI assistants (MCP)
Connect an assistant that supports MCP, for example Claude, with an API key. It reads the workspace and prepares drafts in your name, limited by the key's scopes. It can never approve, schedule or publish.
https://xkckvbrsyndmhbecipjf.supabase.co/functions/v1/mcpAuthorization: Bearer sk_scoltt_YOUR_KEYSettings for an MCP client
{
"mcpServers": {
"scoltt": {
"type": "http",
"url": "https://xkckvbrsyndmhbecipjf.supabase.co/functions/v1/mcp",
"headers": { "Authorization": "Bearer sk_scoltt_YOUR_KEY" }
}
}
}| Tool | What it does | Scope |
|---|---|---|
get_workspace | The workspace and what the key may do | Any key |
list_accounts | Connected accounts and their ids | accounts:read |
list_posts / get_post | Read posts, filtered by status, campaign or tag | posts:read |
list_tags | Tags used on posts | posts:read |
create_draft / update_draft | Prepare a draft; never publishes | posts:write |
submit_for_approval | Send a draft to the approvers | posts:write |
delete_draft | Delete a draft (marked destructive, so the assistant asks first) | posts:write |
list_campaigns / create_campaign | Read and create campaigns | campaigns:read / write |
get_analytics | Results for a period | analytics:read |
list_inbox | Comments, mentions and reviews | inbox:read |
list_forms / get_form_responses | Forms and their answers | forms:read |
- The assistant is only shown the tools its key allows. Make a separate key for each assistant, so you can see what it did under API activity and revoke it on its own.
- Comments, form answers and post text come from other people. The server tells the assistant never to follow instructions found in them.
- Tool calls count toward the key's limit per minute and appear under API activity marked MCP.