lads_create_text_creative
LinkedIn Ads write medium risk
Part of the Sponsored Content Agent.
What it does
Create a Text Ad creative (campaignFormat TEXT_AD, right-rail desktop placement) on the LinkedIn Creatives API. Unlike feed formats, Text Ads carry their content inline as content.textAd (no UGC post reference): headline, description, landingPage and an optional 100x100 image URN. Preview->approve->commit: LinkedIn has no validate-only flag, so ALWAYS create intendedStatus=DRAFT, show the exact headline/description/landing page/image and the character-limit + editorial check, get explicit approval, then activate via lads_update_creative. Returns creative URN in x-restli-id (201). Hard limits: headline <=25 chars, description <=75 chars, image 100x100px <=2MB JPG/PNG, landingPage <=500 chars. Report later with LP CTR/LP CPC (cost fields from adAnalytics are strings). Inputs: campaign URN, headline, description, landingPage, optional image URN, name. Two-phase (parity with Google, ADR-028/029): the first call (no preview_id) reads the campaign from LinkedIn in this ad account (a nonexistent one 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 for low-cost right-rail text+thumbnail ads. Build in DRAFT, show the trimmed headline/description (front-load within the 25/75 caps) and the editorial check, get explicit approval, then activate. Re-preview if copy changes. First call lads_plan_dynamic_ad_campaign for the campaign blueprint, operation ordering, and policy pre-checks.
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. |
campaign | string | yes | Parent campaign URN; must be a TEXT_AD campaign (CAMPAIGN_EXCEEDING_CREATIVE_TYPE_LIMIT otherwise). Percent-encode in paths. |
headline | string | yes | Main message; <=25 chars including spaces (FIELD_VALUE_TOO_LONG if exceeded). |
description | string | yes | Required (LinkedIn refuses a text ad without it): supporting text; <=75 chars including spaces. |
landing_page | string | yes | Destination URL; absolute, http/https, <=500 chars (INVALID_HREF / INVALID_CLICK_URI / UNSAFE_HREF otherwise). |
image | string | no | Image URN urn:li:image:{id}, exactly 100x100px, <=2MB, JPG/PNG. Optional - if omitted, no image. Mutually exclusive with a raw image-id (IMAGE_URN_EXCLUSIVE_WITH_IMAGE_ID). |
intended_status | string | no | Enum ACTIVE|PAUSED|DRAFT|ARCHIVED; enum-normalize upper-case; default/required DRAFT on create. |
name | string | no | Creative name (202410+); reference only. |
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
Text Ads are inline content with NO post reference (rejection REFERENCE_NOT_ALLOWED_FOR_TEXT_AD_CREATIVE). They must obey strict editorial limits: no excessive capitalization (EXCESSIVE_CAPITALIZATION), standard text/symbols only (NON_STANDARD_TEXT), one link plus at most one email/phone (EXCESSIVE_CONTACT_INFORMATION), consistent display vs landing-page URL (INCONSISTENT_DISPLAY_AND_LANDING_PAGE_URLS), and no claim the destination cannot support (MISLEADING_CLAIMS). Headline/description must stay within 25/75 chars (FIELD_VALUE_TOO_LONG).
Reminder
Create paused, confirm the previewed text/image, then activate; respect 25/75 char caps and the one-link rule; strict per-account isolation.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
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 ad-account role / out-of-scope account. | Confirm scope and roles; do not retry until corrected. | no |
FIELD_VALUE_TOO_LONG | 400 FIELD_VALUE_TOO_LONG - headline >25 or description >75 chars. | Trim to the 25/75 caps and retry. | no |
INVALID_ARGUMENT | 400 REFERENCE_NOT_ALLOWED_FOR_TEXT_AD_CREATIVE, INVALID_HREF, IMAGE_URN_EXCLUSIVE_WITH_IMAGE_ID, INVALID_VALUE_NOT_EXIST. | Relay platform message; remove the disallowed reference / fix the URL or image URN. | no |
CAMPAIGN_FORMAT_MISMATCH | 400 CAMPAIGN_EXCEEDING_CREATIVE_TYPE_LIMIT - the campaign is not TEXT_AD format. | Target a TEXT_AD campaign; do not retry the same one. | 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
- Text Ads reject any content.reference - only content.textAd inline is valid (REFERENCE_NOT_ALLOWED_FOR_TEXT_AD_CREATIVE).
- Image is optional; if supplied it must be exactly 100x100 and <=2MB or it is rejected.
- Image URN and image-id are mutually exclusive (IMAGE_URN_EXCLUSIVE_WITH_IMAGE_ID).
- Account/campaign creative caps (15,000 / 100) apply -> 400 when exceeded.
- Update can change headline/description/landingPage; image may be set/replaced via the same textAd patch, which re-enters review.
- Empty headline/description is rejected (EMPTY_FIELD).
- Expired token -> refresh and retry once.