Layers
Partner APIAPI referenceAds

DELETE /v1/projects/:projectId/ads/:platform/campaigns/:campaignId

Soft-delete a campaign on the platform.

View as Markdown
DELETE/v1/projects/:projectId/ads/{platform}/campaigns/:campaignId
Phase 1stable
Auth
Bearer
Scope
ads:write:lifecycle

Marks the campaign deleted on the platform (Meta DELETED, TikTok DELETE, Apple REMOVED). Most platforms preserve historical metrics for the deleted campaign indefinitely; Layers' GET …/campaigns?status=deleted continues to return it.

Same shape applies to adsets and ads:

  • DELETE …/adsets/:adsetId
  • DELETE …/ads/:adId

Authority

Delete is gated by the structural axis. With structural: "off" (the default for manual campaigns), every delete is denied.

Request

curl -X DELETE https://api.layers.com/v1/projects/$PROJECT_ID/ads/meta/campaigns/$CAMPAIGN_ID \
  -H "Authorization: Bearer $LAYERS_API_KEY"

Response

202 { jobId, verdictId }. The platform-side dispatch happens via the gate.

Errors

CodeWhen
AUTHORITY_DENIEDstructural axis is off.
FORBIDDEN_SCOPEKey lacks ads:write:lifecycle.

See also

On this page