# One-click sync return (public; authenticated by the signed state)

> dc sync return: 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/dcSyncReturn

## `GET https://api.customdomain.ai/v1/connect/dc/return/{state}`

Where the DNS provider sends the browser after the user approves or cancels a one-click sync apply. It is the `redirect_uri` the signed `apply_url` carries, **not** a bearer-authenticated endpoint. The signed single-use `state` rides in the path because some providers (Cloudflare) drop the separate `state` parameter. It records a provider-reported `error` on the connection, runs the propagation check at once, and returns the same HTML finish page as the OAuth callback, which postMessages `{ type: "customdomain:oauth", payload }` to the origin vetted at start (`payload.nonce` repeats the start's `client_nonce` when it sent one). A clean return never marks the connection live by itself: only the records appearing in public DNS do.

### Authentication

None.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `state` | path | string | yes |  |
| `error` | query | string | no | OAuth 2.0 error code the provider reports (access_denied when the user cancels). |
| `error_description` | query | string | no |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | HTML finish page (postMessages the outcome to the vetted return origin) |
| `400` | Invalid, expired, replayed, or wrong-rail state |
| `503` | The return is not configured on this server |

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