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

List the organization Assets

Lists the active organization’s Assets, newest first. Each row carries its Registrations, so one read answers where every file is and what still needs registering. A reservation is excluded until finalize promotes it to ready, and so is a deleted Asset.

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. There is no filter.

GET/assets
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.

Query parameters
cursorstring
min length 1
limitintegerrequired
min 1 · max 500 · default: 100
Responses
200

One page of the stored Assets of the organization, newest first, each with its Registrations. An Asset registered nowhere carries an empty array. This page is the last one, so it carries no nextCursor.

dataobject[]required
Show properties
Array of object
contentHashstringrequired

AdCrunch’s own hash of the stored bytes. A hint for de-duplication, never an identity, and never a provider’s hash. Empty when the store reports none.

createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

createdBystringrequired

The user who reserved the upload.

deletedAtnumber | nullrequired

Always null here. A deleted Asset is not answered.

durationMsnumber | nullrequired

How long the video runs, in milliseconds, read from the header of the file at finalize. null for an image. For a video, null when the file does not state it, or for an Asset uploaded before AdCrunch read it.

filenamestringrequired

The name the file was uploaded under. Never a lookup key.

heightnumber | nullrequired

The height in pixels as the file is displayed, with its rotation applied, read from the header of the file at finalize. null when the file does not state it, or for an Asset uploaded before AdCrunch read it.

idstringrequired

The id of the Asset, ast_….

keystringrequired

Where the bytes are held. Read-only, and never sent by you.

kindstringrequired

Follows from mimeType, so the stored bytes verify it at finalize. It selects how a provider takes the file.

Allowed:imagevideo
mimeTypestringrequired

The Content-Type the file was uploaded with, verified against the stored bytes at finalize.

namestring | nullrequired

The name a person gave this Asset, and what a provider receives at a future registration. null until somebody renames it, and the filename is the fallback.

organizationIdstringrequired

The organization that owns the Asset.

sizeBytesnumberrequired

Read from the stored object at finalize.

statusstringrequired

ready once the bytes have been inspected. A pending Asset is a reservation whose bytes have not arrived, and no operation here answers one.

Allowed:pendingready
updatedAtnumber | nullrequired

When the Asset last changed, in milliseconds since the Unix epoch, UTC: at finalize, or at the last rename.

widthnumber | nullrequired

The width in pixels as the file is displayed, with its rotation applied, read from the header of the file at finalize. null when the file does not state it, or for an Asset uploaded before AdCrunch read it.

registrationsobject[]required

Each Registration of this Asset, one for each advertiser, with its state. An empty array means that the Asset has no Registration.

Show properties
Array of object
advertiserIdstringrequired

The advertiser whose provider library gets the Asset.

assetIdstringrequired

The Asset that the Registration places.

createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

deletedAtnumber | nullrequired

Always null here. When a retry replaces a failed Registration, AdCrunch sets this time on the old one and answers it no more.

failureReasonstring | nullrequired

Why the Registration failed, as a sentence: the words of the provider, or the words of AdCrunch. null unless status is failed.

idstringrequired

The id of the Registration, reg_….

organizationIdstringrequired

The organization that owns the Asset.

providerstringrequired

The provider that owns the advertiser.

Allowed:metagadstiktokxopenaisnapchatdv360
providerIdentifierstring | nullrequired

The id that the provider gave the file: a Meta image hash, or the id of the image or the video at the provider. null until the provider gives it, and null on a failed Registration. An image gets its id when the Registration becomes ready. A video gets its id earlier, while the Registration is running, because the provider gives the id before it has processed the file. Build a creative from a ready Registration only.

statusstringrequired

Video can stay running for several minutes while the provider processes it. That is normal, and not a failure.

Allowed:runningreadyfailed
updatedAtnumber | nullrequired

When the Registration last changed, in milliseconds since the Unix epoch, UTC. null until its first change.

uploadSessionIdstring | nullrequired

An in-flight provider upload session, where the protocol has one. null for every image.

workflowIdstringrequired

The durable execution that runs the Registration.

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.

403

The caller does not hold asset: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.

Request
curl -X GET 'https://api.pr-723.adcrunch.dev/assets?limit=100' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "data": [
    {
      "contentHash": "9d2f41b7c6e8a35014f7b2d9c3e6a810",
      "createdAt": 1790000000000,
      "createdBy": "usr_2e5b84",
      "deletedAt": null,
      "durationMs": 15000,
      "filename": "spring-sale.mp4",
      "height": 1920,
      "id": "ast_7c1e9a",
      "key": "org_3a7f10/ast_7c1e9a",
      "kind": "video",
      "mimeType": "video/mp4",
      "name": "Spring sale 9:16",
      "organizationId": "org_3a7f10",
      "sizeBytes": 24117248,
      "status": "ready",
      "updatedAt": 1790000120000,
      "width": 1080,
      "registrations": [
        {
          "advertiserId": "acc_1203456789012345",
          "assetId": "ast_7c1e9a",
          "createdAt": 1790000121000,
          "deletedAt": null,
          "failureReason": null,
          "id": "reg_4b81d2",
          "organizationId": "org_3a7f10",
          "provider": "meta",
          "providerIdentifier": "23843178520310445",
          "status": "ready",
          "updatedAt": 1790000249000,
          "uploadSessionId": "1264871528937461",
          "workflowId": "reg_4b81d2"
        }
      ]
    },
    {
      "contentHash": "4a7e1c9b0d3f26854b1e7a9c2d6f3081",
      "createdAt": 1789900000000,
      "createdBy": "usr_2e5b84",
      "deletedAt": null,
      "durationMs": null,
      "filename": "spring-sale-square.jpg",
      "height": 1080,
      "id": "ast_2d4f83",
      "key": "org_3a7f10/ast_2d4f83",
      "kind": "image",
      "mimeType": "image/jpeg",
      "name": null,
      "organizationId": "org_3a7f10",
      "sizeBytes": 486112,
      "status": "ready",
      "updatedAt": 1789900090000,
      "width": 1080,
      "registrations": []
    }
  ]
}