---
search:
  tags:
    - Variations
    - PATCH
seo:
  description: >-
    Sets or clears the Placement of a Variation.… Reference for the PATCH
    /library/creatives/{creativeId}/variations/{variationId} endpoint in the
    AdCrunch API.
sidebar:
  label: Update the Placement of a Variation
  badge: PATCH
title: Update the Placement of a Variation
type: openapi-operation
---
Sets or clears the Placement of a Variation. The Placement is the only field of a Variation that changes. The Asset never changes: to use another Asset, remove the Variation and add a new one.

The answer is the Variation, with its `placement`, its `brokenRules` and its `unknownRules`, as the read of the Variation gives them.

`PATCH /library/creatives/{creativeId}/variations/{variationId}`

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

- `placementId` (string | null, required) — The new Placement of the Variation. It must be a global Placement or one of your organization, and its \`type\` must be the kind of the Asset. Send \`null\` to clear the Placement. The rules of a Placement are advice: a Variation that breaks one is still written, and its read lists the broken rules.

Request body example:

```json
{
  "placementId": "plm_meta_stories_video"
}
```

**Responses**

- `200` — The Variation, with its new Placement.
- `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 Variation with that id in this Creative, no Creative with that id in this organization, or no Placement with that \`placementId\` that this organization sees. A removed Variation or a deleted Placement answers this too. \`error\` is \`not\_found\`.
- `409` — The Placement cannot go on this Variation, and nothing changed. \`error\` says why. \`placement\_type\_mismatch\`: the kind of the Asset is not the type of the Placement. \`variation\_exists\`: another Variation of this Creative already holds this Asset with this Placement.

Response example, 200:

```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",
  "brokenRules": [],
  "createdAt": 1790000360000,
  "createdBy": "usr_2e5b84",
  "creativeId": "crv_5e2a19",
  "deletedAt": null,
  "id": "var_8c3f60",
  "organizationId": "org_3a7f10",
  "placement": {
    "channel": "meta",
    "id": "plm_meta_stories_video",
    "name": "Meta Stories video",
    "type": "video"
  },
  "placementId": "plm_meta_stories_video",
  "unknownRules": [],
  "updatedAt": null
}
```
