# Where this application's customer domains point

> Where this application's customer domains point: CustomDomain™ API reference in the applications group. Covers parameters, request body and responses.

Source: https://docs.customdomain.ai/docs/api-reference/applications/getConnectTarget

## `GET https://api.customdomain.ai/v1/applications/{id}/connect-target`

`mode: edge` (the default) points customer domains at the platform edge, which proxies their traffic to your origin (Power, Growth plan and up, once a default origin is set; without one the edge answers 421). `mode: custom` points them at your own infrastructure: subdomains get a CNAME to `cname_target`; a root domain gets an ALIAS, ANAME or flattened CNAME to it on providers that have one, and A records to `apex_ipv4` elsewhere. `edge` echoes what edge mode points at, so a console can show both options. A delegated agent token needs `app:read`.

### Authentication

`apiKey`, `agentToken`

### Parameters

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

### Responses

| Status | Description |
| --- | --- |
| `200` | Connection target |
| `401` | Error envelope: {code, title, details}. |
| `403` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `application_id` | string | yes |  |
| `mode` | `edge`, `custom` | yes |  |
| `connect_target` | object | no |  |
| `edge` | object | yes |  |
| `warnings` | array of string | no | Advisory notes on a target just saved (PUT only): that `cname_target` does not resolve yet, or that with no `apex_ipv4` root domains at providers with no ALIAS-style record cannot connect. |
| `existing_domains` | object | no | What a PUT did to the application's existing domains (PUT only). Domains still waiting for DNS that were already on the new routing count as kept. |

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