SCALIX help

← All tools

lads_update_creative

LinkedIn Ads write high risk

Part of the LinkedIn Campaign Manager Agent.

What it does

Update an existing LinkedIn creative via partial update (POST with X-RestLi-Method: PARTIAL_UPDATE, body {patch:{$set:{...}}}). Editable fields are limited: intendedStatus (ACTIVE/PAUSED/DRAFT/ARCHIVED/CANCELED), name, leadgenCallToAction.label (and destination ONLY while DRAFT), content.eventAd.hidePreviewVideo (202505+), and for inline-content creatives the inline content fields (e.g. content.textAd.headline/description/landingPage/image, content.spotlight.*). content.reference for post-backed creatives is NOT editable here. This is also the activation step of preview->approve->commit: after an approved DRAFT, set intendedStatus=ACTIVE to send the creative to review. Show a before/after diff and require explicit approval for any content or status change; re-preview if the user modifies anything. The preview includes the current values of the fields being changed; when the creative already holds every value requested, the answer is changed: false with no preview_id. Returns 204 No Content on success (no body - re-GET to confirm). Inputs: creative URN + the specific fields to $set. 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 to activate an approved DRAFT (intendedStatus=ACTIVE), rename a creative, fix a lead-gen CTA label, or edit inline copy. ALWAYS show the before/after diff and get explicit approval; for content edits warn that the creative goes back to review. Re-preview if the user changes the request.

Inputs

NameTypeRequiredDescription
ad_account_idstringyesNumeric sponsored account ID; strip urn prefix and dashes. Server-derived from bearer scope; reject out-of-scope accounts.
creative_urnstringyesurn:li:sponsoredCreative:{id} or the bare numeric id, plain or already percent-encoded; Scalix encodes it exactly once for the path.
intended_statusstringnoNew status to $set: ACTIVE (activates + sends to review), PAUSED, DRAFT, ARCHIVED, CANCELED (delete with lads_delete_creative); upper-cased and checked at preview against LinkedIn's creative statuses, any other refused. PAUSED needs an APPROVED review: on a DRAFT creative, or one whose review is PENDING, REJECTED or NEEDS_REVIEW, it is refused at preview, naming the fix.
namestringnoNew creative name to $set.
leadgen_call_to_actionobjectno{label} always editable; {destination: adForm URN} editable ONLY while the creative is DRAFT (immutable once non-draft - IMMUTABLE_FIELD/CONDITIONAL_IMMUTABLE_FIELD).
content_patchobjectnoFor inline creatives, the content sub-object to $set (e.g. {textAd:{headline,description,landingPage,image}} or {spotlight:{...}} or {eventAd:{hidePreviewVideo}}). content.reference for post-backed creatives is not editable here (FIELD_NOT_EDITABLE).
preview_idstringnoOmit 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

Apply only the fields the user approved (no auto-approve, no silent extra edits). You cannot change the status of an in-review creative to PAUSED (returns 400). leadgenCallToAction.destination and other immutable fields cannot be changed once the creative leaves DRAFT (IMMUTABLE_FIELD/CONDITIONAL_IMMUTABLE_FIELD/FIELD_NOT_EDITABLE); a canceled creative cannot be updated (CANNOT_UPDATE_CANCELED_CREATIVE). Status transitions must be valid (TRANSITION_NOT_ALLOWED/TRANSITION_CONDITIONALLY_NOT_ALLOWED). Any content edit re-enters the review queue and must still meet editorial/policy standards (and, for recruitment/EU-sensitive edits, the anti-discrimination / politicalIntent checks).

Reminder

Show before/after, apply only the approved change, then confirm; re-preview on modification; strict per-account isolation.

Errors

Error classMeansWhat to doRetry
IN_REVIEW_PAUSE_BLOCKED400 - cannot change an in-review creative's status to PAUSED.Wait until review completes before pausing; do not retry immediately.no
IMMUTABLE_FIELD400 IMMUTABLE_FIELD / CONDITIONAL_IMMUTABLE_FIELD / FIELD_NOT_EDITABLE - attempting to edit a field fixed once non-draft (e.g. leadgen destination, content.reference).Surface that the field is immutable; create a new creative instead of editing.no
TRANSITION_NOT_ALLOWED400 TRANSITION_NOT_ALLOWED / TRANSITION_CONDITIONALLY_NOT_ALLOWED / CANNOT_UPDATE_CANCELED_CREATIVE - invalid status transition or editing a canceled creative.Choose a valid transition; do not update canceled creatives.no
INVALID_ARGUMENT400 - a content edit fails validation (FIELD_VALUE_TOO_LONG, INVALID_HREF, etc.).Relay the platform message; fix the named field and re-preview.no
TOKEN_REVOKEDAccess token expired/revoked; member must re-authorize.Refresh once and retry; else needs_reauth. Never log the token.yes
PERMISSION_DENIED403 - missing rw_ads / write role / out-of-scope account, or UNAUTHORIZED_ACCESS_TO_CHANGE_THE_REVIEW.Confirm scope and roles; do not retry until corrected.no
RESOURCE_EXHAUSTED429 daily app/member limit.Honor X-RateLimit-Reset; backoff 5/10/20s cap 60s; retry once.yes
PLATFORM_ERROR500/503 transient.Retry with backoff; report if persistent.yes

Edge cases

  • Activating (intendedStatus=ACTIVE) sends the creative to the review queue - it will not serve until APPROVED; confirm via lads_get_creative.review.status.
  • Effective status is min(creative, parent) - activating a creative under a PAUSED campaign still will not serve.
  • Editing inline content resets review to PENDING/NEEDS_REVIEW.
  • 204 returns no body - re-GET to confirm the applied change rather than parsing the response.
  • PARTIAL_UPDATE is idempotent for a $set; re-sending the same patch is safe.
  • Expired token -> refresh and retry once.
  • For recruitment/EU-sensitive content edits, re-run the anti-discrimination / politicalIntent checks before activating.