# Get domain info

> **POST** `https://api.us.nylas.com/v3/admin/domains/{domain_id}/info`

Source: https://developer.nylas.com/docs/reference/api/manage-domains/get-domain-info/

<div id="admonition-warning">⚠️ <b>Before you can use the Manage Domains endpoints, you need a <a href="/docs/v3/auth/nylas-service-account/">Nylas Service Account</a></b>.</div>

Returns the DNS record information and verification status for the specified verification type.
Use this endpoint to retrieve the DNS records you need to add at your DNS provider before
calling the [Verify domain](/docs/reference/api/manage-domains/verify-domain/) endpoint.

**Authentication:** NYLAS_API_KEY, ACCESS_TOKEN

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `domain_id` | string | Yes | ID of the domain to get DNS info for. |

### Header parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `X-Nylas-Signature` | string | Yes | A Base64-encoded signature using your private key's RSA with a 2048-bit key and an SHA-256 hashed string of the path, method, timestamp, nonce, and payload. |
| `X-Nylas-Kid` | string | Yes | The `private_key_id` from your Service Account JSON file. |
| `X-Nylas-Nonce` | string | Yes | A randomly generated nonce. Each request needs to have a unique nonce. If you try to reuse a nonce, Nylas rejects the request. |
| `X-Nylas-Timestamp` | number | Yes | The time when you submit your request, in seconds using the Unix timestamp format. This timestamp should fall within a 5-minute window of your real request time. |

## Request body

Content-Type: application/json

- `type` (string) **(required)** - The type of DNS verification to get info for.

## Responses

### 200 - OK

- `request_id` (string) - ID of the request.
- `data` (object)
  - `domain_id` (string) - The ID of the domain.
  - `attempt` (object) - Details about the DNS records required for this verification type.
    - `type` (string) - The type of DNS verification.
    - `options` (object) - The DNS record values to configure at your DNS provider.
      - `host` (string) - The DNS host value.
      - `type` (string) - The DNS record type.
      - `value` (string) - The DNS record value to set.
  - `status` (string) - The current verification status for this type.
  - `created_at` (number) - When the info record was created, in seconds using the Unix timestamp format.
  - `expires_at` (number) - When the info record expires, in seconds using the Unix timestamp format. Some verification values are temporary and change after expiration.
  - `message` (string) - A human-readable message about the current status.

### 400 - Bad Request

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

### 401 - Unauthorized

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

### 404 - Not Found

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The raw error from the provider, if available
    - `code` (string)
    - `message` (string)

### 429 - Rate Limit

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.

## Code samples

### cURL

```bash
curl -X POST "https://api.us.nylas.com/v3/admin/domains/<DOMAIN_ID>/info" \
  -H "Content-Type: application/json" \
  -H "X-Nylas-Signature: <BASE64_SIGNATURE>" \
  -H "X-Nylas-Kid: <SERVICE_ACCOUNT_ID>" \
  -H "X-Nylas-Nonce: <NONCE>" \
  -H "X-Nylas-Timestamp: 1742932766" \
  -d '{
    "type": "ownership"
  }'
```

### Python SDK

```python
from nylas import Client
from nylas.handler.service_account import ServiceAccountSigner

nylas = Client(
    "<NYLAS_API_KEY>",
    "<NYLAS_API_URI>",
)

signer = ServiceAccountSigner(
    private_key_pem="<SERVICE_ACCOUNT_PRIVATE_KEY_PEM>",
    private_key_id="<SERVICE_ACCOUNT_ID>",
)

info = nylas.domains.get_info(
    domain_id="<DOMAIN_ID>",
    request_body={
        "type": "ownership",
    },
    signer=signer,
)

print(info)

```
