# Async one-click setup redirect target (public; authenticated by the signed state)

> dc callback: 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/dcCallback

## `GET https://api.customdomain.ai/v1/connect/dc/callback`

**Rail A (async one-click setup) redirect target**, distinct from `/connect/oauth/callback` (Mode C), which discards its one-time token. It consumes the signed single-use `state` (rail-bound to async), exchanges the code for a **durable async grant** at the provider API base pinned into the `state` at start (never re-derived from fresh discovery), applies the template, and persists the **encrypted** grant so the connection can be re-applied / reverted server-side. Records are applied with `data.via = async`.

### Authentication

None.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `code` | query | string | no |  |
| `state` | query | string | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | HTML finish page (postMessages the outcome to the vetted return origin) |
| `400` | Invalid, expired, replayed, or wrong-rail state |

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