# Pin an application to an API date

> Pin an application to an API date: CustomDomain™ API reference in the applications group. Lists request parameters, the request body, responses and error codes.

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

## `PUT https://api.customdomain.ai/v1/applications/{id}/api-version`

An empty `version` clears the pin. Requires `app:write`.

### Authentication

`apiKey`, `managementKey`

### Parameters

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

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `version` | string | yes | A date from the list; empty clears the pin. |

### Responses

| Status | Description |
| --- | --- |
| `200` | Saved. |
| `400` | Error envelope: {code, title, details, request_id}. |
| `401` | Error envelope: {code, title, details, request_id}. |
| `403` | Error envelope: {code, title, details, request_id}. |
| `404` | Error envelope: {code, title, details, request_id}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `application_id` | string | no |  |
| `webhook_id` | string | no |  |
| `version` | string | yes | The pin; empty when none. |
| `effective` | string | yes |  |
| `current` | string | yes |  |
| `versions` | array of string | yes |  |

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