Skip to content
AdCrunch
Esc
navigateopen⌘Jpreview

Delete an Asset

Deletes our copy of an Asset and removes it from the library. A reservation whose bytes never arrived can be deleted too, which is how one is abandoned deliberately rather than left for the sweep.

This does not remove it from any provider. Once registered, the bytes are in that ad account’s library and are no longer ours to withdraw — remainingRegistrations counts how many still hold them. Say so to the user; letting them assume otherwise is worse than refusing.

DELETE/assets/{id}
Authorization
AuthorizationBearer token · headerrequired

Send 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.

Path parameters
idstringrequired
matches ^(ast_)[\s\S]{0,}$
Responses
200

The Asset is gone from AdCrunch. remainingRegistrations is how many provider libraries still hold the bytes.

okbooleanrequired
Allowed:true
remainingRegistrationsnumberrequired

How many provider libraries still hold these bytes. AdCrunch cannot withdraw them. Tell the person; letting them assume otherwise is worse.

401

No credential, or one that does not resolve. Send an API key or a session. 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:write. 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.

422

The request did not match this operation’s schema. This is the framework’s own shape, not the error/message one.

errorsobject[]required

One entry per failing field.

foundanyrequired

What was sent.

messagestringrequired
onstringrequired

Which part of the request failed: body, query or params.

propertystringrequired

The field that failed.

typestringrequired
Allowed:validation
Request
curl -X DELETE "https://api.adcrunch.dev/assets/string" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "ok": true,
  "remainingRegistrations": 0
}