---
search:
  tags:
    - Library placements
    - POST
seo:
  description: >-
    Creates a Placement of your organization: a slot where a provider shows an
    ad, with… Reference for the POST /library/placements endpoint in the
    AdCrunch API.
sidebar:
  label: Create a Placement
  badge: POST
title: Create a Placement
type: openapi-operation
---
Creates a Placement of your organization: a slot where a provider shows an ad, with the rules that an Asset should hold to fit it. The rules are advice. A Variation that breaks one is still written.

`channel` and `type` never change after the create. The name must be unique, ignoring case, among the Placements of the channel that your organization sees, its own and the global ones. An organization holds 200 live Placements at most.

`POST /library/placements`

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

- `channel` (string, required) — The channel of a Line Item that the Placement belongs to. It never changes.
- `description` (string | null) — A free text, up to 1000 characters. AdCrunch trims it. An empty string is stored as no description.
- `name` (string, required) — The name, 1 to 80 characters. AdCrunch trims it. It must be unique, ignoring case, among the ones that your organization sees.
- `rules` (object[], required) — The rules that an Asset should hold, 20 at most. All of them must hold. They are advice: a Variation that breaks one is still written. \`width\` and \`height\` are pixels, \`size\` is bytes, \`duration\` is milliseconds and is for a video Placement only. A \`ratio\` is a pair \`\[width, height\]\`, and two ratios are equal when they differ by 1 % at most. \`mime\` takes \`eq\`, \`ne\` and \`in\` only. An \`in\` list holds 50 values at most, and a \`mime\` string holds 255 characters at most.
- `type` (string, required) — The kind of Asset that the slot takes. It never changes.

Request body example:

```json
{
  "channel": "meta",
  "description": "Our own cut for Reels, never over 30 seconds.",
  "name": "Reels short cut",
  "rules": [
    {
      "operator": {
        "condition": "eq",
        "value": [
          9,
          16
        ]
      },
      "type": "ratio"
    },
    {
      "operator": {
        "condition": "lte",
        "value": 30000
      },
      "type": "duration"
    }
  ],
  "type": "video"
}
```

**Responses**

- `201` — The new Placement, with \`isGlobal\` false.
- `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. Or the rules do not fit the type of the Placement: a \`duration\` rule on an image. Then \`error\` is \`invalid\_rules\`.
- `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\`.
- `409` — The Placement cannot be created now. \`name\_taken\`: a live Placement of the same channel that your organization sees holds this name, ignoring case. \`placement\_limit\`: your organization holds 200 live Placements.

Response example, 201:

```json
{
  "channel": "meta",
  "createdAt": 1790000500000,
  "createdBy": "usr_2e5b84",
  "deletedAt": null,
  "description": "Our own cut for Reels, never over 30 seconds.",
  "id": "plm_4b8d27",
  "isGlobal": false,
  "name": "Reels short cut",
  "organizationId": "org_3a7f10",
  "params": {
    "rules": [
      {
        "operator": {
          "condition": "eq",
          "value": [
            9,
            16
          ]
        },
        "type": "ratio"
      },
      {
        "operator": {
          "condition": "lte",
          "value": 30000
        },
        "type": "duration"
      }
    ],
    "type": "video"
  },
  "type": "video",
  "updatedAt": null
}
```
