# Cancel a queued or running CI run **POST /runs/{run_id}/cancel** Idempotent. Canceling an already-canceled or completed run returns 202 with a no-op message rather than an error. Requires runs:write scope. ## Servers - Production: https://sampleplatform.ccextractor.org/api/v1 (Production) ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **run_id** (integer) Numeric run ID ### Body: application/json (object) - **reason** (string) ## Responses ### 202 Cancellation accepted (or no-op if already terminal) #### Body: application/json (object) - **run_id** (integer) ID of the source run (for cancel) or original run (for retry). - **new_run_id** (integer | null) Set on retry actions only. ID of the newly created run. The original run is always preserved. - **action** (string) - **status** (string) no_op is returned when canceling an already-terminal run. - **message** (string) ### 401 Missing, expired, or invalid bearer token #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. ### 403 Token is valid but lacks the required scope or role #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. ### 404 Resource not found #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. ### 429 Too many requests. Retry after the indicated number of seconds. #### Headers - **Retry-After** (integer) Seconds to wait before retrying - **X-RateLimit-Limit** () Maximum requests allowed in the current window - **X-RateLimit-Remaining** () Requests remaining in the current window - **X-RateLimit-Reset** () Unix timestamp when the rate limit window resets #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. ### default Unexpected server error #### Body: application/json (object) - **code** (string) Machine-readable error code (snake_case) - **message** (string) Human-readable error summary - **details** (object) Structured context for the error. Always an object, never null. Empty object {} when no additional detail is available. [Powered by Bump.sh](https://bump.sh)