Upload Document Creative
upload_document_creativeUpload PDF documents to the Metadata platform library so they can be promoted as LinkedIn Document Ads. Downloads each PDF from its URL and uploads it to the platform library as a DOCUMENT asset.
WARNING: PDF-ONLY: the downloaded file MUST have the `application/pdf` content-type
and be at most 100 MB (platform limits for document assets). Images go through
`upload_image_creative`, videos through `upload_video_creative`.
WARNING: WHEN YOU NEED TO CALL THIS:
Call this BEFORE `create_update_document_ad` ONLY when the document is not in the
library yet. If `search_library_creatives_by_name(contentTypes="DOCUMENT")` already
finds it, pass that id straight to `create_update_document_ad` as `libraryId`.
WORKFLOW INTEGRATION (when an upload IS needed):
1. Upload the PDF URL with this tool -> response contains the integer `id` (the library id).
2. Pass that integer `id` as `libraryId` in `create_update_document_ad`.
REQUIRED PARAMETERS:
- documents: Array of publicly accessible PDF URLs.
OPTIONAL PARAMETERS:
- names: Library label per document, positional against `documents`. Defaults to the
file name from the URL. Use the document's real title ("2026 B2B Benchmark Report")
so the library stays readable.
RESPONSE FORMAT:
Returns array of objects, one per document. `id` is returned as a string; pass it to
`create_update_document_ad` as an integer.
[
{"url": "https://example.com/report.pdf", "name": "2026 B2B Benchmark Report", "id": "15791", "success": true},
{"url": "https://example.com/bad.pdf", "name": "bad.pdf", "id": null, "success": false, "error": "..."}
]
ERROR HANDLING:
- If one upload fails, others continue.
- A content-type other than application/pdf is rejected with a clear error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | Optional library labels, one per document in the same order. | |
| documents | Yes | Array of PDF URLs to upload to the platform library. |