# Supply the connection's desired DNS record set

> Supply the connection's desired DNS record set: CustomDomain™ API reference in the connections group. Covers parameters, the request body, responses and errors.

Source: https://docs.customdomain.ai/docs/api-reference/connections/setConnectionRecords

## `PUT https://api.customdomain.ai/v1/connections/{id}/records`

Replaces the connection's desired record set with one the INTEGRATOR authored, for records that cannot be derived from the domain; the motivating case is Amazon SES email verification, whose three Easy-DKIM CNAMEs are minted per domain by SES. The supplied set then behaves exactly like ours: the OAuth rail writes it with the customer's provider credential, the widget renders it for manual setup, and the propagation poller verifies it before the connection goes live.

Server-to-server only (API key): a widget JWT lives in a browser and may not choose the records we write into a customer's zone. Hosts are relative to the connection (`@`, `_dmarc`, `sel._domainkey`) and must resolve inside its zone. The Domain Connect rail refuses a connection carrying a supplied set, because that rail applies OUR published templates at the provider, so it cannot write records it did not author.

### Authentication

`apiKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `records` | array of object | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | The connection's new desired record set |
| `400` | Error envelope: {code, title, details}. |
| `401` | Error envelope: {code, title, details}. |
| `403` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |
| `409` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `connection_id` | string | yes |  |
| `records_source` | `integrator` | yes |  |
| `records` | array of object | yes |  |

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