Lewati ke konten

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 · versi 1.0.0

Key

The brand and key behind a token.

GET/me

Show the brand and key behind the token

Jawaban

  • 200The brand, the key and its limits.Me
  • errorbentuk error di bawah, dengan kode yang tetap

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

Jawaban

  • 200Channels, oldest first.
  • errorbentuk error di bawah, dengan kode yang tetap

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

Jawaban

  • 200Labels by name.
  • errorbentuk error di bawah, dengan kode yang tetap

curl

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

GET/campaigns

List campaigns

Jawaban

  • 200Campaigns by name.
  • errorbentuk error di bawah, dengan kode yang tetap

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.

Parameter

FieldJenisKeterangan
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

FieldJenisKeterangan
filewajibstring (binary)
namestring

Jawaban

  • 201The new file, usually still processing.Media
  • errorbentuk error di bawah, dengan kode yang tetap

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

Parameter

FieldJenisKeterangan
id (path)wajibintegerMedia id.

Jawaban

  • 200The file.Media
  • errorbentuk error di bawah, dengan kode yang tetap

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.

Parameter

FieldJenisKeterangan
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

FieldJenisKeterangan
urlwajibstring (uri)
namestring

Jawaban

  • 202The import, queued or already done.MediaImport
  • errorbentuk error di bawah, dengan kode yang tetap

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

Parameter

FieldJenisKeterangan
id (path)wajibstringImport id (a ULID).

Jawaban

  • 200The import.MediaImport
  • errorbentuk error di bawah, dengan kode yang tetap

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

Parameter

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

Jawaban

  • 200One page of posts.
  • errorbentuk error di bawah, dengan kode yang tetap

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.

Parameter

FieldJenisKeterangan
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

FieldJenisKeterangan
captionstringThe text every channel uses unless it has its own caption.
mediaarray of objectFiles for every channel, in order.
media[].idwajibintegerA 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_idwajibintegerA channel id from GET /channels.
targets[].typewajibstringOne 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.
intentwajibstringqueue 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.

Jawaban

  • 201The new post.Post
  • errorbentuk error di bawah, dengan kode yang tetap

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

Parameter

FieldJenisKeterangan
id (path)wajibintegerPost id.

Jawaban

  • 200The post.Post
  • errorbentuk error di bawah, dengan kode yang tetap

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).

Parameter

FieldJenisKeterangan
id (path)wajibintegerPost id.

Body

FieldJenisKeterangan
versioninteger
captionstringThe text every channel uses unless it has its own caption.
mediaarray of objectFiles for every channel, in order.
media[].idwajibintegerA 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_idwajibintegerA channel id from GET /channels.
targets[].typewajibstringOne 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.
intentwajibstringqueue 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.

Jawaban

  • 200The post after the change.Post
  • errorbentuk error di bawah, dengan kode yang tetap

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.

Parameter

FieldJenisKeterangan
id (path)wajibintegerPost id.

Jawaban

  • 204Deleted.
  • errorbentuk error di bawah, dengan kode yang tetap

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.

Parameter

FieldJenisKeterangan
id (path)wajibintegerPost id.

Jawaban

  • 200Numbers per target.PostInsights
  • errorbentuk error di bawah, dengan kode yang tetap

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.

Parameter

FieldJenisKeterangan
id (path)wajibintegerChannel 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.

Jawaban

  • 200Numbers per day.ChannelInsights
  • errorbentuk error di bawah, dengan kode yang tetap

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

Jawaban

  • 200The OpenAPI 3.1 document.

curl

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

Event webhook

Setiap pengiriman membungkus datanya dalam amplop di bawah (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

Kode error

Setiap error dijawab dengan bentuk yang sama; tanggapi 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

Objek

Error

FieldJenisKeterangan
errorwajibobject
error.codewajibstringStable 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.messagewajibstringEnglish 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

FieldJenisKeterangan
idwajibinteger
networkwajibstringfacebook · instagram · threads · linkedin · x
namewajibstring
handlewajibstring | null
avatar_urlwajibstring | null
profile_urlwajibstring | null
statuswajibstringactive, expiring and needs_permission still post.active · paused · needs_reconnect · locked · needs_permission · expiring · platform_disabled
status_reasonwajibstring | nullWhy the channel needs attention, as a stable code.
post_typeswajibarray of string
status_detailstring | nullThe network's own words. Only for Facebook, Instagram and Threads, with consent.

Label

FieldJenisKeterangan
idwajibinteger
namewajibstring
colorwajibstring

Campaign

FieldJenisKeterangan
idwajibinteger
namewajibstring
descriptionwajibstring | null
starts_onwajibstring | null (date)
ends_onwajibstring | null (date)

Media

FieldJenisKeterangan
idwajibinteger
namewajibstring
kindwajibstringimage · gif · video · pdf
mimewajibstring
size_byteswajibinteger
widthwajibinteger | null
heightwajibinteger | null
duration_secondswajibnumber | null
statuswajibstringprocessing · ready · failed · missing
failure_reasonwajibstring | null
created_atwajibstring | null (date-time)UTC, ISO 8601.

MediaImport

FieldJenisKeterangan
idwajibstringA ULID.
statuswajibstringqueued · running · done · failed · cancelled
media_idwajibinteger | null
failurewajibstring | nullWhy the import failed, as a stable code such as too_large or not_a_file.

ChannelInsights

FieldJenisKeterangan
channel_idwajibinteger
networkwajibstringfacebook · instagram · threads
periodwajibobject
period.fromwajibstring (date)
period.untilwajibstring (date)
period.timezonewajibstring
dayswajibarray of object
days[].datewajibstring (date)
days[].followerswajibinteger | null
days[].viewswajibinteger | null
days[].reachwajibinteger | null
days[].interactionswajibinteger | null
days[].metricswajibobject
audiencewajibobject | nullThe latest audience breakdown, when the network shares one.

MediaRef

FieldJenisKeterangan
idwajibinteger
alt_textwajibstring | null

Post

FieldJenisKeterangan
idwajibinteger
statuswajibstringdraft · in_review · approved · scheduled · rejected
review_stagewajibstring | nullWhich approval the post waits for while in_review.internal · client
sourcewajibstringcomposer · rss · csv · api · ai · ai_clips
captionwajibstring | null
mediawajibarray of MediaRef
targetswajibarray of PostTarget
hidden_targetswajibintegerTargets on YouTube or TikTok, which the API never shows.
label_idswajibarray of integer
campaign_idwajibinteger | null
watermarkwajibobject | null
watermark.namestring | null
watermark.kindstring | null
content_versionwajibintegerGoes up whenever the content changes; send it back as version when you change the post.
timezonewajibstring
app_urlwajibstring (uri)
created_atwajibstring | null (date-time)UTC, ISO 8601.
updated_atwajibstring | null (date-time)UTC, ISO 8601.

PostTarget

FieldJenisKeterangan
channel_idwajibinteger
networkwajibstringfacebook · instagram · threads · linkedin · x
typewajibstring
captionwajibstring | nullOwn caption for this channel; null follows the post caption.
own_mediawajibboolean
mediawajibarray of MediaRef
optionswajibobject
statuswajibstringpending · queued · publishing · processing · published · failed · uncertain · missed · cancelled · deleted
scheduled_atwajibstring | null (date-time)UTC, ISO 8601.
published_atwajibstring | null (date-time)UTC, ISO 8601.
failure_codewajibstring | null
failure_messagewajibstring | 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

FieldJenisKeterangan
captionstringThe text every channel uses unless it has its own caption.
mediaarray of objectFiles for every channel, in order.
media[].idwajibintegerA 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_idwajibintegerA channel id from GET /channels.
targets[].typewajibstringOne 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.
intentwajibstringqueue 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

FieldJenisKeterangan
post_idwajibinteger
targetswajibarray of object
targets[].channel_idwajibinteger
targets[].networkwajibstringfacebook · instagram · threads
targets[].viewswajibinteger | null
targets[].reachwajibinteger | null
targets[].interactionswajibinteger | null
targets[].metricswajibobject
targets[].read_atwajibstring | null (date-time)UTC, ISO 8601.

WebhookEnvelope

FieldJenisKeterangan
idwajibstringThe event id, the same for every webhook that gets this event.
eventwajibstring
occurred_atwajibstring (date-time)UTC. Deliveries may arrive out of order; use this to order them.
brandwajibobject
brand.idwajibinteger
brand.slugwajibstring
brand.namewajibstring
datawajibobject

Comment

FieldJenisKeterangan
idwajibinteger
channel_idwajibinteger
networkwajibstringfacebook · instagram · threads
external_idwajibstring
parent_external_idwajibstring | null
author_namewajibstring | null
textwajibstring | null
commented_atwajibstring | null (date-time)UTC, ISO 8601.
postwajibobject
post.idwajibinteger | nullOur post id when the post went out from this app.
post.external_idwajibstring | null
post.urlwajibstring | null

Me

FieldJenisKeterangan
brandwajibobject
brand.idwajibinteger
brand.slugwajibstring
brand.namewajibstring
brand.timezonewajibstringIANA time zone the brand plans in, for example Asia/Jakarta.
keywajibobject
key.namewajibstring
key.prefixwajibstringThe first 12 characters of the token.
key.rolewajibstringeditor · contributor
key.scopeswajibarray of string
key.expires_atwajibstring | null (date-time)UTC, ISO 8601.
key.meta_consentwajibbooleanWhether network data of Facebook, Instagram and Threads may be shared with this key.
limitswajibobject
limits.requests_per_minutewajibinteger
limits.max_upload_byteswajibinteger