---
search:
  tags:
    - Line Items
    - POST
seo:
  description: >-
    Gives a Creative of the Library to a… Reference for the POST
    /context/campaign-plans/{slug}/line-items/{lineItemId}/creatives endpoint in
    the AdCrunch API.
sidebar:
  label: Add a Creative to a Line Item
  badge: POST
title: Add a Creative to a Line Item
type: openapi-operation
---
Gives a Creative of the Library to a Line Item. The ads of the Line Item are built from its Creatives. A Campaign Plan holds a pool of Creatives of the Library, at most 50. Each Line Item of the plan picks its Creatives from the pool, at most 20. The ads of a Line Item are built from the Creatives of that Line Item only. A Creative of the pool that no Line Item uses is not assigned yet.

When the Creative is not in the pool of the Campaign Plan, this call also puts it there. One Creative can be on many Line Items. Adding a Creative that the Line Item uses already changes nothing. A Creative with no Variation is valid. The call does not change the revision or the status of the Campaign Plan or of a Line Item. A validated Line Item stays validated.

A Creative that is deleted in the Library does not show in the answer. The read of the Line Item lists its Creatives.

`POST /context/campaign-plans/{slug}/line-items/{lineItemId}/creatives`

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

- `creativeId` (string, required) — The id of a Creative in the Library of your organization, \`crv\_…\`. List the Creatives with GET /library/creatives.

Request body example:

```json
{
  "creativeId": "crv_8c2e47"
}
```

**Responses**

- `200` — The Creatives of the Line Item after the call, oldest first.
- `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 \`campaign\_plan:write\`. \`error\` is \`forbidden\`.
- `404` — No such Campaign Plan, no Line Item with that id on it, or no Creative with that id in the Library of your organization. A deleted Creative and the Creative of another organization are not found. \`error\` is \`not\_found\`, and \`message\` names which one.
- `409` — The Line Item has 20 Creatives already, or the Creative needs a place in a pool that has 50 already. \`error\` is \`creative\_limit\`. Nothing is written.

Response example, 200:

```json
{
  "creatives": [
    {
      "id": "crv_8c2e47",
      "name": "Spring sale",
      "variationCount": 2
    }
  ]
}
```
