# Quote a purchase for a delegated agent

> Quote a purchase for a delegated agent: CustomDomain™ API reference in the registrar group. Covers parameters, request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/registrar/quoteAgentPurchase

## `POST https://api.customdomain.ai/v1/registrar/purchase-quote`

For a delegated agent token with `domains:purchase`. Returns the price and a `quote_id`, and emails the person who approved the grant a code for this purchase. The code is never in the answer. Send the `quote_id` and the code to `POST /registrar/purchase`. A quote is good for a short time and one purchase. Off while purchasing is off.

### Authentication

`agentToken`

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | Quote |
| `400` | Error envelope: {code, title, details, request_id}. |
| `401` | Error envelope: {code, title, details, request_id}. |
| `403` | `forbidden`: the credential may not do this. `workspace_suspended`: CustomDomain™ support suspended the workspace. While it is suspended, new connections (one by one or in bulk, where each domain fails on its own), every connect step on a domain it already has (the credentialed apply, a provider sign in to connect, the cloud browser, Domain Connect, the Route 53 access role, the hosted zone and `:reapply`) and the start of a domain purchase are refused; reads, rechecks, removals and the sign in to remove a domain keep working, and domains already connected keep their records. A connect-scoped widget token, the tenant's own end user, gets `402 connections_unavailable` instead, the neutral answer it gets for a billing refusal. Support resumes the workspace; nothing in the API does. |
| `409` | Error envelope: {code, title, details, request_id}. |
| `429` | Error envelope: {code, title, details, request_id}. |
| `503` | Error envelope: {code, title, details, request_id}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `quote_id` | string | no |  |
| `domain` | string | no |  |
| `price_cents` | integer | no |  |
| `currency` | string | no |  |
| `expires_at` | string | no |  |
| `confirmation` | string | no |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
