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.
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.
Authorization
agentToken domains:purchaseA delegated agent access token: an ES256 JWT that lives 15 minutes, sent as a bearer token. A person approves an agent in the console and the agent exchanges its authorization code (with PKCE) at the token endpoint. The token carries the workspace, the one application the grant is bound to, the grant, the approved scopes and its audience, and is verified against /.well-known/jwks.json. A route that accepts it lists the scope it needs; a token without the scope is refused with 403, and a connection or order of another application answers 404.
In: header
Scope: domains:purchase
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/registrar/purchase-quote" \ -H "Content-Type: application/json" \ -d '{ "domain": "string" }'{ "quote_id": "string", "domain": "string", "price_cents": 0, "currency": "string", "expires_at": "2019-08-24T14:15:22Z", "confirmation": "string"}{ "code": "account_not_verifiable", "title": "string", "details": "string", "request_id": "string", "challenge": { "value": "string", "bits": 1, "expires_at": "2019-08-24T14:15:22Z" }}{ "code": "account_not_verifiable", "title": "string", "details": "string", "request_id": "string", "challenge": { "value": "string", "bits": 1, "expires_at": "2019-08-24T14:15:22Z" }}{ "code": "workspace_suspended", "title": "This workspace is suspended.", "details": "New domains, connect steps and domain purchases are refused while CustomDomain™ support has this workspace suspended. Contact support to have it resumed."}{ "code": "account_not_verifiable", "title": "string", "details": "string", "request_id": "string", "challenge": { "value": "string", "bits": 1, "expires_at": "2019-08-24T14:15:22Z" }}{ "code": "account_not_verifiable", "title": "string", "details": "string", "request_id": "string", "challenge": { "value": "string", "bits": 1, "expires_at": "2019-08-24T14:15:22Z" }}{ "code": "account_not_verifiable", "title": "string", "details": "string", "request_id": "string", "challenge": { "value": "string", "bits": 1, "expires_at": "2019-08-24T14:15:22Z" }}