# Check the customer's keyless access and write the connection's records

> complete keyless: reference page for this CustomDomain™ API operation in the connections group. Covers parameters, request body, responses and error codes.

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

## `POST https://api.customdomain.ai/v1/connections/{id}/keyless:complete`

**Keyless access, second step.** Checks the access the customer set up and writes the connection's records, which then propagate as after an API key apply. Calling it again re-applies the records. Branch on `code`: `keyless_not_granted`, `keyless_proof_missing` and `keyless_revoked` (409), `keyless_zone_not_found` (404), `keyless_invalid` (400) and `keyless_unavailable` (503, nothing was changed, try again).

### Authentication

`widgetJWT`, `apiKey`

### Parameters

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

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `provider` | string | no | The DNS provider, `azuredns` or `gcpdns`. |

### Responses

| Status | Description |
| --- | --- |
| `200` | The records were written and the connection is propagating. |
| `400` | Error envelope: {code, title, details, request_id}. |
| `401` | Error envelope: {code, title, details, request_id}. |
| `403` | `forbidden`: the credential may not do this. `token_wrong_end_user`: a widget token that is not this connection's end user (the connection names another end user than the token's `end_user_ref`, or names one while the token names none); nothing is read or changed, and the answer shows nothing of the connection. Mint the token with the end user's `end_user_ref`. |
| `404` | Error envelope: {code, title, details, request_id}. |
| `409` | Error envelope: {code, title, details, request_id}. |
| `503` | Error envelope: {code, title, details, request_id}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `connection` | object | yes |  |
| `records` | array of object | yes |  |
| `provider` | string | yes |  |
| `zone` | string | yes |  |

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