Skip to content
Developers

    Posts

    Cancel a post

    Markdown
    DELETEhttps://api.tiktornado.com/api/v1/posts/{postId}

    Scope: posts:write. Needs an Idempotency-Key header.

    Cancels a scheduled post so it never goes out. Only a post waiting for its time can be cancelled (invalid_state otherwise). Refused from 10 minutes before the post goes out (post_locked), so always for a post sent with postNow. The answer's status is cancelling until TikTok's scheduler has dropped the post.

    Path parameters

    • postIdstringRequired

      The post, from POST /posts or GET /posts.

      Matches ^[A-Za-z0-9]{1,64}$.

    Header parameters

    • Idempotency-KeystringRequired

      A unique string you make up for this change, for example a UUID: 1 to 255 visible ASCII characters, no spaces. Send the same key with the same body to retry safely. Missing or malformed: 400 idempotency_key_required, before anything runs.

      Matches ^[\x21-\x7e]{1,255}$.

    Example request

    curl -X DELETE 'https://api.tiktornado.com/api/v1/posts/k174wq9nrm6t2f0bd3xh8pz5a87v1c2e' \
      -H "Authorization: Bearer $TIKTORNADO_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)"

    Response 200

    The post is being cancelled.

    Idempotent-Replayed

    true when this is the stored answer to an earlier request with the same Idempotency-Key. Absent otherwise.

    • idstringRequired

      An id, letters and digits only.

      Matches ^[A-Za-z0-9]{1,64}$.

    • statusstringRequired

      Always cancelling.

    Example
    {
      "id": "k174wq9nrm6t2f0bd3xh8pz5a87v1c2e",
      "status": "cancelling"
    }

    Errors

    StatusReasonMessage
    400idempotency_key_required

    Send an Idempotency-Key header with every change, so a retry can't make it twice.

    post_locked

    This post goes out in 10 minutes or less, so it can't be changed now.

    post_already_published

    This post is already live, so it can't be changed.

    invalid_state

    This can't be done right now. Refresh and try again.

    401api_key_invalid

    This API key isn't valid. Check it, or create a new one in the app.

    403access_locked

    Your subscription isn't active, so this can't be changed right now. Visit Billing to fix it.

    api_scope_missing

    This API key can't do this. Create a key with the access it needs in the app.

    404not_found

    We couldn't find this.

    409idempotency_in_progress

    A request with this Idempotency-Key is still running. Try again in a moment.

    422idempotency_key_reused

    This Idempotency-Key was already used for a different request. Use a new one.

    429slow_down

    You're going a bit fast. Wait a moment and try again.

    500unknown_error

    Something went wrong on our side. We're on it.

    503service_unavailable

    Something went wrong on our side. We're on it.