Skip to content

SocialKuy API

Create and read posts for one brand. Each key belongs to one brand and acts with its own role: posts from a Contributor key always go through approval. Times you send must carry an offset (for example 2026-11-02T09:00:00+07:00); times you get back are UTC. Errors always look like {"error": {"code": "...", "message": "...", "fields": {...}}}.

https://app.socialkuy.com/api/v1 · openapi.json · version 1.0.0

Key

The brand and key behind a token.

GET/me

Show the brand and key behind the token

Answers

  • 200The brand, the key and its limits.Me
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/me" \
  -H "Authorization: Bearer skuy_your_key"

Channels

Social accounts the brand posts to. YouTube and TikTok are never listed.

GET/channels

List the brand channels

Answers

  • 200Channels, oldest first.
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/channels" \
  -H "Authorization: Bearer skuy_your_key"

Library

Labels, campaigns and media files. Posts only take media ids: upload or import first, then wait until the file is ready.

GET/labels

List labels

Answers

  • 200Labels by name.
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/labels" \
  -H "Authorization: Bearer skuy_your_key"

GET/campaigns

List campaigns

Answers

  • 200Campaigns by name.
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/campaigns" \
  -H "Authorization: Bearer skuy_your_key"

POST/media

Upload a file

Sends one file as multipart/form-data. Larger files go through POST /media/imports. The file is processed after upload; use it in a scheduled post once GET /media/{id} says ready.

Parameters

FieldTypeAbout
Idempotency-Key (header)stringAny unique string up to 255 characters. Sending the same key with the same body within 24 hours returns the first successful answer again (with Idempotent-Replayed: true) instead of doing the work twice. Refusals are not remembered, so a request can be sent again with the same key once its cause is fixed.

Body

FieldTypeAbout
filerequiredstring (binary)
namestring

Answers

  • 201The new file, usually still processing.Media
  • errorthe error shape below, with a stable code

curl

curl -X POST "https://app.socialkuy.com/api/v1/media" \
  -H "Authorization: Bearer skuy_your_key" \
  -F "[email protected]"

GET/media/{id}

Show a file and its processing status

Parameters

FieldTypeAbout
id (path)requiredintegerMedia id.

Answers

  • 200The file.Media
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/media/{id}" \
  -H "Authorization: Bearer skuy_your_key"

POST/media/imports

Import a file from a URL

The file is downloaded in the background. Poll GET /media/imports/{id} until media_id is set, then GET /media/{id} until it is ready.

Parameters

FieldTypeAbout
Idempotency-Key (header)stringAny unique string up to 255 characters. Sending the same key with the same body within 24 hours returns the first successful answer again (with Idempotent-Replayed: true) instead of doing the work twice. Refusals are not remembered, so a request can be sent again with the same key once its cause is fixed.

Body

FieldTypeAbout
urlrequiredstring (uri)
namestring

Answers

  • 202The import, queued or already done.MediaImport
  • errorthe error shape below, with a stable code

curl

curl -X POST "https://app.socialkuy.com/api/v1/media/imports" \
  -H "Authorization: Bearer skuy_your_key" \
  -H "Content-Type: application/json" \
  -d '{}'

GET/media/imports/{id}

Show an import

Parameters

FieldTypeAbout
id (path)requiredstringImport id (a ULID).

Answers

  • 200The import.MediaImport
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/media/imports/{id}" \
  -H "Authorization: Bearer skuy_your_key"

Posts

Posts go through the same checks, approval, quota and queue as the app. A Contributor key only changes its own posts. Posts that also go to YouTube or TikTok can be read but not changed.

GET/posts

List posts, newest first

Parameters

FieldTypeAbout
status (query)stringdraft · in_review · approved · scheduled · rejected
limit (query)integer1 to 100, default 25.
cursor (query)stringnext_cursor from the previous page.

Answers

  • 200One page of posts.
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/posts" \
  -H "Authorization: Bearer skuy_your_key"

POST/posts

Create a post

Answers with the post as it now stands. status tells whether it is scheduled or waiting for approval (in_review with review_stage). Fails without creating anything with media_not_ready, quota_exceeded or queue_full.

Parameters

FieldTypeAbout
Idempotency-Key (header)stringAny unique string up to 255 characters. Sending the same key with the same body within 24 hours returns the first successful answer again (with Idempotent-Replayed: true) instead of doing the work twice. Refusals are not remembered, so a request can be sent again with the same key once its cause is fixed.

Body

FieldTypeAbout
captionstringThe text every channel uses unless it has its own caption.
mediaarray of objectFiles for every channel, in order.
media[].idrequiredintegerA media id from POST /media or a finished import.
media[].alt_textstringDescription for people who cannot see the image.
targetsarray of objectThe channels to post to, one entry each.
targets[].channel_idrequiredintegerA channel id from GET /channels.
targets[].typerequiredstringOne of the channel's post_types.
targets[].captionstring | null
targets[].own_mediaboolean
targets[].mediaarray of object
targets[].optionsobjectNetwork choices such as first_comment, link, title or thread.
intentrequiredstringqueue takes each channel's next free queue time.draft · schedule · queue · now
scheduled_atstring | null (date-time)Required for schedule; must carry an offset.
label_idsarray of integer
campaign_idinteger | null
watermarkstring | integerdefault (the brand's default preset, used when left out), none, or a preset id. On updates, leaving it out keeps the current one.

Answers

  • 201The new post.Post
  • errorthe error shape below, with a stable code

curl

curl -X POST "https://app.socialkuy.com/api/v1/posts" \
  -H "Authorization: Bearer skuy_your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "New on the menu: palm sugar latte.",
  "media": [
    {
      "id": 381
    }
  ],
  "targets": [
    {
      "channel_id": 12,
      "type": "feed"
    }
  ],
  "intent": "schedule",
  "scheduled_at": "2026-11-02T09:00:00+07:00"
}'

GET/posts/{id}

Show a post

Parameters

FieldTypeAbout
id (path)requiredintegerPost id.

Answers

  • 200The post.Post
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/posts/{id}" \
  -H "Authorization: Bearer skuy_your_key"

PATCH/posts/{id}

Change a post that has not started going out

Fields you send replace the current ones; fields you leave out stay. intent is required. Send version (the content_version you read) to refuse the change when someone else edited the post meanwhile (version_conflict).

Parameters

FieldTypeAbout
id (path)requiredintegerPost id.

Body

FieldTypeAbout
versioninteger
captionstringThe text every channel uses unless it has its own caption.
mediaarray of objectFiles for every channel, in order.
media[].idrequiredintegerA media id from POST /media or a finished import.
media[].alt_textstringDescription for people who cannot see the image.
targetsarray of objectThe channels to post to, one entry each.
targets[].channel_idrequiredintegerA channel id from GET /channels.
targets[].typerequiredstringOne of the channel's post_types.
targets[].captionstring | null
targets[].own_mediaboolean
targets[].mediaarray of object
targets[].optionsobjectNetwork choices such as first_comment, link, title or thread.
intentrequiredstringqueue takes each channel's next free queue time.draft · schedule · queue · now
scheduled_atstring | null (date-time)Required for schedule; must carry an offset.
label_idsarray of integer
campaign_idinteger | null
watermarkstring | integerdefault (the brand's default preset, used when left out), none, or a preset id. On updates, leaving it out keeps the current one.

Answers

  • 200The post after the change.Post
  • errorthe error shape below, with a stable code

curl

curl -X PATCH "https://app.socialkuy.com/api/v1/posts/{id}" \
  -H "Authorization: Bearer skuy_your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "New on the menu: palm sugar latte.",
  "media": [
    {
      "id": 381
    }
  ],
  "targets": [
    {
      "channel_id": 12,
      "type": "feed"
    }
  ],
  "intent": "schedule",
  "scheduled_at": "2026-11-02T09:00:00+07:00"
}'

DELETE/posts/{id}

Delete a post

Cancels what has not gone out and moves the post to the trash. Published posts stay on the networks.

Parameters

FieldTypeAbout
id (path)requiredintegerPost id.

Answers

  • 204Deleted.
  • errorthe error shape below, with a stable code

curl

curl -X DELETE "https://app.socialkuy.com/api/v1/posts/{id}" \
  -H "Authorization: Bearer skuy_your_key"

Analytics

Daily numbers of Facebook, Instagram and Threads channels, for keys created with consent to share that data.

GET/posts/{id}/insights

Latest numbers of a post

Only Facebook, Instagram and Threads targets, and only for keys created with consent to share their data.

Parameters

FieldTypeAbout
id (path)requiredintegerPost id.

Answers

  • 200Numbers per target.PostInsights
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/posts/{id}/insights" \
  -H "Authorization: Bearer skuy_your_key"

GET/analytics/channels/{id}

Daily numbers of one channel

Only Facebook, Instagram and Threads channels, and only for keys created with consent to share their data (consent_required otherwise; not_available for other networks). Days run in the brand time zone. Missing numbers are null, never 0. Numbers are never added up across days or networks.

Parameters

FieldTypeAbout
id (path)requiredintegerChannel id.
period (query)integerThe last 7, 30 or 90 days (default 30, bounded by the plan).7 · 30 · 90
month (query)stringA calendar month, YYYY-MM.
from (query)string (date)Start of a custom range, YYYY-MM-DD (needs to).
to (query)string (date)Last day of a custom range, YYYY-MM-DD.

Answers

  • 200Numbers per day.ChannelInsights
  • errorthe error shape below, with a stable code

curl

curl -X GET "https://app.socialkuy.com/api/v1/analytics/channels/{id}" \
  -H "Authorization: Bearer skuy_your_key"

Meta

This document.

GET/openapi.json

Download this OpenAPI document

Answers

  • 200The OpenAPI 3.1 document.

curl

curl -X GET "https://app.socialkuy.com/api/v1/openapi.json"

Webhook events

Every delivery wraps its data in the envelope below (WebhookEnvelope).

post.published

A post went out on one channel

Sent once per channel.

object

post.failed

A post failed on one channel

Sent when retries are over or the network refused. target.failure_code says why.

object

post.uncertain

A post may or may not have gone out

The connection dropped during the last step. Someone checks the network and decides in the app.

object

post.review_requested

A post waits for approval

stage is internal (the team) or client.

object

post.approved

A stage approved a post

The post may wait for the next stage; check post.status. A brand admin may skip the client stage (bypassed with a reason).

object

post.rejected

A reviewer asked for changes

The post is back to draft.

object

channel.needs_reconnect

A channel needs reconnecting

Posts to it wait until someone reconnects it in the app.

object

channel.reconnected

A channel works again

Sent after a reconnect fixed a channel that needed one.

object

comment.received

A new comment arrived

Facebook, Instagram and Threads only, and only to webhooks created with consent to share their data.

object

ping

Test event

Sent from "Send test event" in the app.

object

Error codes

Every error answers with the same shape; react to error.code.

  • unauthenticated
  • invalid_key
  • key_revoked
  • key_expired
  • api_disabled
  • account_suspended
  • plan_required
  • over_plan
  • insufficient_scope
  • forbidden
  • consent_required
  • not_found
  • method_not_allowed
  • payload_too_large
  • idempotency_conflict
  • idempotency_in_progress
  • post_not_editable
  • version_conflict
  • post_has_hidden_targets
  • series_post
  • validation_failed
  • media_not_ready
  • quota_exceeded
  • queue_full
  • not_available
  • rate_limited
  • server_error

Objects

Error

FieldTypeAbout
errorrequiredobject
error.coderequiredstringStable code for machines.unauthenticated · invalid_key · key_revoked · key_expired · api_disabled · account_suspended · plan_required · over_plan · insufficient_scope · forbidden · consent_required · not_found · method_not_allowed · payload_too_large · idempotency_conflict · idempotency_in_progress · post_not_editable · version_conflict · post_has_hidden_targets · series_post · validation_failed · media_not_ready · quota_exceeded · queue_full · not_available · rate_limited · server_error
error.messagerequiredstringEnglish text for people.
error.fieldsobjectOnly for validation_failed and the other 422 codes: messages per field, keyed by its path such as targets.0.type.

Channel

FieldTypeAbout
idrequiredinteger
networkrequiredstringfacebook · instagram · threads · linkedin · x
namerequiredstring
handlerequiredstring | null
avatar_urlrequiredstring | null
profile_urlrequiredstring | null
statusrequiredstringactive, expiring and needs_permission still post.active · paused · needs_reconnect · locked · needs_permission · expiring · platform_disabled
status_reasonrequiredstring | nullWhy the channel needs attention, as a stable code.
post_typesrequiredarray of string
status_detailstring | nullThe network's own words. Only for Facebook, Instagram and Threads, with consent.

Label

FieldTypeAbout
idrequiredinteger
namerequiredstring
colorrequiredstring

Campaign

FieldTypeAbout
idrequiredinteger
namerequiredstring
descriptionrequiredstring | null
starts_onrequiredstring | null (date)
ends_onrequiredstring | null (date)

Media

FieldTypeAbout
idrequiredinteger
namerequiredstring
kindrequiredstringimage · gif · video · pdf
mimerequiredstring
size_bytesrequiredinteger
widthrequiredinteger | null
heightrequiredinteger | null
duration_secondsrequirednumber | null
statusrequiredstringprocessing · ready · failed · missing
failure_reasonrequiredstring | null
created_atrequiredstring | null (date-time)UTC, ISO 8601.

MediaImport

FieldTypeAbout
idrequiredstringA ULID.
statusrequiredstringqueued · running · done · failed · cancelled
media_idrequiredinteger | null
failurerequiredstring | nullWhy the import failed, as a stable code such as too_large or not_a_file.

ChannelInsights

FieldTypeAbout
channel_idrequiredinteger
networkrequiredstringfacebook · instagram · threads
periodrequiredobject
period.fromrequiredstring (date)
period.untilrequiredstring (date)
period.timezonerequiredstring
daysrequiredarray of object
days[].daterequiredstring (date)
days[].followersrequiredinteger | null
days[].viewsrequiredinteger | null
days[].reachrequiredinteger | null
days[].interactionsrequiredinteger | null
days[].metricsrequiredobject
audiencerequiredobject | nullThe latest audience breakdown, when the network shares one.

MediaRef

FieldTypeAbout
idrequiredinteger
alt_textrequiredstring | null

Post

FieldTypeAbout
idrequiredinteger
statusrequiredstringdraft · in_review · approved · scheduled · rejected
review_stagerequiredstring | nullWhich approval the post waits for while in_review.internal · client
sourcerequiredstringcomposer · rss · csv · api · ai · ai_clips
captionrequiredstring | null
mediarequiredarray of MediaRef
targetsrequiredarray of PostTarget
hidden_targetsrequiredintegerTargets on YouTube or TikTok, which the API never shows.
label_idsrequiredarray of integer
campaign_idrequiredinteger | null
watermarkrequiredobject | null
watermark.namestring | null
watermark.kindstring | null
content_versionrequiredintegerGoes up whenever the content changes; send it back as version when you change the post.
timezonerequiredstring
app_urlrequiredstring (uri)
created_atrequiredstring | null (date-time)UTC, ISO 8601.
updated_atrequiredstring | null (date-time)UTC, ISO 8601.

PostTarget

FieldTypeAbout
channel_idrequiredinteger
networkrequiredstringfacebook · instagram · threads · linkedin · x
typerequiredstring
captionrequiredstring | nullOwn caption for this channel; null follows the post caption.
own_mediarequiredboolean
mediarequiredarray of MediaRef
optionsrequiredobject
statusrequiredstringpending · queued · publishing · processing · published · failed · uncertain · missed · cancelled · deleted
scheduled_atrequiredstring | null (date-time)UTC, ISO 8601.
published_atrequiredstring | null (date-time)UTC, ISO 8601.
failure_coderequiredstring | null
failure_messagerequiredstring | null
external_idstring | nullFacebook, Instagram and Threads only, with consent.
urlstring | nullFacebook, Instagram and Threads only, with consent.
failure_detailstring | nullThe network's own words. Facebook, Instagram and Threads only, with consent.

PostWrite

FieldTypeAbout
captionstringThe text every channel uses unless it has its own caption.
mediaarray of objectFiles for every channel, in order.
media[].idrequiredintegerA media id from POST /media or a finished import.
media[].alt_textstringDescription for people who cannot see the image.
targetsarray of objectThe channels to post to, one entry each.
targets[].channel_idrequiredintegerA channel id from GET /channels.
targets[].typerequiredstringOne of the channel's post_types.
targets[].captionstring | null
targets[].own_mediaboolean
targets[].mediaarray of object
targets[].optionsobjectNetwork choices such as first_comment, link, title or thread.
intentrequiredstringqueue takes each channel's next free queue time.draft · schedule · queue · now
scheduled_atstring | null (date-time)Required for schedule; must carry an offset.
label_idsarray of integer
campaign_idinteger | null
watermarkstring | integerdefault (the brand's default preset, used when left out), none, or a preset id. On updates, leaving it out keeps the current one.

PostInsights

FieldTypeAbout
post_idrequiredinteger
targetsrequiredarray of object
targets[].channel_idrequiredinteger
targets[].networkrequiredstringfacebook · instagram · threads
targets[].viewsrequiredinteger | null
targets[].reachrequiredinteger | null
targets[].interactionsrequiredinteger | null
targets[].metricsrequiredobject
targets[].read_atrequiredstring | null (date-time)UTC, ISO 8601.

WebhookEnvelope

FieldTypeAbout
idrequiredstringThe event id, the same for every webhook that gets this event.
eventrequiredstring
occurred_atrequiredstring (date-time)UTC. Deliveries may arrive out of order; use this to order them.
brandrequiredobject
brand.idrequiredinteger
brand.slugrequiredstring
brand.namerequiredstring
datarequiredobject

Comment

FieldTypeAbout
idrequiredinteger
channel_idrequiredinteger
networkrequiredstringfacebook · instagram · threads
external_idrequiredstring
parent_external_idrequiredstring | null
author_namerequiredstring | null
textrequiredstring | null
commented_atrequiredstring | null (date-time)UTC, ISO 8601.
postrequiredobject
post.idrequiredinteger | nullOur post id when the post went out from this app.
post.external_idrequiredstring | null
post.urlrequiredstring | null

Me

FieldTypeAbout
brandrequiredobject
brand.idrequiredinteger
brand.slugrequiredstring
brand.namerequiredstring
brand.timezonerequiredstringIANA time zone the brand plans in, for example Asia/Jakarta.
keyrequiredobject
key.namerequiredstring
key.prefixrequiredstringThe first 12 characters of the token.
key.rolerequiredstringeditor · contributor
key.scopesrequiredarray of string
key.expires_atrequiredstring | null (date-time)UTC, ISO 8601.
key.meta_consentrequiredbooleanWhether network data of Facebook, Instagram and Threads may be shared with this key.
limitsrequiredobject
limits.requests_per_minuterequiredinteger
limits.max_upload_bytesrequiredinteger