Skip to main content

Posts API

The Posts API lets you create and submit posts to one or more social media platforms through a single API call. You can publish immediately or schedule posts for a future time.

Create a Post

Submit a new post for publishing.

Authentication

This endpoint uses API key authentication. Include your API key in the soku-api-key header. An active Soku subscription (trialing or active) is required.

Headers

Rate Limit

30 requests per 60 seconds, in addition to the global tier limit. See Rate Limits.

Request Body

The request body is a JSON object with the following top-level fields:

Post Object

Content Object

Platform Targets

Each element in the platform array specifies a destination for the post. There are two formats: String format (single account): Use a plain string when you have only one connected account for a platform, or to target the default account.
Object format (multi-account): Use an object when you need to target a specific account for a platform. The accountId field is required when you have multiple accounts connected for the same platform.
You can mix string and object formats in the same platform array. Use objects only where you need to specify an accountId.

Response

Status: 201 Created

Examples

Publish a text post immediately

Publish a video post to specific accounts

Publish an image post with multiple images

Schedule a post for later

Publish with an idempotency key

Publish a video as an Instagram trial reel

When trial_reel is true, your Instagram Reel is published with limited visibility. It is shown to a small audience first so you can see how it performs before sharing it with all of your followers. This flag only applies to video posts targeting Instagram and is ignored for other platforms and non-video content.

Publish and trigger automation workflows

When enableRepurposing is true, Soku publishes the post and also feeds it into your configured automation workflows. This means your repost and repurpose rules will apply to this post, just as they would for content detected organically on the source platform. By default, posts created through the API or dashboard do not trigger automations.

Error Responses

Example error response:
Ensure all target platforms are connected in your Soku dashboard before making API calls. You can connect platforms in Settings > Integrations.

Idempotency

The Idempotency-Key header prevents duplicate post submissions when retrying requests.
  • Include an Idempotency-Key header with a unique string value (for example, a UUID) on POST /v1/posts requests.
  • If the header is omitted, Soku auto-derives a key from your user ID and a hash of the request payload.
  • If you send the same idempotency key with the same request body, the API returns the original cached response without creating a duplicate post.
  • If you send the same idempotency key with a different request body, the API returns a 409 error with code idempotency_conflict.

Next Steps