---
title: "Unpublish"
method: POST
path: "/{brand_id}/sites/{site_id}/agent-pages/unpublish"
tags: ["agent-pages"]
---

# Unpublish

`POST /{brand_id}/sites/{site_id}/agent-pages/unpublish`

## Request

- Base URL: `https://api.scrunchai.com/v1`
- URL: `https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-pages/unpublish`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/scrunch/apis/scrunch-data-api/docs/:brand_id/sites/:site_id/agent-pages/unpublish/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Path parameters

- `brand_id` integer, required: The unique identifier for the brand that owns the site.
- `site_id` string, required: The ULID of the registered site whose Agent Pages you are unpublishing.

## Request body

- AgentPagesUnpublishRequest
  - `paths` string[], required: 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` boolean: 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.

## Response `200`

One outcome per requested path, in request order, plus the brand's remaining unpublish quota.

- AgentPagesUnpublishResponse
  - `results` AgentPagesUnpublishResult[], required: One entry per requested path, in request order (after duplicates are merged).
    - `path` string, required: The normalized path this outcome applies to. `/` is the homepage.
    - `outcome` 'unpublished' | 'already_unpublished' | 'not_found' | 'conflict' | 'cooldown' | 'rate_limited', required: 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 scheduled checks don't publish it again. `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` string, date-time, nullable: For `cooldown`, when this path can be unpublished again. Null otherwise.
    - `edge` 'deleted' | 'failed' | 'deferred', nullable: 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.
  - `quota` AgentPagesUnpublishQuotas, required: The brand's rolling unpublish windows, separate from the refresh quota. A path is unpublished only while both have room.
    - `hourly` AgentPagesRefreshQuota, required
      - `limit` integer, required: This window's cap.
      - `remaining` integer, required: Paths left in this window after this request.
      - `resets_at` string, date-time, nullable: When the oldest path counted in the window expires and frees a slot. Null when nothing has been used.
    - `daily` AgentPagesRefreshQuota, required
      - `limit` integer, required: This window's cap.
      - `remaining` integer, required: Paths left in this window after this request.
      - `resets_at` string, date-time, nullable: When the oldest path counted in the window expires and frees a slot. Null when nothing has been used.

## Other responses

- `404`: The site doesn't belong to the brand, or Agent Pages aren't enabled for the brand.
- `409`: 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`: Validation Error
- `429`: 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.

## Changes

- **2026-11-03** `e37811b6bc07`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scrunch/apis/scrunch-data-api/changes/:brand_id/sites/:site_id/agent-pages/unpublish/post.md)

---

[API](https://skmtc.dev/scrunch/apis/scrunch-data-api.md) - [All operations](https://skmtc.dev/scrunch/apis/scrunch-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scrunch/apis/scrunch-data-api/revisions/e28a10a186bf?raw)
