DELETE /v1/projects/:projectId/ads/:platform/campaigns/:campaignId
Soft-delete a campaign on the platform.
/v1/projects/:projectId/ads/{platform}/campaigns/:campaignId- 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/:adsetIdDELETE …/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
| Code | When |
|---|---|
AUTHORITY_DENIED | structural axis is off. |
FORBIDDEN_SCOPE | Key lacks ads:write:lifecycle. |
See also
POST /v1/projects/:projectId/ads/:platform/campaigns/:campaignId/{pause,resume}
Pause or resume a campaign. Layers translates the verb to the platform's status enum.
GET / PATCH /v1/projects/:projectId/ads/:platform/campaigns/:campaignId/authority
Read or update a campaign's bucket-mode authority block (creative / tactical / structural axes).