---
title: "/assets/:assetId/versions/:versionId/cdnLink"
method: POST
path: "/v1/assets/{assetId}/versions/{versionId}/cdnLink"
tags: ["Assets"]
deprecated: true
---

# /assets/:assetId/versions/:versionId/cdnLink

`POST /v1/assets/{assetId}/versions/{versionId}/cdnLink`

## Request

- Base URL: `api.air.inc` (relative, and the document’s source URL is not known)
- URL: `api.air.inc/v1/assets/{assetId}/versions/{versionId}/cdnLink`
- Auth: one of:
  - API key in header `x-api-key` and API key in header `x-air-workspace-id`
  - HTTP bearer and API key in header `x-air-workspace-id`
- TypeScript: <https://skmtc.dev/air/apis/air-api/docs/v1/assets/:assetId/versions/:versionId/cdnLink/post.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

Create a version-pinned CDN link for an asset (deprecated).

Use `POST /v1/assets/{assetId}/cdnLinks` with `{ "versionId": "<versionId>" }` instead.

Returns `409 Conflict` if a link already exists for this version. Use `GET /v1/assets/{assetId}/cdnLinks` to retrieve the existing link.

## Response `201`

CDN link created successfully

- CdnLink
  - `id` string, required: The CDN link ID
  - `url` string, uri, required: The public CDN URL for the asset or version
  - `assetId` string, required: The asset this CDN link belongs to
  - `followsDefaultVersion` boolean, required: When true, the link serves the asset's current default version. When false, the link is pinned to a specific version (`versionId`).
  - `active` boolean, required: Whether the CDN link is active and serving content
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `versionId` string: Present when `followsDefaultVersion` is false — the pinned asset version ID

## Other responses

- `400`: Invalid request body, asset too large for CDN links, or missing storage location
- `409`: A CDN link already exists for this version
- `422`: CDN Links are not enabled for this workspace

---

[API](https://skmtc.dev/air/apis/air-api.md) - [All operations](https://skmtc.dev/air/apis/air-api/llms.txt) - [OpenAPI document](https://skmtc.dev/air/apis/air-api/revisions/8e6005b272a1?raw)
