Skip to content

Publish workspace posts

Use REST or an external MCP client such as Claude Code to manage drafts in your Benchmark workspace. You can upload a local file, attach it to a draft, and schedule the post for specific accounts.

Access

Use member OAuth for all Posts operations. REST returns 403 FORBIDDEN with reason MEMBER_AUTH_REQUIRED for a valid API key. See authentication. MCP checks tool availability before it runs an operation. A read-only MCP session has no mutate tool. An active workspace member can list social sets and accounts. Other operations also require Posts access. Scheduling requires a current writable Pro, Growth, or Scale plan and effective MCP write access, including when you use REST. All MCP mutations require write access. REST cancellation remains available after a plan downgrade if you still have Posts access. Posts operations cost zero credits. Research chat has its usual turn price.

Find your posts and accounts

Call whoami to check the workspace and mutationsEnabled. See MCP setup. Call list_operations with {"operation":"schedulePost"} to see the inputs and errors for that operation. For query and mutate, pass the operation name and its input object. REST mutations take the same input as a JSON body. REST reads use path or query parameters. Successful REST and MCP JSON operations return {"data": ...}.

MCP operationToolREST routeSuccess result inside data
listSocialSetsqueryGET /v1/publishing/social-setsitems with queue rules and revisions, plus nextCursor
listSocialAccountsqueryGET /v1/publishing/accountsitems with stored connection and publishing status, plus nextCursor
listPostsqueryGET /v1/publishing/postsPost summaries in update order and nextCursor
readPostqueryGET /v1/publishing/posts/{id}post and latestPublication
createPostmutatePOST /v1/publishing/posts/createpost with its ID and revision
updatePostmutatePOST /v1/publishing/posts/updatepost with its new revision
reservePostMediamutatePOST /v1/publishing/media/reserveasset with its ID and reservation state
createPostMediaUploadGrantmutatePOST /v1/publishing/media/upload-grantPUT grant with uploadUrl, requiredHeaders, issuedAt, and expiresAt
finalizePostMediamutatePOST /v1/publishing/media/finalizeasset with its saved state, usually verifying
readPostMediaqueryGET /v1/publishing/media/{assetId}asset with its current verification state
schedulePostmutatePOST /v1/publishing/posts/schedulepublication with time, mode, targets, and revision
cancelPostmutatePOST /v1/publishing/posts/cancelpublication with updated status and target states

Set listPosts.state to draft, scheduled, published, failed, or archived. Pass a set ID to filter by that set. Omit socialSetId to include all sets. Use GET /v1/publishing/posts?state=draft&socialSetId=null for unassigned drafts. In MCP, use JSON null. Lists default to 20 items and allow 1 to 25. Pass nextCursor to the same operation with the same filters until it is null.

readPost returns the latest publication attempt, which can be cancelled. Use post.activePublicationId to identify any active publication. For deleted content, post contains only id, status: "deleted", and deletedAt. The enclosing result has latestPublication: null.

Create a draft and upload a local file

  1. Call listSocialSets and listSocialAccounts. Select an active set and a connected account with publishing access.
  2. Call createPost with a new requestId, title, body, and destinations. Use an empty destinations array for a master caption only. Pass socialSetId and selectedAccountIds for your selected set and account.
  3. Calculate the local file’s exact byte length and lowercase SHA-256. Identify the file’s MIME type.
  4. Call reservePostMedia with a new requestId, the draft ID as contentId, filename, contentType, sizeBytes, and sha256.
  5. Call createPostMediaUploadGrant with a new requestId and the returned assetId.
  6. Send a direct PUT with the unchanged file bytes before expiresAt. Send the returned content type, If-None-Match: *, and the exact Content-Length. Omit Benchmark credentials and cookies. Reject redirects.
  7. Call finalizePostMedia with a new requestId and assetId.
  8. Read the asset with readPostMedia. Limit automatic checks to five. If it still says verifying, check again later.
  9. After the asset says verified, call updatePost with the asset ID in attachmentIds or the appropriate destination part’s attachmentIds.

JPEG, PNG, and WebP files can be up to 20 MiB. MP4, WebM, and QuickTime files can be up to 100 MiB. If only the file metadata is invalid, the operation returns INVALID_REQUEST with reason INVALID_FILE before it creates a reservation. REST uses HTTP 400. A reservation lasts 30 minutes. A PUT grant lasts at most five minutes and expires by the reservation deadline. The grant authorizes one conditional PUT. Media metadata and post responses contain no download or preview URL. Benchmark sends the grant with Cache-Control: no-store. Keep it out of logs and durable records.

This shell example reads the grant from a private local variable. Set file, content_type, and size_bytes from the same reservation. Continue only if the command reports a 2xx status.

Terminal window
set +x
printf 'url = "%s"\n' "$upload_url" |
curl -q --config - --silent --show-error --fail --output /dev/null \
--write-out '%{http_code}\n' --request PUT --upload-file "$file" \
--header "Content-Type: $content_type" \
--header "Content-Length: $size_bytes" \
--header 'If-None-Match: *'

If the PUT result is uncertain, keep the asset ID and request IDs. A conditional write refusal can mean the bytes already exist. Finalize the same asset and use readPostMedia to check the current state. A rejected asset returns state: "rejected" with failure set to integrity, type, or size.

Edit, schedule, and cancel

updatePost replaces all editable fields when both status and publishingState are draft. Read the current post first and use its revision as expectedRevision. Send title, body, destinations, socialSetId, selectedAccountIds, assigneeId, format, and attachmentIds. Copy fields that you want to keep. Use assigneeId: null to clear assignment.

To schedule, use schedulePost with a new requestId, contentId, expectedContentRevision, socialSetId, targets, and when. Choose 1 to 16 unique accounts. Each target has an accountId and a destinationId. Use destinationId: null for the master caption and attachments.

A live Instagram carousel uses one eligible Instagram account and two to twenty verified slides. Set format to carousel. List the attachments in slide order. Use one part for a destination version. Use JPEG or PNG up to 8 MB, or MP4 or MOV up to 100 MiB. Each MP4 or MOV slide must contain a video stream. The first slide must have a display aspect ratio of 0.5625 to 1.91. If a slide fails to prepare, check targets[].slideFailures for its position and reason. If the schedule expires, this list includes each unfinished slide. Other platforms can use up to ten shared attachments.

YouTube Shorts and videos

Select one connected YouTube account with posting permission. Reconnect the account if it needs posting access. Set the format to short or video. Create one YouTube destination with one part and one verified video attachment. Use H.264 in an MP4 or MOV file up to 100 MiB. The video must last 3 seconds to 15 minutes. The part text supplies the description. Use at most 5,000 characters.

Set these fields in the YouTube destination’s platformOptions:

  • Set visibility for a live publish. Use public, unlisted, or private.
  • Set madeForKids to true or false for a live publish.
  • title is optional. Use 1 to 100 characters. If you omit it, YouTube uses the first line of the description.
  • tags is optional. Use at most 100 characters per tag and 500 characters across all tags.

A Short must last at most 180 seconds and have a 9:16 or 1:1 display aspect ratio. Benchmark checks the file during preparation. If it fails this rule, the target reports youtube_short_requirements and a notice. Format video accepts 16:9, 9:16, and 1:1. If it meets the Short rule, YouTube shows it as a Short. The published result includes a notice in this case.

LinkedIn personal posts

Select one connected LinkedIn personal profile with posting permission. Reconnect the profile if it needs posting or comment access. Use one LinkedIn destination with one part. The part text can contain up to 3,000 characters. You can add a first comment of up to 1,250 characters in the destination’s firstComment field.

  • For text, omit attachments. Benchmark sends the post without a media transfer.
  • For image, attach one verified JPEG or PNG file up to 8 MB.
  • For video, attach one verified H.264 MP4 or MOV file up to 100 MiB. Use a 16:9, 1:1, or 9:16 display aspect ratio. LinkedIn personal videos must last 3 seconds to 10 minutes.

X posts and threads

Select one connected X account with posting permission. Reconnect if the account lacks that permission. Use text for one part or thread for two to ten parts. Omit media. Each part must contain text and fit 280 weighted characters. An explicit HTTP or HTTPS link counts as 23 characters. Optional platformOptions.replySettings accepts following, mentionedUsers, subscribers, or verified. The setting applies to the first post in a thread.

Scheduling is free. At send time, Benchmark reserves 2 credits for each X part, or 20 credits if the part has a link. A domain without a scheme does not change the price. Benchmark charges for each part it verifies as published. The target shows estimated, reserved, and charged credits. An uncertain part keeps its reservation. Instagram, YouTube, and LinkedIn publishing cost zero credits.

Set the schedule

  • For a specific time, set when.kind to "at". Supply at in UTC milliseconds and an IANA timeZone such as "America/New_York". The time must be at least one minute and at most 365 days ahead of server time.
  • For the next available slot, use {"kind":"queue","expectedQueueRevision":3} with the current queue.revision from listSocialSets. The result gives the selected time. A concurrent schedule can claim an earlier slot under the same rules.

In external MCP, approve the schedule in the host before submission. REST uses the authenticated member command. Inspect publication.mode, state, and targets in the result. A withheld publication records the schedule without sending it to a platform. Use readPost to check the saved state and the dashboard to see the same post.

To unschedule, call cancelPost with a new requestId, the publicationId, and its latest expectedRevision. Check the returned publication and target states. After a possible send, cancellation can remain pending or uncertain. Read the post again for its current revision before you edit or reschedule it.

Retries and limits

  • Use a caller-generated UUID for each mutation. If you lose a response, explicitly replay the same UUID and the same input. Reusing a UUID with changed input returns CONFLICT.
  • After a revision conflict, read the current post, publication, or queue rules before you make a new request. Use currentRevision when the error supplies it.
  • Grant replay uses the original grant intent. A GRANT_EXPIRED or GRANT_ROTATED reason requires a new request UUID for a fresh grant. The reservation must still be active. Read current state after finalize because its replay can still say verifying.
  • Create and update inputs allow 24 KiB of encoded JSON, including requestId. Other mutations allow 12 KiB. A post body or destination part may have up to 30,000 characters within the total byte limit. Unicode and JSON escapes count toward the byte limit.
  • Stored results allow up to 112 KiB before the data envelope. An oversized result returns 503 SERVICE_UNAVAILABLE with reason RESULT_TOO_LARGE. Read the full post in the dashboard.
ErrorResponse
403 FORBIDDEN with FEATURE_DISABLEDCheck whether the workspace has Posts access.
403 PLAN_UPGRADE_REQUIREDCheck the workspace plan. Use upgradeUrl if the error provides it.
404 NOT_FOUNDCheck the resource ID and workspace.
409 ACCOUNT_NOT_READY or 409 MEDIA_REQUIREDCheck the selected accounts and verified attachments.
409 NO_QUEUE_SLOTCheck the set’s queue rules or choose a specific time.
503 SERVICE_UNAVAILABLE with UPLOADS_UNAVAILABLECheck workspace upload availability before you start a new reservation.

Schedule from Research chat

Research can read posts, sets, accounts, and media metadata in JSON. Upload local media through REST or external MCP before you use it in chat. Ask Research to schedule an existing draft. Check the saved post content, attachments, accounts, time or queue rules, and mode on the approval card. The card shows the estimated credits for live X. Select Approve to authorize the schedule. Select Stop to end the turn without approving. If the saved approval proof is missing or changes, Research records CONFLICT for the tool. If you stop after dispatch and the outcome is uncertain, use readPost to check the current state before you consider another schedule.

See the API reference for exact schemas and operation-specific errors.