## POST /api/v2/domains/availability

**Check bulk domain availability**

Check one or more full domain names. Small single-SLD batches may complete inline with `data`; larger or slower checks return HTTP 202 with `operation.pollUrl`. The request field is `names`, not `domains`. Use the completed `registryRequirements` to build `POST /api/v2/orders` items without frontend inference.

### Related Endpoints

- `GET /api/v2/domains/availability/{jobId}`: Get availability job
- `GET /api/v2/products/domains/{tld}`: Get TLD pricing and registry requirements
- `POST /api/v2/orders/preview`: Preview an order

### Headers

- `Accept`: application/json
- No authorization header required.
- `Content-Type`: application/json

### Parameters

- `locale` (query, string): Optional locale hint for registry-requirement labels and reasons. Example: `en`

### Request Body

- `names` (array<string>, required) Example: `["example.se","example.com"]`

### Request Examples

#### Check registration candidates

```bash
curl -X POST "https://cloud.hostup.se/api/v2/domains/availability" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "names": [
      "example.se",
      "example.com"
    ]
  }'
```

```json
{
  "names": [
    "example.se",
    "example.com"
  ]
}
```

### Response Schema

- `data` (array<object>, required)
- `data[].name` (string, required): Checked domain name in lowercase. Example: `example.se`
- `data[].available` (boolean, required): True when the domain can be registered right now. Example: `true`
- `data[].reason` (string,null, required): Customer-facing reason when the domain is not available for registration. Example: `null`
- `data[].actions` (object, required)
- `data[].actions.canRegister` (object, required)
- `data[].actions.canRegister.allowed` (boolean, required) Example: `true`
- `data[].actions.canRegister.reason` (string,null, required) Example: `null`
- `data[].actions.canRegister.code` (string,null, optional): Machine-readable reason code when an action is blocked. Example: `pending_order`
- `data[].actions.canTransfer` (object, required)
- `data[].actions.canTransfer.allowed` (boolean, required) Example: `true`
- `data[].actions.canTransfer.reason` (string,null, required) Example: `null`
- `data[].actions.canTransfer.code` (string,null, optional): Machine-readable reason code when an action is blocked. Example: `pending_order`
- `data[].billing` (object | null, required): Default registration billing summary. `null` means the availability check did not return a usable registration price.
- `data[].billing.amount` (number, required) Example: `99`
- `data[].billing.currencyCode` (string, required) Example: `SEK`
- `data[].billing.billingCycle` (string, required) Example: `annually`
- `data[].currencyCode` (string, required): ISO-4217 currency for `renewalAmount` and other top-level price fields. Mirrors `billing.currencyCode` when billing is present. Example: `SEK`
- `data[].premium` (boolean, required): True when the registry classifies the name as premium. Example: `false`
- `data[].requiresRegistrarFeeAcceptance` (boolean, required): True when the order must explicitly accept additional registrar fees. Example: `false`
- `data[].eppRequired` (boolean, required): True when transfers for this result require an authorization code. Example: `true`
- `data[].renewalAmount` (number,null, required): Default one-year renewal amount in `currencyCode` when exposed by the catalog. Example: `169`
- `data[].supportedRegisterYears` (array<integer>, required): Registration periods currently supported for this result. Only use years present in this array. Example: `[1,2,3,5]`
- `data[].supportedTransferYears` (array<integer>, required): Transfer periods currently supported for this result. A free transfer can still be represented as a supported year. Example: `[1]`
- `data[].existingDomainId` (string,null, required): Public domain ID when the authenticated caller already owns this name; otherwise `null`. Example: `null`
- `data[].existingDomainServiceStatus` (string,null, required): Existing service status for a caller-owned domain, when present. Example: `null`
- `data[].registryRequirements` (object, required): Server-derived registration and transfer requirements for this TLD. Do not reimplement TLD rules in clients.
- `data[].registryRequirements.registration` (array<object>, required)
- `data[].registryRequirements.registration[].key` (string, required) Example: `eppCode`
  Allowed values: eppCode, phoneNumber, registrationIdentifier, companyRegistrationNumber, birthDate, registrantCountry, registrantType, useDomicile, acceptedTerms, nameservers
- `data[].registryRequirements.registration[].label` (string, required) Example: `Authorization code`
- `data[].registryRequirements.registration[].required` (boolean, required) Example: `true`
- `data[].registryRequirements.registration[].appliesTo` (string, required) Example: `transfer`
  Allowed values: register, transfer, both
- `data[].registryRequirements.registration[].registrantType` (string, required) Example: `any`
  Allowed values: any, private, organisation
- `data[].registryRequirements.registration[].allowedCountryCodes` (array,null, optional) Example: `null`
- `data[].registryRequirements.registration[].allowedRegistrantTypes` (array,null, optional) Example: `null`
- `data[].registryRequirements.registration[].alternativeRequirementKey` (string,null, optional) Example: `null`
- `data[].registryRequirements.registration[].acceptedTermsKey` (string,null, optional) Example: `se_registration_terms`
- `data[].registryRequirements.registration[].reason` (string, required) Example: `An authorization code is required to transfer this domain.`
- `data[].registryRequirements.transfer` (array<object>, required)
- `data[].registryRequirements.transfer[].key` (string, required) Example: `eppCode`
  Allowed values: eppCode, phoneNumber, registrationIdentifier, companyRegistrationNumber, birthDate, registrantCountry, registrantType, useDomicile, acceptedTerms, nameservers
- `data[].registryRequirements.transfer[].label` (string, required) Example: `Authorization code`
- `data[].registryRequirements.transfer[].required` (boolean, required) Example: `true`
- `data[].registryRequirements.transfer[].appliesTo` (string, required) Example: `transfer`
  Allowed values: register, transfer, both
- `data[].registryRequirements.transfer[].registrantType` (string, required) Example: `any`
  Allowed values: any, private, organisation
- `data[].registryRequirements.transfer[].allowedCountryCodes` (array,null, optional) Example: `null`
- `data[].registryRequirements.transfer[].allowedRegistrantTypes` (array,null, optional) Example: `null`
- `data[].registryRequirements.transfer[].alternativeRequirementKey` (string,null, optional) Example: `null`
- `data[].registryRequirements.transfer[].acceptedTermsKey` (string,null, optional) Example: `se_registration_terms`
- `data[].registryRequirements.transfer[].reason` (string, required) Example: `An authorization code is required to transfer this domain.`
- `data[].registryRequirements.countryEligibility` (object, required)

### Responses

#### 200 - Availability results completed inline.
```json
{
  "data": [
    {
      "name": "example.se",
      "available": true,
      "reason": null,
      "actions": {
        "canRegister": {
          "allowed": true,
          "reason": null
        },
        "canTransfer": {
          "allowed": false,
          "reason": "Domain is available for registration, not transfer."
        }
      },
      "billing": {
        "amount": 99,
        "currencyCode": "SEK",
        "billingCycle": "annually"
      },
      "currencyCode": "SEK",
      "premium": false,
      "requiresRegistrarFeeAcceptance": false,
      "eppRequired": true,
      "renewalAmount": 169,
      "supportedRegisterYears": [
        1,
        2,
        3,
        5
      ],
      "supportedTransferYears": [
        1
      ],
      "existingDomainId": null,
      "existingDomainServiceStatus": null,
      "registryRequirements": {
        "registration": [
          {
            "key": "phoneNumber",
            "label": "Phone number",
            "required": true,
            "appliesTo": "register",
            "registrantType": "any",
            "allowedCountryCodes": null,
            "allowedRegistrantTypes": null,
            "alternativeRequirementKey": null,
            "acceptedTermsKey": null,
            "reason": ".se and .nu domains require a registrant phone number before the order can be submitted."
          },
          {
            "key": "registrationIdentifier",
            "label": "Personal identity number or organization number",
            "required": true,
            "appliesTo": "register",
            "registrantType": "any",
            "allowedCountryCodes": null,
            "allowedRegistrantTypes": null,
            "alternativeRequirementKey": null,
            "acceptedTermsKey": null,
            "reason": ".se and .nu domains require a personal identity number or organization number for the registrant."
          },
          {
            "key": "acceptedTerms",
            "label": ".se registration terms",
            "required": true,
            "appliesTo": "register",
            "registrantType": "any",
            "allowedCountryCodes": null,
            "allowedRegistrantTypes": null,
            "alternativeRequirementKey": null,
            "acceptedTermsKey": "se_registration_terms",
            "reason": ".se domain registrations require acceptance of the registry registration terms before the order can be submitted."
          }
        ],
        "transfer": [
          {
            "key": "phoneNumber",
            "label": "Phone number",
            "required": true,
            "appliesTo": "transfer",
            "registrantType": "any",
            "allowedCountryCodes": null,
            "allowedRegistrantTypes": null,
            "alternativeRequirementKey": null,
            "acceptedTermsKey": null,
            "reason": ".se and .nu domains require a registrant phone number before the order can be submitted."
          },
          {
            "key": "registrationIdentifier",
            "label": "Personal identity number or organization number",
            "required": true,
            "appliesTo": "transfer",
            "registrantType": "any",
            "allowedCountryCodes": null,
            "allowedRegistrantTypes": null,
            "alternativeRequirementKey": null,
            "acceptedTermsKey": null,
            "reason": ".se and .nu domains require a personal identity number or organization number for the registrant."
          },
          {
            "key": "eppCode",
            "label": "Authorization code",
            "required": true,
            "appliesTo": "transfer",
            "registrantType": "any",
            "allowedCountryCodes": null,
            "allowedRegistrantTypes": null,
            "alternativeRequirementKey": null,
            "acceptedTermsKey": null,
            "reason": "Transfers for this domain extension require an authorization code from the current provider."
          }
        ],
        "countryEligibility": {
          "required": false,
          "allowedCountryCodes": null,
          "reason": null
        }
      }
    }
  ]
}
```

#### 202 - Availability check queued. Poll `operation.pollUrl` until status is completed or failed.
```json
{
  "operation": {
    "status": "queued",
    "jobId": "dcheck_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "pollUrl": "/api/v2/domains/availability/dcheck_01hxa3b4c5d6e7f8g9h0j1k2m3"
  }
}
```

#### 400 - Invalid request. The response body is an RFC 7807 Problem Details document.
```json
{
  "type": "https://developer.hostup.se/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request body failed validation.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z",
  "errors": [
    {
      "pointer": "/items/0/domainName",
      "detail": "`domainName` is required.",
      "code": "invalid_request"
    }
  ]
}
```

#### 404 - Not found. The resource does not exist or is not owned by the caller.
```json
{
  "type": "https://developer.hostup.se/errors/not_found",
  "title": "Not found",
  "status": 404,
  "detail": "The requested resource could not be found.",
  "code": "not_found",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 429 - Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
```json
{
  "type": "https://developer.hostup.se/errors/rate_limit_exceeded",
  "title": "Too many requests",
  "status": 429,
  "detail": "Too many requests. Retry after the limit resets.",
  "code": "rate_limit_exceeded",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 500 - Internal error. Retry later or contact support if the issue persists.
```json
{
  "type": "https://developer.hostup.se/errors/internal_error",
  "title": "Internal server error",
  "status": 500,
  "detail": "An unexpected error occurred. Retry later or contact support if the issue persists.",
  "code": "internal_error",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```
