Launch offer: service fee 10% 4% until 31 Dec, just enough to cover card processing. See pricing

← REST API reference

Cancel a scheduled post

Cancel a post that hasn't gone out, so it never posts. It can't be undone, though the post can be scheduled again. A post that's already live has to be deleted in TikTok or Instagram.

View as Markdown
POSThttps://yapfactory.com/api/v1/posts/{postId}/cancel
Who can use itBrands
Tierwrite: Changes your own things only. Nobody else is told.
Scopeposts:write, or write
Idempotency-KeyOptional, and recommended
Rate limitWrites: 20 a minute
MCP toolcancel_post

Parameters

postId
pathrequired
uuid

The post's id.

Example request

curl -X POST "https://yapfactory.com/api/v1/posts/8f14e45f-ceea-4e7a-9b1d-2c3b4a5d6e7f/cancel" \
  -H "Authorization: Bearer $YAP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Response

200 with the result in data: the same object the MCP tool returns.

{
  "data": {
    "id": "92eb5ffe-e6ae-4fec-8ad7-1c4c4e2f8a55",
    "status": "cancelled"
  }
}

An example: fields that don't apply are null, and new fields can be added at any time, so ignore ones you don't know. Every response carries Request-Id and the RateLimit-* headers.

Errors

CodeStatusWhen
invalid_request400A field failed validation (see meta.issues), or an unknown query parameter.
unauthorized401No token, or it's wrong, expired, revoked or from the other environment.
insufficient_scope403The token doesn't have posts:write (or write).
forbidden403Only for brands, or the account can't do this yet (email not confirmed, paused).
not_found404No such post, or it isn't yours.
conflict409Its current state doesn't allow this. message says why, in words you can show.
idempotency_conflict409The same Idempotency-Key came with a different body.
rate_limited429Over the limit. Wait for Retry-After seconds.
internal500Our fault. Retry later, and send us the requestId if it keeps happening.

Every error has the same shape. See Errors for what to do about each one.