Require a Placement
Adds one required Placement to a Creative, and answers the read of the Creative with its slots. The new slot is empty until a Variation of the Creative names the Placement. When the Creative already requires the Placement, nothing changes and the answer is the same.
One Creative requires 50 Placements at most.
/library/creatives/{creativeId}/placementsAuthorizationBearer token · headerrequiredSend 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.
creativeIdstringrequiredThe Creative id.
application/jsonplacementIdstringrequiredThe Placement to require. It must be a global Placement or one of your organization.
The Creative, with its required Placements after the add.
createdAtnumberrequiredMilliseconds since the Unix epoch, UTC.
createdBystringrequiredThe user who created the Creative.
deletedAtnumber | nullrequiredAlways null here. A deleted Creative is not answered.
idstringrequiredThe id of the Creative, crv_….
namestring | nullrequiredThe name a person gave the Creative. null when nobody named it. There is no fallback name.
organizationIdstringrequiredThe organization that owns the Creative.
updatedAtnumber | nullrequiredWhen the Creative last changed, in milliseconds since the Unix epoch, UTC. null until its first rename.
variationCountnumberrequiredHow many live Variations the Creative holds. The read of one Creative holds the first page of them, and the list of the Variations of the Creative gives each page.
requiredPlacementsobject[]requiredThe Placements that the Creative requires, ordered by channel and then name. Each one is a slot, filled or empty. Empty when nobody chose a Placement for the Creative. A Variation that names no required Placement is in variations and not here.
Show propertiesHide properties
objectchannelstringrequiredThe channel of a Line Item that the Placement belongs to.
metatiktoksnapchatgoogle_searchgoogle_pmaxgoogle_displayyoutubeprogrammatic_displaylinkedinxidstringrequiredThe id of the Placement, plm_….
namestringrequiredThe name of the Placement.
typestringrequiredThe kind of Asset that the Placement takes.
imagevideoisFilledbooleanrequiredTrue when a live Variation of the Creative names this Placement: the slot is filled. False when no live Variation does: the slot is empty, and the Creative still needs a file for it. A Variation that breaks a rule of the Placement still fills the slot, and its own read lists the broken rule. To fill an empty slot, add a Variation with this placementId, and only when the user names the Asset or confirms it.
variationsobjectrequiredShow propertiesHide properties
dataobject[]requiredShow propertiesHide properties
objectassetobjectrequiredShow propertiesHide properties
contentHashstringrequiredAdCrunch’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.
createdAtnumberrequiredMilliseconds since the Unix epoch, UTC.
createdBystringrequiredThe user who reserved the upload.
deletedAtnumber | nullrequiredAlways null here. A deleted Asset is not answered.
durationMsnumber | nullrequiredHow 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.
failureCodestring | nullrequiredWhy AdCrunch refused the file, as a code. Branch on this field, never on failureReason. unsupported_type: the bytes are not an accepted image or video. too_large: the file is over the size limit. unreadable: AdCrunch could not read the header of the file. source_unreachable: an import could not fetch the file from its source URL. source_length_unknown: the source of an import sent no Content-Length. null unless status is failed.
failureReasonstring | nullrequiredWhy AdCrunch refused the file, as a sentence. null unless status is failed.
filenamestringrequiredThe name the file was uploaded under. Never a lookup key.
heightnumber | nullrequiredThe 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.
idstringrequiredThe id of the Asset, ast_….
keystringrequiredWhere the bytes are held. Read-only, and never sent by you.
kindstringrequiredFollows from mimeType. It selects how a provider takes the file.
imagevideomimeTypestringrequiredThe type that finalize identified from the stored bytes. The Content-Type of the upload does not set it.
namestring | nullrequiredThe 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.
organizationIdstringrequiredThe organization that owns the Asset.
sizeBytesnumberrequiredRead from the stored object at finalize.
statusstringrequiredready once AdCrunch has inspected the bytes. Only a ready Asset can be registered. pending: the bytes have not been inspected yet. failed: AdCrunch refused the file and deleted it. failureCode and failureReason say why. A read answers an Asset in every status. A list answers ready Assets only.
pendingreadyfailedupdatedAtnumber | nullrequiredWhen the Asset last changed, in milliseconds since the Unix epoch, UTC: at finalize, or at the last rename.
widthnumber | nullrequiredThe 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.
assetIdstringrequiredThe id of the Asset that the Variation holds, ast_…. asset is that Asset. Its width, height and durationMs give the dimensions of the Variation.
brokenRulesobject[]requiredThe rules of the Placement that the Asset breaks, as the Placement stores them. They are advice: AdCrunch wrote the Variation anyway. Empty when placement is null. AdCrunch computes this list at each read, so a change of the rules of the Placement changes the next read.
Show propertiesHide properties
objectoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueintegerrequiredconditionstringrequirednevalueintegerrequiredconditionstringrequiredltvalueintegerrequiredconditionstringrequiredltevalueintegerrequiredconditionstringrequiredgtvalueintegerrequiredconditionstringrequiredgtevalueintegerrequiredconditionstringrequiredinvalueinteger[]requiredtypestringrequiredwidthoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueintegerrequiredconditionstringrequirednevalueintegerrequiredconditionstringrequiredltvalueintegerrequiredconditionstringrequiredltevalueintegerrequiredconditionstringrequiredgtvalueintegerrequiredconditionstringrequiredgtevalueintegerrequiredconditionstringrequiredinvalueinteger[]requiredtypestringrequiredheightoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueintegerrequiredconditionstringrequirednevalueintegerrequiredconditionstringrequiredltvalueintegerrequiredconditionstringrequiredltevalueintegerrequiredconditionstringrequiredgtvalueintegerrequiredconditionstringrequiredgtevalueintegerrequiredconditionstringrequiredinvalueinteger[]requiredtypestringrequiredsizeoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequirednevalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredltvalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredltevalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredgtvalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredgtevalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredinvalueinteger[][]requiredtypestringrequiredratiooperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvaluestringrequiredconditionstringrequirednevaluestringrequiredconditionstringrequiredinvaluestring[]requiredtypestringrequiredmimeoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueintegerrequiredconditionstringrequirednevalueintegerrequiredconditionstringrequiredltvalueintegerrequiredconditionstringrequiredltevalueintegerrequiredconditionstringrequiredgtvalueintegerrequiredconditionstringrequiredgtevalueintegerrequiredconditionstringrequiredinvalueinteger[]requiredtypestringrequireddurationcreatedAtnumberrequiredMilliseconds since the Unix epoch, UTC.
createdBystringrequiredThe user who added the Variation.
creativeIdstringrequiredThe Creative that the Variation belongs to, crv_….
deletedAtnumber | nullrequiredAlways null here. A removed Variation is not answered.
idstringrequiredThe id of the Variation, var_….
organizationIdstringrequiredThe organization that owns the Creative.
placementobject | nullrequiredThe Placement that the Variation names, or null. null also when the Placement was deleted after the Variation named it.
Show propertiesHide properties
channelstringrequiredThe channel of a Line Item that the Placement belongs to.
metatiktoksnapchatgoogle_searchgoogle_pmaxgoogle_displayyoutubeprogrammatic_displaylinkedinxidstringrequiredThe id of the Placement, plm_….
namestringrequiredThe name of the Placement.
typestringrequiredThe kind of Asset that the Placement takes.
imagevideoplacementIdstring | nullrequiredThe id of the Placement that the Variation names, plm_…, or null when it names none.
unknownRulesobject[]requiredThe rules of the Placement that need a fact that the Asset does not have: a width, a height, a duration or a ratio of an Asset that AdCrunch could not read. They are neither held nor broken. Empty when placement is null. AdCrunch computes this list at each read.
Show propertiesHide properties
objectoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueintegerrequiredconditionstringrequirednevalueintegerrequiredconditionstringrequiredltvalueintegerrequiredconditionstringrequiredltevalueintegerrequiredconditionstringrequiredgtvalueintegerrequiredconditionstringrequiredgtevalueintegerrequiredconditionstringrequiredinvalueinteger[]requiredtypestringrequiredwidthoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueintegerrequiredconditionstringrequirednevalueintegerrequiredconditionstringrequiredltvalueintegerrequiredconditionstringrequiredltevalueintegerrequiredconditionstringrequiredgtvalueintegerrequiredconditionstringrequiredgtevalueintegerrequiredconditionstringrequiredinvalueinteger[]requiredtypestringrequiredheightoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueintegerrequiredconditionstringrequirednevalueintegerrequiredconditionstringrequiredltvalueintegerrequiredconditionstringrequiredltevalueintegerrequiredconditionstringrequiredgtvalueintegerrequiredconditionstringrequiredgtevalueintegerrequiredconditionstringrequiredinvalueinteger[]requiredtypestringrequiredsizeoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequirednevalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredltvalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredltevalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredgtvalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredgtevalueinteger[]requiredShow propertiesHide properties
integerintegerintegerconditionstringrequiredinvalueinteger[][]requiredtypestringrequiredratiooperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvaluestringrequiredconditionstringrequirednevaluestringrequiredconditionstringrequiredinvaluestring[]requiredtypestringrequiredmimeoperatorobjectrequiredShow propertiesHide properties
conditionstringrequiredeqvalueintegerrequiredconditionstringrequirednevalueintegerrequiredconditionstringrequiredltvalueintegerrequiredconditionstringrequiredltevalueintegerrequiredconditionstringrequiredgtvalueintegerrequiredconditionstringrequiredgtevalueintegerrequiredconditionstringrequiredinvalueinteger[]requiredtypestringrequireddurationupdatedAtnumber | nullrequiredWhen the Placement of the Variation last changed, or null when it never did. Only the Placement changes: the Asset of a Variation never changes.
nextCursorstringSend this value as cursor to get the next page. It is absent on the last page.
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[]requiredOne entry for each field that does not match.
Show propertiesHide properties
objectinstringrequiredThe part of the request that holds the field.
bodycookieheadersparamsquerymessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
pathstringrequiredA JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
invalid_requestmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
No API key, or one that does not resolve. See the security scheme. error is unauthorized.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
unauthorizedmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.
paywallUrlstring<uri>requiredThe page where an owner of the organization subscribes. Show it to the person.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
organization_unentitledmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
The caller does not hold library:write. error is forbidden.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
forbiddenmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
No Creative with that id in this organization, or no Placement with that placementId that this organization sees. A deleted Creative or Placement answers this too. error is not_found.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
messagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
The Creative already requires 50 Placements, which is the most. Nothing was written. error is creative_placement_limit.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
messagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.