# Approve actual output as the new expected baseline **POST /runs/{run_id}/samples/{sample_id}/baseline-approval** Requires baselines:write scope and admin or contributor role. This is a destructive write — the approved output becomes the new expected baseline for the regression test. Provide a reason; it is stored in the audit log. ## Servers - Production: https://sampleplatform.ccextractor.org/api/v1 (Production) ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **run_id** (integer) Numeric run ID - **sample_id** (integer) Numeric sample or regression result ID ### Body: application/json (object) - **regression_id** (integer) - **output_id** (integer) - **reason** (string) Required justification stored in the audit log. Minimum 10 characters; do not accept placeholder values. - **apply_to_variants** (boolean) If true, apply this baseline to all command variants of the regression test, not just the specific output_id. ## Responses ### 202 Baseline approval recorded. Status begins as pending_review. #### Body: application/json (object) - **approval_id** (string) - **status** (string) - **run_id** (integer) - **sample_id** (integer) - **regression_id** (integer) - **output_id** (integer) - **requested_by** (string(email)) - **created_at** (string(date-time)) ### 400 Request body or query parameters failed schema validation #### 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. ### 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)