> ## 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

> Stop serving Agent Pages now. Each path is added to the site's Ignore List, so it stays unpublished through later crawls, sitemap checks and page selections, and its copy is removed from the edge within minutes, or before the response with `immediate: true`.

Returns one outcome per requested path. A path that has nothing to remove doesn't cause an error.

Limits: 100 paths per request; each path once every 5 minutes; per brand, 100 unpublished paths per rolling hour and 1,000 per rolling 24 hours. These quotas are separate from Force Refresh's.

Unpublish acts on the Agent Page only. Curated (Adaptive) content at the same path keeps being served, and the response doesn't report it; remove it with the AXP Unpublish API.



## OpenAPI

````yaml /api-reference/openapi.json post /{brand_id}/sites/{site_id}/agent-pages/unpublish
openapi: 3.1.0
info:
  title: Scrunch Data API
  version: 0.1.0
servers:
  - url: https://api.scrunchai.com/v1
security: []
paths:
  /{brand_id}/sites/{site_id}/agent-pages/unpublish:
    post:
      tags:
        - agent-pages
      summary: Unpublish
      description: >-
        Stop serving Agent Pages now. Each path is added to the site's Ignore
        List, so it stays unpublished through later crawls, sitemap checks and
        page selections, and its copy is removed from the edge within minutes,
        or before the response with `immediate: true`.


        Returns one outcome per requested path. A path that has nothing to
        remove doesn't cause an error.


        Limits: 100 paths per request; each path once every 5 minutes; per
        brand, 100 unpublished paths per rolling hour and 1,000 per rolling 24
        hours. These quotas are separate from Force Refresh's.


        Unpublish acts on the Agent Page only. Curated (Adaptive) content at the
        same path keeps being served, and the response doesn't report it; remove
        it with the AXP Unpublish API.
      operationId: unpublishAgentPages
      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 site whose Agent Pages you are
              unpublishing.
          description: >-
            The ULID of the registered site whose Agent Pages you are
            unpublishing.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentPagesUnpublishRequest'
      responses:
        '200':
          description: >-
            One outcome per requested path, in request order, plus the brand's
            remaining unpublish quota.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentPagesUnpublishResponse'
              example:
                results:
                  - path: /pricing
                    outcome: unpublished
                    retry_after: null
                    edge: deleted
                  - path: /old-campaign
                    outcome: already_unpublished
                    retry_after: null
                    edge: null
                  - path: /careers
                    outcome: not_found
                    retry_after: null
                    edge: null
                quota:
                  hourly:
                    limit: 100
                    remaining: 99
                    resets_at: '2026-10-28T15:02:41Z'
                  daily:
                    limit: 1000
                    remaining: 987
                    resets_at: '2026-10-29T09:15:03Z'
        '404':
          description: >-
            The site doesn't belong to the brand, or Agent Pages aren't enabled
            for the brand.
        '409':
          description: >-
            Agent Pages aren't active on this site (or the site isn't serving
            through its CDN). Nothing was unpublished and no quota was used.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: >-
            The brand's hourly or daily unpublish quota is used up and nothing
            could be unpublished, or another unpublish request for the same
            brand is still being processed.
          headers:
            Retry-After:
              description: >-
                Seconds to wait: until every exhausted quota window has a free
                slot, or 1 when another request for the brand is in progress.
              schema:
                type: integer
      security:
        - HTTPBearer:
            - optimize
components:
  schemas:
    AgentPagesUnpublishRequest:
      properties:
        paths:
          items:
            type: string
          type: array
          maxItems: 100
          minItems: 1
          title: Paths
          description: >-
            Site-relative paths to unpublish, e.g. `/pricing`. 1 to 100 entries,
            each up to 2,048 characters. Full or protocol-relative URLs are
            rejected. Paths are trimmed and normalized (lowercased, trailing
            slash and query string dropped), and duplicates after normalization
            are merged. `/` is the homepage.
        immediate:
          type: boolean
          title: Immediate
          default: false
          description: >-
            Delete the edge copies before responding, instead of within minutes.
            Every path whose copy was still at the edge then reports `edge`,
            whatever its outcome, so a retry also cleans up a copy an earlier
            call left behind. A CDN cache in front of your site can still serve
            a copy it already holds until that copy expires.
      type: object
      required:
        - paths
      title: AgentPagesUnpublishRequest
    AgentPagesUnpublishResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/AgentPagesUnpublishResult'
          type: array
          title: Results
          description: >-
            One entry per requested path, in request order (after duplicates are
            merged).
        quota:
          $ref: '#/components/schemas/AgentPagesUnpublishQuotas'
          description: The brand's remaining unpublish quota.
      type: object
      required:
        - results
        - quota
      title: AgentPagesUnpublishResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentPagesUnpublishResult:
      properties:
        path:
          type: string
          title: Path
          description: The normalized path this outcome applies to. `/` is the homepage.
        outcome:
          type: string
          enum:
            - unpublished
            - already_unpublished
            - not_found
            - conflict
            - cooldown
            - rate_limited
          title: Outcome
          description: >-
            What happened to this path. `unpublished`: the Agent Page was being
            served at the edge; it is on the Ignore List now and its edge copy
            is removed. `already_unpublished`: no Agent Page was being served at
            this path (already ignored, retired, or never published to the
            edge); it is on the Ignore List so it can't be published later.
            `not_found`: the site has no Agent Page at this path. `conflict`:
            the path is itself an entry added to the Priority List in the
            dashboard (a page entry or a prefix entry; pages under a prefix
            entry don't conflict), including one added while the request ran; on
            a brand without Site Optimization, also the paths of a request that
            would remove every remaining Priority List entry on the site.
            Nothing is written and no quota is used. Change the Priority List in
            the dashboard first. `cooldown`: the path was taken off the Ignore
            List and unpublished again within 5 minutes of its last unpublish;
            retry after `retry_after`. A plain resend returns
            `already_unpublished` instead. `rate_limited`: the brand's hourly or
            daily quota ran out partway through this batch.
        retry_after:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Retry After
          description: >-
            For `cooldown`, when this path can be unpublished again. Null
            otherwise.
        edge:
          anyOf:
            - type: string
              enum:
                - deleted
                - failed
                - deferred
            - type: 'null'
          title: Edge
          description: >-
            Only with `immediate: true`, for every requested path whose Agent
            Page is no longer served but whose copy was still at the edge,
            whatever its outcome. `deleted`: the edge copy is gone. `failed`:
            the edge delete failed for this path; the unpublish still holds and
            the delete is retried in the background within minutes. If the
            delete fails as a whole, every path with an edge copy reports
            `failed`. `deferred`: the site has no CDN platform configured, so no
            edge delete was attempted. Null when there was no copy to delete, or
            without `immediate`. A page this call left serving (for example
            `conflict`, `cooldown` or `rate_limited` on a live page) is never
            deleted and reports null.
      type: object
      required:
        - path
        - outcome
      title: AgentPagesUnpublishResult
    AgentPagesUnpublishQuotas:
      properties:
        hourly:
          $ref: '#/components/schemas/AgentPagesRefreshQuota'
          description: 100 unpublished paths per brand per rolling hour.
        daily:
          $ref: '#/components/schemas/AgentPagesRefreshQuota'
          description: 1,000 unpublished paths per brand per rolling 24 hours.
      type: object
      required:
        - hourly
        - daily
      title: AgentPagesUnpublishQuotas
      description: >-
        The brand's rolling unpublish windows, separate from the refresh quota.
        A path is unpublished only while both have room.
    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
    AgentPagesRefreshQuota:
      properties:
        limit:
          type: integer
          title: Limit
          description: This window's cap.
        remaining:
          type: integer
          title: Remaining
          description: Paths left in this window after this request.
        resets_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Resets At
          description: >-
            When the oldest path counted in the window expires and frees a slot.
            Null when nothing has been used.
      type: object
      required:
        - limit
        - remaining
      title: AgentPagesRefreshQuota
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

## Related topics

- [Unpublish Optimized Pages](https://developers.scrunch.com/api-reference/axp-render/unpublish-optimized-pages.md)
- [Agent Pages Unpublish: Stop Serving Pages on Demand](https://developers.scrunch.com/api-reference/agent-pages/unpublish-overview.md)
- [AXP Unpublish API: Take Optimized Pages Off the Edge](https://developers.scrunch.com/api-reference/axp/unpublish.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.