# Record an operator-supplied (externally obtained) certificate's metadata

> import connection certificate: CustomDomain™ API reference in the secure group. Covers request parameters, the request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/secure/importConnectionCertificate

## `POST https://api.customdomain.ai/v1/connections/{id}/ssl:import`

Mirrors the status + validity window of an external certificate for display (`managed=false`, so the edge does not ACME-renew it). Private key material is an edge concern and is not handled here. Returns 409 when another application tracks the domain's certificate row, unless this connection is the one the edge serves and the row's application serves nothing for the domain, in which case this connection takes the row over.

### Authentication

`widgetJWT`, `apiKey`

### Parameters

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

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `issuer` | string | no |  |
| `not_before` | string | no | RFC3339. |
| `not_after` | string | no | RFC3339. |

### Responses

| Status | Description |
| --- | --- |
| `200` | Imported |
| `400` | Error envelope: {code, title, details}. |
| `401` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |
| `409` | Error envelope: {code, title, details}. |
| `503` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `certificate` | object | no |  |

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