API reference
v1One predictable contract for accounts, posts, comments, and delivery events.
https://castrook.com/api/v1Requests and responses use JSON with snake_case fields. Every response includes x-request-id. Dates use ISO 8601 with an explicit timezone.
Endpoints
/accountsList accounts/accountsCreate a test account/accounts/{id}Disconnect account/accounts/{id}/publishing-optionsGet TikTok creator settings/postsList posts/postsCreate or schedule a post/posts/{id}Get post and targets/posts/{id}Cancel a pending post/commentsList comments/commentsReply to a comment/webhooksList endpoints/webhooksCreate an endpoint/webhooks/{id}Disable endpoint/deliveriesList webhook deliveries/logsList request logsDownload the complete OpenAPI specification for all schemas, response codes, and query parameters.
Create a post
POST /posts requires an Idempotency-Key header. A new post returns HTTP 202; an identical replay returns HTTP 200 and Idempotency-Replayed: true.
| Field | Type | Description |
|---|---|---|
text | string | Post caption. Maximum 5,000 characters; platform limits also apply. |
account_ids | string[] | One or more account IDs in the same workspace and mode. |
media | object · optional | { url, type }. HTTPS URL and video or image. Required for video-first platforms. |
scheduled_at | string · optional | ISO 8601 timestamp at least 5 seconds in the future, up to 1 year ahead. |
platform_options | object · optional | Platform-specific visibility, consent, and publishing choices |
{
"text": "Made to be shared.",
"account_ids": ["acc_instagram", "acc_youtube"],
"media": {
"url": "https://your-cdn.com/launch.mp4",
"type": "video"
},
"platform_options": {
"youtube": {
"privacy_status": "private",
"made_for_kids": false
}
}
}The post response
{
"data": {
"id": "pst_example",
"text": "Made to be shared.",
"status": "queued",
"mode": "test",
"scheduled_at": null,
"created_at": "2026-09-26T12:00:00.000Z",
"updated_at": "2026-09-26T12:00:00.000Z",
"targets": [
{
"account_id": "acc_instagram",
"platform": "instagram",
"status": "queued",
"attempts": 0
}
]
}
}Targets can include provider_post_id, url, or an error object when the platform provides them. A successful private post may have no public URL.
Pagination and filtering
List responses return data plus meta.next_cursor and meta.has_more. Pass the next cursor unchanged. Posts support status, platform, q, cursor, and limit filters.
{
"data": [],
"meta": { "next_cursor": null, "has_more": false }
}