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

Update a Placement group

Changes the name or the description of a Placement group of your organization. A field that the body leaves out stays as it is. A global group cannot change: it answers 404. To change what the group holds, add or remove a Placement.

PATCH/library/placement-groups/{groupId}
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.

Path parameters
groupIdstringrequired

The Placement group id.

matches ^(plg_)[\s\S]{0,}$
Request body
requiredapplication/json
descriptionstring | null

The new description. Send null or an empty string to remove it. Leave it out to keep it.

max length 1000
namestring

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
200

The group, with the change.

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.

404

No Placement group of your organization with that id. A global group answers this too, because only AdCrunch changes one. error is not_found.

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.

409

Another live group that your organization sees holds this name, ignoring case. error is name_taken.

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 PATCH 'https://api.pr-1337.adcrunch.dev/library/placement-groups/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Vertical cuts"
}'
Response
{
  "createdAt": 1790000600000,
  "createdBy": "usr_2e5b84",
  "deletedAt": null,
  "description": null,
  "id": "plg_9e1c53",
  "isGlobal": false,
  "name": "Vertical cuts",
  "organizationId": "org_3a7f10",
  "updatedAt": 1790000900000
}

Was this page helpful?