Add a Creative to a Line Item
Gives a Creative of the Library to a Line Item. The ads of the Line Item are built from its Creatives. A Campaign Plan holds a pool of Creatives of the Library, at most 50. Each Line Item of the plan picks its Creatives from the pool, at most 20. The ads of a Line Item are built from the Creatives of that Line Item only. A Creative of the pool that no Line Item uses is not assigned yet.
When the Creative is not in the pool of the Campaign Plan, this call also puts it there. One Creative can be on many Line Items. Adding a Creative that the Line Item uses already changes nothing. A Creative with no Variation is valid. The call does not change the revision or the status of the Campaign Plan or of a Line Item. A validated Line Item stays validated.
A Creative that is deleted in the Library does not show in the answer. The read of the Line Item lists its Creatives.
/context/campaign-plans/{slug}/line-items/{lineItemId}/creativesAuthorizationBearer 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.
lineItemIdstringrequiredslugstringrequiredapplication/jsoncreativeIdstringrequiredThe id of a Creative in the Library of your organization, crv_…. List the Creatives with GET /library/creatives.
The Creatives of the Line Item after the call, oldest first.
creativesobject[]requiredThe Creatives of the Library that the Line Item uses, oldest first, at most 20. The ads of the Line Item are built from them. Each one is in the pool of the Campaign Plan. A Creative that the Library deleted is not listed.
Show propertiesHide properties
objectidstringrequiredThe id of the Creative in the Library, crv_….
namestring | nullrequiredThe name of the Creative, or null when nobody named it.
variationCountnumberrequiredThe number of Variations of the Creative. Read them with GET /library/creatives/{creativeId}.
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 campaign_plan: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 such Campaign Plan, no Line Item with that id on it, or no Creative with that id in the Library of your organization. A deleted Creative and the Creative of another organization are not found. error is not_found, and message names which one.
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 Line Item has 20 Creatives already, or the Creative needs a place in a pool that has 50 already. error is creative_limit. Nothing is written.
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.