> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Document Ad

> Create a LinkedIn document ad (sponsored creative) under an ad set from a PDF, PPT(X), or DOC(X) file

Create a LinkedIn document ad (sponsored creative) under an ad set from a PDF, PPT(X), or DOC(X) file. Uploads the document, then creates the creative inline. destination\_url is required when the ad set's objective is Website Visits or Website Conversions, optional otherwise. Supports single and bulk creation and lead-gen forms (document gated behind the form).

|                       |                                   |
| --------------------- | --------------------------------- |
| **App**               | LinkedIn Ads                      |
| **Operation ID**      | `linkedin_ads_create_document_ad` |
| **Type**              | Action                            |
| **Connection**        | `linkedin_ads` (required)         |
| **Credits per run**   | 2                                 |
| **Agent / MCP tool**  | Yes                               |
| **Requires approval** | Yes (write operation)             |

## Inputs

| Field                     | Type                                          | Required | Default                                | Description                                                                                                                                                                                                                                                                                                  |
| ------------------------- | --------------------------------------------- | -------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `account`                 | DynamicAccount                                | Yes      | -                                      | LinkedIn Ads account to create the ad in.                                                                                                                                                                                                                                                                    |
| `update_type`             | string or SelectableOption                    | Yes      | -                                      | Create a single document ad ('single') or many at once ('bulk').                                                                                                                                                                                                                                             |
| `adset_id`                | string or SelectItem                          | No       | -                                      | Ad set (LinkedIn sponsored campaign) the ad belongs to. Maps to the creative's campaign.                                                                                                                                                                                                                     |
| `organization`            | string or SelectItem                          | Yes      | -                                      | Company Page used as the post author. Accepts an organization id or urn:li:organization:123.                                                                                                                                                                                                                 |
| `document_url`            | string                                        | No       | -                                      | Document for the ad: PDF, PPT, PPTX, DOC, or DOCX up to 100MB and 300 pages. Accepts a direct file URL or a Google Drive share link (set to 'Anyone with the link'). Markifact uploads it to LinkedIn automatically.                                                                                         |
| `intro_text`              | string                                        | No       | -                                      | Introductory text shown above the document. Up to 3000 characters.                                                                                                                                                                                                                                           |
| `headline`                | string                                        | No       | -                                      | Document title shown on the ad. Cannot be changed after the ad is created.                                                                                                                                                                                                                                   |
| `destination_url`         | string                                        | No       | -                                      | Landing page URL the ad clicks through to. Required when the ad set's objective is Website Visits or Website Conversions (LinkedIn rejects the ad without it); optional for Brand Awareness, Engagement, and Lead Generation.                                                                                |
| `lead_form`               | string or SelectItem                          | No       | -                                      | Optional LinkedIn lead-gen form. Provide this for Lead Generation ad sets: the document is gated behind the form. Accepts a form id or urn:li:adForm:123. LinkedIn does not allow reusing one document across multiple lead-gen ads; Markifact uploads the document fresh for each ad, which satisfies this. |
| `call_to_action`          | string or SelectableOption                    | No       | -                                      | Call-to-action button label (e.g. DOWNLOAD, SIGN\_UP). Used with a lead form or a destination URL; ignored otherwise.                                                                                                                                                                                        |
| `gated_preview_pages`     | integer                                       | No       | -                                      | Lead-gen only: number of pages shown as a free preview before the form (starting from page 1). Leave empty for LinkedIn's default.                                                                                                                                                                           |
| `ad_name`                 | string                                        | No       | -                                      | Optional creative name. Up to 255 characters.                                                                                                                                                                                                                                                                |
| `status`                  | string or SelectableOption                    | No       | `{'value': 'DRAFT', 'label': 'Draft'}` | Initial creative status: DRAFT (safely inactive) or ACTIVE (submitted for review).                                                                                                                                                                                                                           |
| `structured_data`         | array (also accepts a comma-separated string) | No       | -                                      | Use only when update\_type is 'bulk', typically the output of a Sheets read. Each row supports: document\_url, adset\_id, intro\_text, headline, destination\_url, lead\_form, call\_to\_action, gated\_preview\_pages, ad\_name, status.                                                                    |
| `return_detailed_results` | boolean                                       | No       | `False`                                | Bulk mode only. If true, returns per-row results and does not raise on partial failures so the workflow can continue. Default false.                                                                                                                                                                         |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `Dict`

Returns created LinkedIn document ad creative IDs.

**Fields**: `creative_ids`, `document_urns`, `created_count`, `success_count`, `failed_count`, `total_count`, `results`
