Record what a Line Item spawned
Records one provider object that this Line Item created. The caller that created the object writes this record, because only that caller knows which line the object belongs to.
A record is a fact, not an attempt. AdCrunch keeps the attempts in the mutation ledger.
This call refuses almost nothing. The provider object already exists, and a refusal would leave it live and untracked. If you record the same object again, the answer is 200 with the existing row, and not 201.
AdCrunch never removes a record. It can tell you how many objects a line created. It cannot tell you how many objects a line must create, because a plan never declares that number.
/context/campaign-plans/{slug}/line-items/{lineItemId}/executionsAuthorizationBearer token · headerrequiredSend Authorization: Bearer <credential>. Two credentials work.
An API key (acr_…) is what a server integration uses. Create one in the AdCrunch console under Settings → API keys — see https://docs.adcrunch.dev/account/api-keys. A key is bound to the organization that was active when you created it, and it keeps acting on that organization whatever you do later. It carries the permissions of the member who created it.
A session issued by the AdCrunch sign-in flow also works, which is how the console calls this service from the browser.
Either way the organization comes from the credential. There is no organization parameter.
lineItemIdstringrequiredslugstringrequiredapplication/jsonadvertiser_idstringrequiredThe ad account the object was created in.
entity_idstringrequiredThe native provider id, unprefixed — exactly as the Insight entities table holds it, which is what makes the two joinable.
entity_typestringrequiredThe provider’s own word for the level: campaign, adset, ad. Free text, because the vocabulary is the provider’s.
mutation_workflow_idstringThe mutation that performed the write, when known — links this fact to the attempt without either duplicating the other.
providerstringrequiredShow propertiesHide properties
stringstringstringstringstringstringstringThis object was already recorded against this line. The existing row comes back unchanged, so the call is idempotent — recording twice does not inflate what the line has spawned.
advertiserIdstringrequiredcreatedAtnumberrequiredMilliseconds since the Unix epoch, UTC.
entityIdstringrequiredThe provider’s own id, unprefixed, so it joins to entities.
entityTypestringrequiredThe provider’s word for the level — campaign, adset, ad.
idstringrequiredmutationWorkflowIdstring | nullrequiredThe durable execution that performed the write, when known.
providerstringrequiredRecorded. Neither response shape was observed against the deployed service, because the verification organization has no connected advertiser — both are written from the Context Layer’s view type.
advertiserIdstringrequiredcreatedAtnumberrequiredMilliseconds since the Unix epoch, UTC.
entityIdstringrequiredThe provider’s own id, unprefixed, so it joins to entities.
entityTypestringrequiredThe provider’s word for the level — campaign, adset, ad.
idstringrequiredmutationWorkflowIdstring | nullrequiredThe durable execution that performed the write, when known.
providerstringrequiredNo credential, or one that does not resolve. Send an API key or a session. 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 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 plan, or no Line Item with that id on it. 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.
That ad account is not connected to this organization. error is advertiser_not_owned. Almost nothing else is refused here, deliberately: the provider object already exists, and refusing the record would leave it live and untracked.
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.