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

List the Creatives that hold an Asset

Lists the Creatives that hold the Asset in a live Variation, newest first. Each row has the id and the name of the Creative, and variationCount: how many of its live Variations hold the Asset. A deleted Creative and a removed Variation are not counted.

An Asset that no Variation holds gives an empty page. DELETE /library/assets/{id} refuses with 409 asset_in_use while this list is not empty.

One page at a time: limit rows at most, 100 by default. When the answer holds nextCursor, more rows exist: send it back as cursor to get the next page. A cursor of another Asset is refused. An Asset of another organization answers 404, so this API does not confirm that an id exists somewhere else.

GET/library/assets/{id}/creatives
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
idstringrequired

The Asset id.

matches ^(ast_)[\s\S]{0,}$
Query parameters
cursorstring

The nextCursor of the previous page. Omit it to get the first page. Send it with no change, and with the same filters as the request that answered it: a cursor from a different query gets a 400 invalid_cursor. Do not build or change a cursor.

min length 1
limitintegerrequired

The greatest number of rows on the page, from 1 to 500. The default is 100. A greater value gets a 400, with error of invalid_request.

min 1 · max 500 · default: 100
Responses
200

One page of the Creatives that hold the Asset, newest first. This page is the last one, so it carries no nextCursor.

dataobject[]required
Show properties
Array of object
idstringrequired

The id of the Creative, crv_….

namestring | nullrequired

The name of the Creative, or null when nobody named it.

variationCountnumberrequired

How many live Variations of this Creative hold the Asset. At least 1. One Creative holds one Asset in several Variations when their Placements differ.

nextCursorstring

Send this value as cursor to get the next page. It is absent on the last page.

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 AdCrunch cannot use the cursor: it cannot read it, or the cursor belongs to a different query. Then error is invalid_cursor. Send the nextCursor of the previous page with no change, or omit cursor to get the first page.

Any of:
object
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.

object
errorstringrequired

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

Allowed:invalid_cursor
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:read. 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 stored Asset with that id in this organization. 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.

Request
curl -X GET 'https://api.pr-1356.adcrunch.dev/library/assets/string/creatives?limit=100' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "data": [
    {
      "id": "crv_5e2a19",
      "name": "Spring sale",
      "variationCount": 2
    }
  ]
}

Was this page helpful?