---
search:
  tags:
    - Variations
    - POST
seo:
  description: >-
    Adds a Variation to a Creative: one rendition of the idea,… Reference for
    the POST /library/creatives/{creativeId}/variations endpoint in the AdCrunch
    API.
sidebar:
  label: Add a Variation
  badge: POST
title: Add a Variation
type: openapi-operation
---
Adds a Variation to a Creative: one rendition of the idea, which holds exactly one Asset. The Asset must be `ready`. One Asset can be in many Creatives, but in one live Variation of each Creative only.

A Variation has no name, no placement and no format. The `width`, `height` and `durationMs` of its Asset give its dimensions.

`POST /library/creatives/{creativeId}/variations`

**Request body** (`application/json`, required)

- `assetId` (string, required) — The Asset that the Variation holds. It must be \`ready\`, and of your organization.

Request body example:

```json
{
  "assetId": "ast_7c1e9a"
}
```

**Responses**

- `201` — The new Variation, with its Asset.
- `400` — The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. \`error\` is \`invalid\_request\`, and \`issues\` names each field. Nothing was changed.
- `401` — No API key, or one that does not resolve. See the security scheme. \`error\` is \`unauthorized\`.
- `402` — The organization has no active subscription. An owner subscribes at \`paywallUrl\`. \`error\` is \`organization\_unentitled\`.
- `403` — The caller does not hold \`library:write\`. \`error\` is \`forbidden\`.
- `404` — No Creative with that id, or no stored Asset with that \`assetId\`, in this organization. A deleted Asset answers this too. \`error\` is \`not\_found\`.
- `409` — The Asset cannot go in this Creative now. \`error\` says why. \`asset\_not\_ready\`: the Asset is still \`pending\`. \`asset\_failed\`: AdCrunch refused the file. \`variation\_exists\`: a Variation of this Creative already holds this Asset.

Response example, 201:

```json
{
  "asset": {
    "contentHash": "9d2f41b7c6e8a35014f7b2d9c3e6a810",
    "createdAt": 1790000000000,
    "createdBy": "usr_2e5b84",
    "deletedAt": null,
    "durationMs": 15000,
    "failureCode": null,
    "failureReason": null,
    "filename": "spring-sale.mp4",
    "height": 1920,
    "id": "ast_7c1e9a",
    "key": "org_3a7f10/ast_7c1e9a",
    "kind": "video",
    "mimeType": "video/mp4",
    "name": "Spring sale 9:16",
    "organizationId": "org_3a7f10",
    "sizeBytes": 24117248,
    "status": "ready",
    "updatedAt": 1790000120000,
    "width": 1080
  },
  "assetId": "ast_7c1e9a",
  "createdAt": 1790000360000,
  "createdBy": "usr_2e5b84",
  "creativeId": "crv_5e2a19",
  "deletedAt": null,
  "id": "var_8c3f60",
  "organizationId": "org_3a7f10",
  "updatedAt": null
}
```
