Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview

Create a Placement group

Creates a Placement group of your organization: a named set of Placements. A group has no channel, and it holds Placements of any channel that your organization sees. The new group holds no Placement: add each one with POST /library/placement-groups/{groupId}/placements.

The name must be unique, ignoring case, among the groups that your organization sees. An organization holds 50 live groups at most.

POST/library/placement-groups
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>.

Use an API key (acr_…), from the AdCrunch console under Settings → API keys.

The credential names the organization, and no operation takes an organization parameter.

See https://docs.adcrunch.dev/api/authentication.

Request body
requiredapplication/json
descriptionstring | null

A free text, up to 1000 characters. AdCrunch trims it. An empty string is stored as no description.

max length 1000
namestringrequired

The name, 1 to 80 characters. AdCrunch trims it. It must be unique, ignoring case, among the ones that your organization sees.

min length 1 · max length 80
Responses
201

The new group, with isGlobal false.

createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

createdBystring | nullrequired

The user who created the group. null on a global row.

deletedAtnumber | nullrequired

Always null here. A deleted group is not answered.

descriptionstring | nullrequired

A free text. null when the group has none.

idstringrequired

The id of the group, plg_….

isGlobalbooleanrequired

true on a row that AdCrunch holds for every organization. You read it, and you cannot change or delete it.

namestringrequired

The name, 1 to 80 characters. It is unique, ignoring case, among the groups that the organization sees.

organizationIdstring | nullrequired

The organization that owns the group. null on a global row.

updatedAtnumber | nullrequired

When the group last changed. null until its first update.

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.

issuesobject[]required

One entry for each field that does not match.

Show properties
Array of object
instringrequired

The part of the request that holds the field.

Allowed:bodycookieheadersparamsquery
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

pathstringrequired

A JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_request
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

401

No API key, or one that does not resolve. See the security scheme. error is unauthorized.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:unauthorized
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

402

The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.

paywallUrlstring<uri>required

The page where an owner of the organization subscribes. Show it to the person.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:organization_unentitled
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

403

The caller does not hold library:write. error is forbidden.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:forbidden
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

409

The group cannot be created now. name_taken: a live group that your organization sees holds this name, ignoring case. placement_group_limit: your organization holds 50 live groups.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

Request
curl -X POST 'https://api.pr-1339.adcrunch.dev/library/placement-groups' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Vertical video"
}'
Response
{
  "createdAt": 1790000600000,
  "createdBy": "usr_2e5b84",
  "deletedAt": null,
  "description": null,
  "id": "plg_9e1c53",
  "isGlobal": false,
  "name": "Vertical video",
  "organizationId": "org_3a7f10",
  "updatedAt": null
}

Was this page helpful?