DEVELOPER GUIDE
REST API reference and publishing workflow
Create drafts, check them, and publish or schedule with safe retries.
Base URL and discovery
Base URL: https://app.crickets.social/api/v1. Authenticate with Authorization: Bearer <token>. JSON writes use Content-Type: application/json. Resource routes use /workspaces/{workspace_id}. Get the ID from GET /workspaces.
curl 'https://app.crickets.social/api/v1/workspaces' \
-H "Authorization: Bearer $CRICKETS_API_TOKEN"
# Substitute the returned ID.
BASE='https://app.crickets.social/api/v1/workspaces/WORKSPACE_ID'
curl "$BASE/accounts" -H "Authorization: Bearer $CRICKETS_API_TOKEN"
curl "$BASE/capabilities" -H "Authorization: Bearer $CRICKETS_API_TOKEN"Download the current OpenAPI specification for complete input/output schemas. List results use data.items and data.next_cursor. Failures contain error.code, error.message and optional field details; responses include a non-secret request_id.
Create and validate a draft
curl "$BASE/posts" -X POST \
-H "Authorization: Bearer $CRICKETS_API_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: my-draft-001' \
-d '{"text":"A small update.","destinations":[{"account_id":"ACCOUNT_ID"}]}'
# Preflight checks readiness without saving or reserving allowance.
curl "$BASE/posts/validate" -X POST \
-H "Authorization: Bearer $CRICKETS_API_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"text":"A small update.","destinations":[{"account_id":"ACCOUNT_ID"}]}'Creating always saves a draft. Destination text, media_ids and options can override shared content. For X threads, put the first post in destination text and subsequent replies in options.thread, an ordered array of up to five text strings. Attachments apply to the first post. Each thread consumes one X allowance slot per selected X account. Account responses include x_subscription_type, x_subscription_checked_at and x_subscription_error; preflight uses these cached results. Publication rechecks subscriptions for longer text. Post responses include confirmed thread_publications with IDs, URLs and publication times. Incomplete or uncertain threads require manual review and cannot be retried as a whole. For PATCH, omitted fields stay unchanged; a supplied destinations array replaces the list. Retrieve the post and save its current ETag before edits or publication.
Platform options and Upload-Post
Use the account and capability responses to check each destination before composing. Facebook and Instagram connections through Upload-Post support Stories with destination options.facebookFormat or options.instagramFormat set to story. Attach exactly one image or video; Stories do not publish captions or first comments. Instagram Stories require an eligible Business account. Instagram and Threads accept mixed image/video carousels of up to 10 and 20 items respectively. LinkedIn accepts one document with options.documentTitle (1–400 UTF-16 units). Supported MIME types and limits are returned by get_capabilities. Use options.firstComment (up to 2,000 UTF-16 units) on Facebook, Instagram feed/Reels, LinkedIn, Threads or TikTok. TikTok needs the comments capability, granted by reconnecting. Provider-managed comment warnings never trigger a second publication. Analytics availability is unchanged. Pinterest and Threads connections support available follower and post statistics. A connected account does not establish access to an unsupported feature.
For TikTok, supply photo media or one MP4 video and set destination options.tiktokPrivacy explicitly when needed: SELF_ONLY, PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS or FOLLOWER_OF_CREATOR. Use get_tiktok_settings or GET /api/v1/workspaces/{workspace_id}/accounts/{id}/tiktok-settings to retrieve allowed visibility values. The default is SELF_ONLY; the account must support the requested visibility. Photo destination text becomes the description (up to 4,000 UTF-16 units). Optional options.tiktokPhotoTitle is limited to 90 UTF-16 units; video captions remain limited to 2,200. Saved visibility is checked again before publishing, and unavailable choices require explicit correction. A confirmed private publication can have no public URL. Never derive a post link from a publishing receipt.
Pinterest requires one image or video and destination options.pinterestBoardId. Use list_pinterest_boards or GET /api/v1/workspaces/{workspace_id}/accounts/{id}/pinterest-boards to list available boards. Optional fields: pinterestTitle (100 characters), pinterestLink (http/https URL) and pinterestBoardName (display label). The destination text is the Pin description (800 characters). Threads uses up to 500 characters with 20 images or videos in one carousel. Optional fields: threadsReplyControl (everyone, accounts_you_follow, mentioned_only, followers_only) and threadsTopicTag (50 characters, no periods or ampersands). Pinterest statistics include separate nullable impressions, saves, pin_clicks and outbound_clicks; they are not views or likes. Missing counts stay null.
YouTube requires destination options.title, options.privacy (public, unlisted or private) and options.madeForKids. New posts default to Private. Validate the complete draft before an explicit publishing or scheduling action.
Publish or schedule explicitly
# This action publishes. Use it only when publication is intended.
# Use the current ETag exactly, including its quotation marks.
curl "$BASE/posts/POST_ID/publish" -X POST \
-H "Authorization: Bearer $CRICKETS_API_TOKEN" \
-H 'Content-Type: application/json' \
-H 'If-Match: "1"' \
-H 'Idempotency-Key: publish-POST_ID-001' \
-d '{}'Schedule with POST /posts/{id}/schedule; reschedule with PATCH /posts/{id}/reschedule. Both require a current If-Match, stable Idempotency-Key, and scheduled_at as an ISO instant at least 30 seconds in the future. An optional IANA timezone controls display.
Poll the post’s destination outcomes after an accepted action. 202 means accepted, not published. Conditions are checked again at publication. Uncertain retry requires checked_platform:true after reviewing the platform. Locked published/publishing or uncertain history cannot be edited or deleted.
Revisions, retries and limits
An idempotency key identifies one intended command. Use a unique key for each create, duplicate, publish, schedule, reschedule, cancel or retry command. Keep the same key when resending that command after a timeout.
Identical retries return the stored result for 24 hours. Different input with the same key returns 409. If work is still running, retry later with the same key.
The ETag identifies the post’s revision. After a 412 revision conflict, retrieve the current post and ETag before deciding how to apply your change. Missing or invalid revision preconditions return 428. Do not automatically overwrite another editor’s work.
REST and MCP share limits of 60 requests per credential and 180 per user per minute. Check RateLimit-Limit, RateLimit-Remaining and Retry-After.
List endpoints return 50 items by default and allow up to 100. Use the returned cursor to read the next page. Brand and platform filters narrow results together; brand_id=none selects ungrouped items.
| HTTP | Next step |
|---|---|
| 401 | Check the bearer token, expiry and revocation. |
| 403 | Check account ownership, active Studio and usable destination access. Inactive Studio returns addon_required (the retained API error code). |
| 409 | Check idempotency conflicts or an operation still running. |
| 412 / 428 | Retrieve and send the current quoted ETag. |
| 429 | Wait for Retry-After before retrying. |
| 5xx | Retain the request ID and retry safely. Verify uncertain publication before resending. |
Operation reference
Routes below are relative to /api/v1. Parameters in braces come from returned resource IDs. Use the matching MCP tool when connecting through an assistant.
| Method | Route | MCP tool |
|---|---|---|
| GET | /meView your Crickets identity and authorized workspaces. | get_identity |
| GET | /workspacesList workspaces this integration can access. | list_workspaces |
| GET | /workspaces/{workspace_id}/brandsList workspace brands. | list_brands |
| GET | /workspaces/{workspace_id}/accountsList connected accounts and actual capabilities. | list_accounts |
| GET | /workspaces/{workspace_id}/accounts/{id}/tiktok-settingsGet visibility values currently allowed for this connected TikTok account before composing or scheduling. Photo captions use destination text; options.tiktokPhotoTitle is optional and limited to 90 UTF-16 units. | get_tiktok_settings |
| GET | /workspaces/{workspace_id}/accounts/{id}/pinterest-boardsList available Pinterest boards for this connected account. Use the returned ID as options.pinterestBoardId. | list_pinterest_boards |
| GET | /workspaces/{workspace_id}/capabilitiesView platform limits, image settings and remaining quotas. | get_capabilities |
| GET | /workspaces/{workspace_id}/postsList posts with destination outcomes. | list_posts |
| GET | /workspaces/{workspace_id}/posts/{id}View a complete post and its delivery history. | get_post |
| POST | /workspaces/{workspace_id}/postsCreate a draft. Publishing is a separate action. | create_post |
| PATCH | /workspaces/{workspace_id}/posts/{id}Edit a draft or scheduled post. Omitted fields remain unchanged. | edit_post |
| DELETE | /workspaces/{workspace_id}/posts/{id}Delete an unpublished post. Social-network posts and uncertain history are preserved. | delete_post |
| POST | /workspaces/{workspace_id}/posts/{id}/publishPublish this post immediately to its selected destinations. | publish_post |
| POST | /workspaces/{workspace_id}/posts/{id}/scheduleSchedule a post. | schedule_post |
| PATCH | /workspaces/{workspace_id}/posts/{id}/rescheduleReschedule a post. | reschedule_post |
| POST | /workspaces/{workspace_id}/posts/{id}/cancelCancel a post. | cancel_post |
| POST | /workspaces/{workspace_id}/posts/{id}/duplicateDuplicate this post into a new draft. | duplicate_post |
| POST | /workspaces/{workspace_id}/destinations/{id}/retryRetry a failed delivery. Confirm platform review before retrying uncertain publication. | retry_delivery |
| POST | /workspaces/{workspace_id}/posts/validateCheck publishing readiness without saving, publishing or reserving allowance. | validate_post |
| GET | /workspaces/{workspace_id}/mediaList private media-library metadata. | list_media |
| GET | /workspaces/{workspace_id}/media/{id}View metadata for one media-library item. | get_media |
| GET | /workspaces/{workspace_id}/media/{id}/fileDownload private media using HTTP. MCP returns short-lived download instructions. | download_media |
| POST | /workspaces/{workspace_id}/media/uploadsStart a JPEG, PNG, unchanged MP4, or LinkedIn document (PDF, DOC, DOCX, PPT, PPTX; at most 100 MB/300 pages) upload. JPEG/PNG images are automatically oriented, resized without enlargement, stripped of metadata and converted to JPEG using the saved image settings; transparency becomes white. Image sources: at most 20 MB, 100 million pixels and 12,000 pixels per side. For MCP: PUT original binary bytes to part_url_template with upload_ticket as the Bearer token, then complete_media_upload or POST to complete_url. upload_url is only a base URL. | begin_media_upload |
| PUT | /workspaces/{workspace_id}/media/{id}/parts/{part}Upload a binary multipart part through HTTP. | Binary HTTP only |
| POST | /workspaces/{workspace_id}/media/{id}/completeValidate and complete an uploaded file. | complete_media_upload |
| PATCH | /workspaces/{workspace_id}/media/{id}Save an image alt description. | edit_media |
| DELETE | /workspaces/{workspace_id}/media/{id}Delete an unused library item. Attachments referenced by posts are protected. | delete_media |
| GET | /workspaces/{workspace_id}/accounts/{id}/statisticsRead recorded followers and engagement with freshness and coverage. | get_account_statistics |
| GET | /workspaces/{workspace_id}/posts/{id}/statisticsRead last-recorded cumulative engagement for each destination. | get_post_statistics |
| GET | /workspaces/{workspace_id}/statisticsRead account and post statistics with intersecting brand/platform filters. | get_workspace_statistics |
| POST | /workspaces/{workspace_id}/accounts/{id}/statistics/refreshRequest an analytics refresh when account permissions allow it. Wait five minutes before refreshing the same account again. | refresh_account_statistics |
| GET | /workspaces/{workspace_id}/webhooksList this integration’s webhooks. | list_webhooks |
| POST | /workspaces/{workspace_id}/webhooksCreate a signed webhook. Its signing secret is shown once. | create_webhook |
| PATCH | /workspaces/{workspace_id}/webhooks/{id}Update this integration’s webhook. | edit_webhook |
| DELETE | /workspaces/{workspace_id}/webhooks/{id}Delete this integration’s webhook and its delivery records. | delete_webhook |
| GET | /workspaces/{workspace_id}/webhooks/{id}/deliveriesInspect webhook delivery results without content or credentials. | list_webhook_deliveries |
| POST | /workspaces/{workspace_id}/webhooks/{id}/deliveries/{delivery_id}/replayReplay a failed event with the same event ID. | replay_webhook_delivery |
Read media upload instructions and webhook verification before implementing those flows. API & MCP access does not bypass any provider, storage, media, billing or 𝕏 publication limit.
Something unclear? Tell us what would help.