lads_delete_creative
LinkedIn Ads write high risk
Part of the LinkedIn Campaign Manager Agent.
What it does
Delete a LinkedIn creative. This soft-deletes the creative (partial-update intendedStatus=PENDING_DELETION; it becomes REMOVED but stays fetchable while performance data or the underlying post exists). Deletion is irreversible (the preview includes a warning saying so) - confirm explicitly, log the action, and prefer ARCHIVED/PAUSED if the user only wants to stop serving. Returns 204 No Content. A creative already PENDING_DELETION or REMOVED gets changed: false and no preview_id. One creative per call. Inputs: creative URN, confirmation. Two-phase (parity with Google, ADR-028/029): the first call (no preview_id) reads the creative from LinkedIn (a nonexistent id is refused), builds the request locally and returns a preview_id — nothing is changed on LinkedIn; re-call with that preview_id and identical arguments to COMMIT (single-use, 30-min; a changed/forged/replayed token fails closed).
When to use it
Use only when the user explicitly wants a creative removed (not merely paused). Confirm it is irreversible (this tool always soft-deletes to PENDING_DELETION, which also works on DRAFT creatives; one creative per call) and suggest ARCHIVED/PAUSED if they only want to stop serving.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
ad_account_id | string | yes | Numeric sponsored account ID; strip urn prefix and dashes. Server-derived from bearer scope; reject out-of-scope accounts. |
creative_urn | string | yes | urn:li:sponsoredCreative:{id} or the bare numeric id, plain or already percent-encoded; Scalix encodes it exactly once for the path. One creative per call. |
confirm | boolean | yes | Explicit user confirmation that the (irreversible) delete was approved. Without it the preview still runs and says confirm=true is needed, and the commit is refused (invalid_argument); nothing is deleted. |
preview_id | string | no | Omit it to preview: nothing is applied, and the call returns a preview_id bound to this exact request. Pass it only after the user approves that preview in a later message, with the same arguments (leave out validate_only, and add any confirmation flag the preview names). Single-use, expires in 30 minutes; changed arguments need a fresh preview. |
Safeguards
A change in two steps. The first call previews and changes nothing; Claude shows you the preview and applies it only after you approve, within 30 minutes and with the same arguments. Every applied change goes to the audit log. How changes are approved.
Policy
Deletion is irreversible and requires explicit confirmation and an audit-log entry (no auto-delete). Hard DELETE is only permitted for DRAFT creatives, creatives under a DRAFT campaign, or video creatives in PROCESSING_FAILED; all others must go through PENDING_DELETION. REMOVED creatives must remain fetchable due to retained performance data - do not assume the record vanishes.
Reminder
Confirm the irreversible delete and log it; prefer pause/archive if the user only wants to stop serving; strict per-account isolation.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
TRANSITION_NOT_ALLOWED | 400 TRANSITION_NOT_ALLOWED / CANNOT_UPDATE_CANCELED_CREATIVE - cannot move the creative to PENDING_DELETION from its current state. | Surface the invalid transition; do not retry. | no |
CUSTOMER_NOT_FOUND | 404 INVALID_VALUE_NOT_EXIST - the creative is not found under this account. | Verify the URN and account; do not retry blindly. | no |
TOKEN_REVOKED | Access token expired/revoked; member must re-authorize. | Refresh once and retry; else needs_reauth. Never log the token. | yes |
PERMISSION_DENIED | 403 - missing rw_ads / write role / out-of-scope account. | Confirm scope and roles; do not retry until corrected. | no |
RESOURCE_EXHAUSTED | 429 daily app/member limit. | Honor X-RateLimit-Reset; backoff 5/10/20s cap 60s; retry once. | yes |
PLATFORM_ERROR | 500/503 transient. | Retry with backoff; report if persistent. | yes |
Edge cases
- This tool always soft-deletes (intendedStatus PENDING_DELETION), which LinkedIn also takes for a DRAFT creative; it never sends the hard DELETE.
- PENDING_DELETION transitions to REMOVED but stays fetchable while performance data or the underlying post exists - it is not a literal disappearance.
- One creative per call: this tool sends no batch delete.
- Deleting a creative does not delete the underlying ugcPost/document/conversation - clean those up separately if intended.
- Without confirm=true the commit is refused (invalid_argument) and nothing is deleted; the preview says confirm=true is needed.
- 204 returns no body; re-GET (it may still resolve for REMOVED) or re-list to confirm.
- Expired token -> refresh and retry once.
- The creative is read and patched under ad_account_id's path.