---
title: "Retry a custom domain"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Retry a custom domain

Path: Nicer API › identity

`POST /identity/booking-site/hosts/{host}/retry`

URL: `https://api.nicer.travel/identity/booking-site/hosts/{host}/retry`

Restarts provisioning of a custom domain that failed (FAILED_DNS or FAILED_CERT), or checks the DNS of one waiting for it (PENDING_DNS) right away instead of at its next poll and answers with what it shows instead of the CNAME in `lastError`. Admins retry any of the agency's custom domains, a portal or Pay domain included; an advisor retries only their own page's, while the agency allows advisor pages.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `host` (`identity.bookingSite.hosts.retry.path.host`; string, required)

## Header parameters

- `x-nicer-company` (`identity.bookingSite.hosts.retry.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
  headers: { "x-nicer-company": process.env.NICER_COMPANY },
});

await nicer.identity.bookingSite.hosts.retry({
  "host": "string"
});
```

### Nicer CLI

```bash
nicer identity booking-site hosts retry --host 'string' --company "$NICER_COMPANY"
```

### cURL

```bash
curl --request POST \
  --url 'https://api.nicer.travel/identity/booking-site/hosts/<host>/retry' \
  --header 'Authorization: Bearer <token>' \
  --header 'x-nicer-company: string'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/identity/booking-site/hosts/<host>/retry';
const options = {
  method: 'POST',
  headers: {'x-nicer-company': 'string', Authorization: 'Bearer <token>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/identity/booking-site/hosts/<host>/retry"

headers = {
    "x-nicer-company": "string",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "advisorUserId": "string",
  "aliasOf": "string",
  "app": "BOOKING",
  "attempt": 9007199254740991,
  "canonical": true,
  "companyName": "string",
  "createdAt": "string",
  "createdBy": "string",
  "dnsTarget": "string",
  "kind": "SUBDOMAIN",
  "lastError": "string",
  "status": "PENDING_DNS",
  "updatedAt": "string",
  "validationMode": "cloudfront",
  "validationRedirectFrom": "string",
  "validationRedirectTo": "string",
  "host": "string",
  "certificateIssued": true,
  "hasTenant": true
}
```

- `canonical` (`identity.bookingSite.hosts.retry.response.200.canonical`; boolean, required)
- `companyName` (`identity.bookingSite.hosts.retry.response.200.companyName`; string, required)
  - minLength: `1`
- `createdAt` (`identity.bookingSite.hosts.retry.response.200.createdAt`; string, required)
- `createdBy` (`identity.bookingSite.hosts.retry.response.200.createdBy`; string, required)
  - minLength: `1`
- `kind` (`identity.bookingSite.hosts.retry.response.200.kind`; string, required)
  - one of `"SUBDOMAIN"`, `"CUSTOM"`, `"ALIAS"`
- `status` (`identity.bookingSite.hosts.retry.response.200.status`; string, required)
  - one of `"PENDING_DNS"`, `"ISSUING"`, `"ACTIVE"`, `"FAILED_DNS"`, `"FAILED_CERT"`, `"REMOVING"`
- `updatedAt` (`identity.bookingSite.hosts.retry.response.200.updatedAt`; string, required)
- `host` (`identity.bookingSite.hosts.retry.response.200.host`; string, required)
  - minLength: `1`
- `certificateIssued` (`identity.bookingSite.hosts.retry.response.200.certificateIssued`; boolean, required)
- `hasTenant` (`identity.bookingSite.hosts.retry.response.200.hasTenant`; boolean, required)
- `advisorUserId` (`identity.bookingSite.hosts.retry.response.200.advisorUserId`; string, optional)
  - minLength: `1`
- `aliasOf` (`identity.bookingSite.hosts.retry.response.200.aliasOf`; string, optional)
- `app` (`identity.bookingSite.hosts.retry.response.200.app`; string, optional)
  - one of `"BOOKING"`, `"PORTAL"`, `"PAY"`
- `attempt` (`identity.bookingSite.hosts.retry.response.200.attempt`; integer, optional)
  - maximum: `9007199254740991` · minimum: `0`
- `dnsTarget` (`identity.bookingSite.hosts.retry.response.200.dnsTarget`; string, optional)
- `lastError` (`identity.bookingSite.hosts.retry.response.200.lastError`; string, optional)
- `validationMode` (`identity.bookingSite.hosts.retry.response.200.validationMode`; string, optional)
  - one of `"cloudfront"`, `"self-hosted"`
- `validationRedirectFrom` (`identity.bookingSite.hosts.retry.response.200.validationRedirectFrom`; string, optional)
- `validationRedirectTo` (`identity.bookingSite.hosts.retry.response.200.validationRedirectTo`; string, optional)

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.bookingSite.hosts.retry.response.400.errorCode`; string, required)
- `errorMessage` (`identity.bookingSite.hosts.retry.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.bookingSite.hosts.retry.response.401.errorCode`; string, required)
- `errorMessage` (`identity.bookingSite.hosts.retry.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.bookingSite.hosts.retry.response.403.errorCode`; string, required)
- `errorMessage` (`identity.bookingSite.hosts.retry.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/identity/identity.bookingSite.hosts.retry/index.md
