Create a creative
lob_creatives_createCreate campaign creatives for postcards, letters, or self-mailers by providing Lob template IDs for each required side. Specify campaign ID and resource type.
Instructions
Create a campaign creative — the artwork (front/back / inside/outside / file) used by a campaign for postcards, letters, or self-mailers. Important: unlike lob_postcards_create and the other mail-piece create tools, Lob's /v1/creatives endpoint does NOT accept HTML strings, remote URLs, or inline PDFs in the content fields — it accepts ONLY a Lob template ID (tmpl_…). To use a URL or HTML as creative content, first call lob_templates_create to upload it as a template, then pass the resulting tmpl_… here. Required by resource_type: postcard → front + back; letter → file + from; self_mailer → inside + outside. Live-mode key required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | Parent campaign ID. | |
| resource_type | Yes | ||
| front | No | Postcard creative front: a Lob template ID (`tmpl_…`). Required for postcard creatives. | |
| back | No | Postcard creative back: a Lob template ID (`tmpl_…`). Required for postcard creatives. | |
| inside | No | Self-mailer creative inside: a Lob template ID. | |
| outside | No | Self-mailer creative outside: a Lob template ID. | |
| file | No | Letter creative file: a Lob template ID. Required for letter creatives. | |
| details | No | Resource-specific options. Per Lob's spec, accepted keys for postcard creatives are `mail_type` (usps_first_class | usps_standard) and `size` (4x6 | 6x9 | 6x11). For letters: `mail_type`, `color`, `double_sided`, `address_placement`, `extra_service`. Empty `{}` is valid. | |
| description | No | ||
| from | No | Sender address — saved address ID (`adr_…`) or inline. Required for letter creatives. | |
| metadata | No | Up to 20 string key/value pairs of arbitrary metadata to attach to the resource. | |
| extra | No | Additional Lob API parameters not enumerated above. Merged into the request body verbatim. See https://docs.lob.com for the full parameter list per resource. |