---
title: "Approve a sitemap quote and start the crawl"
method: POST
path: "/sitemap/{jobId}/approve"
tags: ["Sitemap"]
---

# Approve a sitemap quote and start the crawl

`POST /sitemap/{jobId}/approve`

## Request

- Base URL: `https://request.usestring.ai/v1`
- URL: `https://request.usestring.ai/v1/sitemap/{jobId}/approve`
- Auth: HTTP bearer

Approve a quoted sitemap job and start the crawl. The estimated cost is held against your balance and settled when the job finishes. Call it after createSitemapJob, within one hour; expired quotes are `failed` and cannot be approved. Also served under `/map` with the same shapes.

## Response `200`

Job already in a terminal state; returns its current status (for example `failed` for an expired quote).

- SitemapJob: Job status. Extra fields depend on `status`: `awaiting_approval`: `estimatedCostUsd`. `running`: `pending`, `processed`. `completed`: `pagesProcessed`, plus `urls` (full results) shortly after completion or `finishedAt`. `failed`: `errorMessage`, `finishedAt`. `canceled` / `token_cap_exceeded`: `pending`, `processed`.
  - `jobId` string, required
  - `status` 'awaiting_approval' | 'running' | 'completed' | 'failed' | 'canceled' | 'token_cap_exceeded', required: Job status.
  - `estimatedCostUsd` string: Quoted cost in USD, as a decimal string.
  - `pending` integer: Queued URLs.
  - `processed` integer: URLs crawled so far.
  - `pagesProcessed` integer
  - `urls` unknown[]: Full results, on a completed job. Use GET /sitemap/{jobId}/urls to page through them.
    - unknown
  - `errorMessage` string: Why the job failed, for example `quote_expired`.
  - `finishedAt` string, date-time

## Other responses

- `202`: Approved; the job is `running`. Re-approving a still-running job also returns 202.
- `401`: Missing or invalid Authorization header.
- `402`: Insufficient balance for `estimatedCostUsd` (`error: insufficient_funds`). The job is marked `failed` and cannot be re-approved after a top-up.
- `404`: Job not found.
- `409`: Approval handoff incomplete (`status: partial_state`). Retry the approve call.
- `429`: Rate limit exceeded. The default limit is 60 requests per second per organization, averaged over a rolling window. Back off and retry with exponential backoff and jitter.
- `500`: Approval failed. Also returned when approving a `canceled` or `token_cap_exceeded` job.

---

[API](https://skmtc.dev/usestring/apis/string-web-access-api.md) · [All operations](https://skmtc.dev/usestring/apis/string-web-access-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usestring/apis/string-web-access-api/revisions/fd336960036e?raw)
