PostLoom API

Schedule posts, upload media and read results from your own platform. The API is a JSON REST API at https://social.klixsoft.com/api/v1. Webhooks tell your system when posts are published or fail.

Authentication

Create a key in Settings → Developers of your workspace. Send it in the Authorization header (or as X-API-Key: sap_...). A key belongs to one workspace and acts as the person who created it, limited to the permissions (scopes) you chose. Keep keys on your server; never put them in browser or mobile code.

curl https://social.klixsoft.com/api/v1/me \
  -H "Authorization: Bearer sap_your_key_here"
ScopeAllows
accounts:readRead connected social accounts
media:readRead media
media:writeUpload and delete media
posts:readRead posts and their results
posts:writeCreate, edit and delete posts (drafts)
posts:publishSchedule and publish posts
webhooks:manageManage webhook endpoints
inbox:readRead inbox conversations and messages
inbox:writeReply to conversations and change their status
automations:manageManage auto-reply rules and settings
analytics:readRead analytics: post engagement and follower counts

Errors and limits

Errors use HTTP status codes and a JSON body:

{ "error": { "code": "VALIDATION", "message": "Select at least one account", "details": { "issues": [...] } } }
  • Success: 200, or 201 when a request creates something (POST /posts, /media, /webhooks, /conversations/<id>/messages).
  • 401 missing or revoked key · 403 missing scope · 404 not found · 409 conflict · 422 invalid input · 402 plan limit reached (PLAN_LIMIT) · 429 too many requests.
  • 120 requests per minute per key (60 for creating and changing posts).
  • Idempotency: send an Idempotency-Key header (any unique string, e.g. a UUID) with POST /posts and POST /media. Retrying with the same key and body within 24 hours returns the first response instead of creating a duplicate.
  • Times are ISO 8601 with an offset, e.g. 2026-11-02T09:30:00+01:00. Responses are in UTC.

Endpoints

All paths are relative to https://social.klixsoft.com/api/v1.

MethodPathScopeDescription
GET/me—Workspace, plan, limits and the key’s scopes
GET/accountsaccounts:readConnected social accounts
GET/mediamedia:readList media (query: folderId, q, kind, status, page)
POST/mediamedia:writeStart an upload; returns a presigned URL
POST/media/{id}/completemedia:writeFinish an upload and process it
GET/media/{id}media:readMedia details and processing status
DELETE/media/{id}media:writeDelete a file (not used by a post)
GET/postsposts:readList posts (query: from, to, status, externalId, limit)
POST/postsposts:writeCreate a draft, schedule or publish now
POST/posts/validateposts:writeCheck a post against each network’s rules without saving
GET/posts/{id}posts:readPost with per-account status, URL and error
PUT/posts/{id}posts:writeReplace a post that has not been published
DELETE/posts/{id}posts:writeDelete a post
POST/posts/{id}/cancelposts:writeCancel a scheduled post
POST/posts/{id}/retryposts:publishRetry the accounts that failed
GET/conversationsinbox:readInbox conversations (query: status, channelId, assignee, kind, q, before)
GET/conversations/{id}inbox:readOne conversation: contact, contact details (email, phone, profile, the same person on other channels) and reply window
PATCH/conversations/{id}inbox:writeChange status (open, pending, closed) or assignee
GET/conversations/{id}/messagesinbox:readMessages, newest first (query: before)
POST/conversations/{id}/messagesinbox:writeReply: body, mediaIds, or an internal note
PATCH/contacts/{id}inbox:writeSet a contact’s name, email, phone or notes (email and phone link the person across channels)
PUT/messages/{id}/hiddeninbox:writeHide a customer’s comment on Facebook, Instagram or YouTube, or show it again ({ "hidden": true | false })
GET/auto-repliesinbox:readAuto-reply rules in the order they are checked, and the settings
POST/auto-repliesautomations:manageCreate a rule (added last)
PUT/auto-replies/{id}automations:manageReplace a rule
DELETE/auto-replies/{id}automations:manageDelete a rule
PUT/auto-replies/orderautomations:manageSet the order: { "ids": [...] }, first is checked first
PATCH/auto-replies/settingsautomations:manageOn/off, per-person limit and pause after a team reply (minutes)
POST/auto-replies/testinbox:readWhich rule would answer a text, and what it would send (sends nothing)
GET/auto-replies/activityinbox:readWhat the rules did recently, or why they skipped
POST/ai/captionsposts:writeThree caption options for a topic (topic, platforms, tone, length, hashtags, emojis, language). Uses one AI credit
GET/analytics?from=&to=&platform=&accountIds=analytics:readEngagement totals vs the previous period, daily series, top posts, followers per account
GET/webhookswebhooks:manageList webhook endpoints
POST/webhookswebhooks:manageAdd an endpoint; returns its signing secret once
PATCH/webhooks/{id}webhooks:manageChange url, events or description; turn on/off (isActive)
DELETE/webhooks/{id}webhooks:manageRemove an endpoint

Publishing a post

Get your account ids from GET /accounts, then create the post. action is draft, schedule (with scheduledAt) or publish_now. Without the posts:publish scope, or when the workspace requires approval, the post waits for approval in the app. Use externalId to store your own id for the post.

curl -X POST https://social.klixsoft.com/api/v1/posts \
  -H "Authorization: Bearer sap_your_key_here" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6f1c2a8e-order-1234" \
  -d '{
    "externalId": "order-1234",
    "caption": "Our autumn menu is here!",
    "mediaIds": ["<media id>"],
    "targets": [
      { "socialAccountId": "<facebook page id>" },
      { "socialAccountId": "<instagram id>", "captionOverride": "Autumn menu 🍂 #coffee" }
    ],
    "action": "schedule",
    "scheduledAt": "2026-11-02T09:30:00+01:00"
  }'

The response is the post. Each entry in targets has its own status (scheduled, publishing, published, failed…), platformUrl once published and lastError when it failed. Poll GET /posts/{id} or use webhooks.

Per-network options

  • Instagram: "options": { "instagramType": "story" } for a story, "feed_story" for the feed and a story in one request (default: feed post, carousel or reel). With feed_story the post gets two targets for that account, a feed one and a story one, each with its own status and URL.
  • TikTok: "options": { "tiktokPrivacy": "PUBLIC_TO_EVERYONE" } (required), plus tiktokDisableComment, tiktokDisableDuet, tiktokDisableStitch.
  • Facebook / LinkedIn: "options": { "link": "https://..." } to share a link.
  • YouTube (one video): "options": { "youtubeTitle": "My video", "youtubePrivacy": "public", "youtubeMadeForKids": false }. The caption is the description. Optional: youtubeShort, youtubeTags (comma separated), youtubeCategoryId, youtubePlaylistId, youtubeThumbnailMediaId (an image from your media), youtubeNotifySubscribers.
  • Bluesky: altText for images. Threads needs no options.

Uploading media

Uploads go straight to storage in three steps:

# 1. Ask for an upload URL
curl -X POST https://social.klixsoft.com/api/v1/media -H "Authorization: Bearer sap_..." -H "Content-Type: application/json" \
  -d '{ "fileName": "menu.jpg", "mime": "image/jpeg", "size": 482113 }'
# → { "media": { "id": "...", "status": "uploading" }, "uploadUrl": "https://...", "headers": { "Content-Type": "image/jpeg" } }

# 2. Upload the file to uploadUrl with those headers
curl -X PUT "<uploadUrl>" -H "Content-Type: image/jpeg" --data-binary @menu.jpg

# 3. Tell us it is done, then wait until status is "ready"
curl -X POST https://social.klixsoft.com/api/v1/media/<id>/complete -H "Authorization: Bearer sap_..."
curl https://social.klixsoft.com/api/v1/media/<id> -H "Authorization: Bearer sap_..."

Images: JPEG, PNG, WebP. Videos: MP4, MOV, WebM. Upload URLs expire after 15 minutes; send the exact Content-Type and file size you declared.

Inbox contacts

GET /conversations/{id} returns the person in contact and more in contactDetails:

"contactDetails": {
  "email": "jane@example.com",          // added by your team or with PATCH /contacts/{id}
  "phone": "+977 981-2345678",          // added by your team; Meta never shares it for Messenger/Instagram
  "profile": { "followers": 2380, "verified": false, "followsYou": true },   // Instagram
  "profileSyncedAt": "2026-10-16T09:12:00Z",
  "linked": [                           // the same person on your other channels
    { "contactId": "…", "channelType": "telegram", "name": "Jane", "username": null,
      "conversationId": "…", "matchedBy": "phone" }
  ]
}

People are linked when their email matches, or their phone numbers end in the same 9 digits (so +977 981-2345678 and 9779812345678 match). Set them with:

curl -X PATCH https://social.klixsoft.com/api/v1/contacts/<contactId> -H "Authorization: Bearer sap_..." -H "Content-Type: application/json"   -d '{ "email": "jane@example.com", "phone": "+977 981-2345678" }'

Webhooks

Add an endpoint (an HTTPS URL on your server) in Settings → Developers or with POST /webhooks. We send a POST with a JSON body for each event you subscribe to. Create one with { "url": "https://...", "events": ["post.published", "post.failed"] }; the response contains the signing secret, shown only once.

EventWhen
post.publishedEvery account of a post was published
post.partially_failedSome accounts were published, some failed
post.failedNo account could be published
account.expiredA connected account must be reconnected
media.ready / media.failedAn upload finished processing
message.receivedA new message arrived in the inbox
POST https://your-server.example/webhooks/postora
X-Webhook-Id: 3b0c...           (the event id: the same on retries and re-sends; use it to ignore duplicates)
X-Webhook-Event: post.published
X-Webhook-Signature: t=1793000000,v1=5f2b...

{ "id": "3b0c...", "type": "post.published", "createdAt": "2026-11-02T08:30:04Z",
  "workspaceId": "...", "data": { "post": { "id": "...", "externalId": "order-1234", "status": "published", "targets": [...] } } }

Verify the signature: compute HMAC-SHA256 of `${t}.${rawBody}` with your endpoint’s signing secret and compare it with v1. Reject requests where t is more than 5 minutes old.

import crypto from 'node:crypto';

function verify(rawBody, header, secret) {
  const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
  const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
  return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}

Answer with any 2xx status within 10 seconds. Failed deliveries are retried with increasing delays for about a day; an endpoint that keeps failing is turned off and the workspace owner is emailed.

Auto-reply rules

Rules answer new messages and comments without a person. For each one, rules are checked in order and the first match runs. A rule has:

  • scope: messages, comments or both.
  • match: any_words, all_words, exact, starts_with (with keywords), any_message or first_message. Capital letters and accents are ignored; words match whole words only.
  • channelIds (empty = all) and, for comments, postIds (platform post ids; empty = all posts).
  • actions: reply, publicReply, privateReply (lists of 1–3 versions, one picked at random; {first_name}, {name}, {business_name} are filled in), hide, assigneeId, close.
curl -X POST https://social.klixsoft.com/api/v1/auto-replies -H "Authorization: Bearer sap_..." -H "Content-Type: application/json" -d '{
  "name": "Price campaign",
  "scope": "comments",
  "match": "any_words",
  "keywords": ["price", "how much"],
  "postIds": ["17890012345678901"],
  "actions": { "publicReply": ["Sent you a DM 📩"], "privateReply": ["Hi {first_name}! Prices: …"] }
}'

Private replies work on Facebook and Instagram (once per comment, within 7 days); hiding works on Facebook, Instagram and YouTube. A rule answers the same person at most once per personCooldownMinutes (default 12 hours) and stays quiet for pauseMinutes (default 60) after a team member replied. Automatic messages carry "isAutoReply": true and an author of "Auto-reply · rule name".

What changed

  • November 2026. Auto-reply rules for messages and comments (/auto-replies, new scope automations:manage) and hiding comments (PUT /messages/{id}/hidden). Messages include isAutoReply and hiddenAt.
  • October 2026. Requests that create something answer 201 Created (they answered 200). Keys are also accepted in an X-API-Key header. Unknown endpoints answer a JSON 404. Instagram "instagramType": "feed_story" posts to the feed and a story in one target. Conversations include contactDetails; new PATCH /contacts/{id}. Links in webhooks and emails point to /portal/<workspace>/… (old /o/… links still redirect).