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

Detach an advertiser

Detaches an advertiser from a Brand. This brand context stops applying to that advertiser, so an agent working on it no longer reads this Brand. Nothing else changes: the advertiser stays connected to your organization, the Brand keeps every section, and a Campaign Plan that names the advertiser keeps naming it. AdCrunch resolves the provider from the advertiser, as the attach does, so the ownership check runs here too.

DELETE/context/brands/{slug}/advertisers/{advertiserId}
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.

Path parameters
advertiserIdstringrequired
matches ^acc_[\s\S]{0,}$
slugstringrequired
Responses
204

Detached. Unlike everything else here the link is hard-deleted: it has no content to preserve, and a tombstone would permanently occupy the only key that pair could use.

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.

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.

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 brand: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

error tells the two apart. not_found: no Brand with that slug. not_attached: the Brand exists and that advertiser was never attached to it.

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

That advertiser is not connected to this organization. error is advertiser_not_owned.

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.

Request
curl -X DELETE "https://api.pr-701.adcrunch.dev/context/brands/string/advertisers/string" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
Detached. Unlike everything else here the link is **hard-deleted**: it has no content to preserve, and a tombstone would permanently occupy the only key that pair could use.