> ## Documentation Index
> Fetch the complete documentation index at: https://developers.scrunch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unpublish Optimized Pages

> Stop serving optimized content for a list of paths on a registered AXP site. Each path is removed from the edge and its row is terminally retired, so no automated writer (re-stage, redeploy, rollback, or render job) republishes it. The endpoint is idempotent and returns one outcome per requested path.

Designed for compliance-driven takedowns that must land faster than the weekly optimization cadence — for example when a regulated page has been pulled from your origin and must stop being served from Scrunch's edge immediately.

Requires the target site to be on AXP engine version 2.1.0 or later. On earlier engines a page is only unpublished by the next version deploy, so a request against a 2.0.0 site is refused with a 409 before any row is changed.

A human with `brand:update` can still bring a taken-down page back live from the Scrunch dashboard; the terminal state only binds automated writers.



## OpenAPI

````yaml /api-reference/openapi.json post /orchestration/unpublish/{brand_id}/sites/{site_id}
openapi: 3.1.0
info:
  title: Scrunch Data API
  version: 0.1.0
servers:
  - url: https://api.scrunchai.com/v1
security: []
paths:
  /orchestration/unpublish/{brand_id}/sites/{site_id}:
    post:
      tags:
        - axp-render
      summary: Unpublish Optimized Pages
      description: >-
        Stop serving optimized content for a list of paths on a registered AXP
        site. Each path is removed from the edge and its row is terminally
        retired, so no automated writer (re-stage, redeploy, rollback, or render
        job) republishes it. The endpoint is idempotent and returns one outcome
        per requested path.


        Designed for compliance-driven takedowns that must land faster than the
        weekly optimization cadence — for example when a regulated page has been
        pulled from your origin and must stop being served from Scrunch's edge
        immediately.


        Requires the target site to be on AXP engine version 2.1.0 or later. On
        earlier engines a page is only unpublished by the next version deploy,
        so a request against a 2.0.0 site is refused with a 409 before any row
        is changed.


        A human with `brand:update` can still bring a taken-down page back live
        from the Scrunch dashboard; the terminal state only binds automated
        writers.
      operationId: unpublishOptimizedPages
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: integer
            title: Brand Id
            description: The unique identifier for the brand that owns the site.
          description: The unique identifier for the brand that owns the site.
        - name: site_id
          in: path
          required: true
          schema:
            type: string
            title: Site Id
            description: >-
              The ULID of the registered AXP site whose pages you are taking
              down.
          description: The ULID of the registered AXP site whose pages you are taking down.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CuratedUnpublishRequest'
      responses:
        '200':
          description: One outcome per requested path, in the order the paths were sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CuratedUnpublishResponse'
        '400':
          description: Site has no CDN platform configured.
        '404':
          description: Site not found for the supplied brand.
        '409':
          description: >-
            Site's AXP engine is below version 2.1.0, so on-demand unpublish is
            not supported. No pages were changed.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer:
            - configure
      servers:
        - url: https://api.scrunchai.com/v2
components:
  schemas:
    CuratedUnpublishRequest:
      properties:
        paths:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 2048
          minItems: 1
          maxItems: 100
          title: Paths
          description: >-
            Site-relative paths to unpublish, e.g. `['/promo/2024-rates']`. Each
            entry is trimmed and given a leading slash if missing. Duplicates
            after normalization are dropped, preserving input order.
      type: object
      required:
        - paths
      title: CuratedUnpublishRequest
    CuratedUnpublishResponse:
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/CuratedUnpublishResult'
          title: Results
          description: Per-path outcomes, in the order the paths were sent.
      type: object
      required:
        - results
      title: CuratedUnpublishResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CuratedUnpublishResult:
      properties:
        path:
          type: string
          title: Path
          description: >-
            The normalized path this outcome applies to, echoed back from the
            request.
        outcome:
          type: string
          enum:
            - unpublished
            - already_unpublished
            - not_found
            - failed
            - skipped
          title: Outcome
          description: >-
            What happened to this path. `unpublished` — the edge key is
            confirmed gone and the row is terminally retired.
            `already_unpublished` — the page was already down; reported
            distinctly so a retry reads as a retry, but it is a success.
            `not_found` — no curated page at that path on this site; the desired
            end state already holds. `failed` — the edge did not confirm the
            delete, so the page may still be served; the row is left untouched
            and the daily reconcile sweep will retry it. `skipped` — another
            active page owns the same deterministic edge key (for example
            `/About-Us` and `/about-us`), so deleting it would take a live page
            down; rename one of the paths and retry.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: >-
            Human-readable context for outcomes a caller may need to act on —
            for example, which active page owns a `skipped` key. Never carries
            an exception message.
      type: object
      required:
        - path
        - outcome
      title: CuratedUnpublishResult
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````