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.

Example
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

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

Publish or schedule explicitly

Example
# 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.

Common API responses
HTTPNext step
401Check the bearer token, expiry and revocation.
403Check account ownership, active Plus/add-on and usable destination access. An inactive add-on returns addon_required.
409Check idempotency conflicts or an operation still running.
412 / 428Retrieve and send the current quoted ETag.
429Wait for Retry-After before retrying.
5xxRetain 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.

REST routes and MCP tools
MethodRouteMCP 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}/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 an upload of a prepared JPEG or unchanged MP4.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.