Skip to content

Contents API

The Contents API provides endpoints to create, schedule, upload media, inspect, and cancel social media publishing jobs.


MethodPathDescriptionRequired Scope
POST/v1/brand/contents/uploadsGenerate presigned PUT URL for image and video uploadspublishing:create or *
POST/v1/brand/contentsSubmit immediate or scheduled post (202 Accepted)publishing:create or *
GET/v1/brand/contentsList brand contents with pagination and status filterspublishing:read or *
GET/v1/brand/contents/{content_id}Retrieve content details and publish job outcomepublishing:read or *
DELETE/v1/brand/contents/{content_id}/cancelCancel a scheduled post before processing beginspublishing:delete or *

1. Media Upload Presigned URL (POST /v1/brand/contents/uploads)

Section titled “1. Media Upload Presigned URL (POST /v1/brand/contents/uploads)”

To attach media to posts, request a presigned upload URL and upload the binary directly to S3/R2 storage via HTTP PUT.

  • Images (Max 20MB, URL expiry 300s): image/jpeg, image/png, image/webp, image/gif
  • Videos (Max 500MB, URL expiry 600s): video/mp4, video/quicktime (.mov), video/webm
Terminal window
curl -X POST "https://api.ankk.app/v1/brand/contents/uploads" \
-H "Authorization: Bearer spk_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"filename": "launch-banner.png",
"content_type": "image/png",
"size": 1420500
}'
{
"upload_url": "https://storage.ankk.app/sns-posts/original/brand_.../launch-banner.png?X-Amz-Signature=...",
"asset_ref": "https://cdn.ankk.app/sns-posts/original/brand_.../launch-banner.png",
"method": "PUT",
"object_key": "sns-posts/original/brand_.../launch-banner.png",
"content_type": "image/png",
"size": 1420500,
"expires_in_seconds": 300
}
Terminal window
curl -X PUT "<upload_url>" \
-H "Content-Type: image/png" \
--data-binary "@/path/to/launch-banner.png"

2. Publish Content (POST /v1/brand/contents)

Section titled “2. Publish Content (POST /v1/brand/contents)”

Submit text along with the uploaded asset_ref to create a publishing job.

FieldTypeRequiredDescription
connection_idstringRequiredTarget SNS connection ID (Connections API)
idempotency_keystringRequiredUnique client-generated key preventing duplicate submissions
textstringOptionalPost body text
mediaarrayOptionalArray of media objects with url or asset_ref
scheduled_forstringOptionalISO 8601 timestamp for scheduling. Omit for immediate publish
thread_postsarrayOptionalAdditional posts for Threads conversation chaining
provider_settingsobjectOptionalPlatform-specific settings (e.g., YouTube category)
Terminal window
curl -X POST "https://api.ankk.app/v1/brand/contents" \
-H "Authorization: Bearer spk_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"connection_id": "conn_01jm8x9k2example",
"idempotency_key": "launch-2026-001",
"text": "Excited to launch our new product today! 🚀\nhttps://ankk.app",
"media": [
{
"url": "https://cdn.ankk.app/sns-posts/original/brand_.../launch-banner.png"
}
]
}'
{
"content_id": "content_01jm8za2example",
"status": "scheduled",
"publish_job_id": "job_01jm8za2jobexample",
"connection_id": "conn_01jm8x9k2example",
"idempotency_key": "launch-2026-001"
}

Terminal window
curl -X GET "https://api.ankk.app/v1/brand/contents?status=published&limit=20" \
-H "Authorization: Bearer spk_live_xxxxxxxx"

Get Content Details (GET /v1/brand/contents/{content_id})

Section titled “Get Content Details (GET /v1/brand/contents/{content_id})”
Terminal window
curl -X GET "https://api.ankk.app/v1/brand/contents/content_01jm8za2example" \
-H "Authorization: Bearer spk_live_xxxxxxxx"

4. Cancel Scheduled Post (DELETE /v1/brand/contents/{content_id}/cancel)

Section titled “4. Cancel Scheduled Post (DELETE /v1/brand/contents/{content_id}/cancel)”

Cancel a scheduled post before its execution begins.

Terminal window
curl -X DELETE "https://api.ankk.app/v1/brand/contents/content_01jm8za2example/cancel" \
-H "Authorization: Bearer spk_live_xxxxxxxx"