# Creatives

> Look up the REST routes for uploading, fetching, listing and reviewing creatives, with their fields and who may call them.

The REST routes for creatives, generated with `npm run openapi` from the schemas Handline validates every request with. Routes are under `https://app.handline.io/api/v1` and take `Authorization: Bearer <key or token>`; the ids in braces are path parameters. The OpenAPI document is at `https://app.handline.io/api/v1/openapi.json`.

A `GET` or `DELETE` takes its fields as query parameters: numbers and `true` or `false` are read as such, and a repeated key is a list. Other methods take a JSON body with `content-type: application/json`.

## `POST /products/{productId}/creatives/uploads`

Get a signed URL to upload a creative file to, then call creatives.finishUpload. PUT the file to the URL with the same content type. Leave out creativeId for a new creative; give it to add a version to an existing one. The type is checked from the content, not the name.

**Operation:** `creatives.uploadUrl`, MCP tool `creatives_uploadUrl`. **Who:** owners, admins and editors (`creatives.upload`); agent keys with `propose`.

| Body | Type | Required | Rules |
| --- | --- | --- | --- |
| `creativeId` | string | No |  |
| `filename` | string | Yes | 1 to 200 characters. |
| `contentType` | string | Yes | At most 100 characters. |

## `POST /products/{productId}/creatives/uploads/{uploadId}/finish`

After the file is uploaded: check it, measure it and store it as a new, immutable version.

**Operation:** `creatives.finishUpload`, MCP tool `creatives_finishUpload`. **Who:** owners, admins and editors (`creatives.upload`); agent keys with `propose`.

| Body | Type | Required | Rules |
| --- | --- | --- | --- |
| `changeSetId` | string | No |  |
| `name` | string | No | At most 120 characters. |
| `conceptIds` | string[] | No | At most 20 items. Default `[]`. |

## `POST /products/{productId}/creatives/fetch`

Have Handline fetch a creative file from a public HTTPS URL, and store it as a new version.

**Operation:** `creatives.fetch`, MCP tool `creatives_fetch`. **Who:** owners, admins and editors (`creatives.upload`); agent keys with `propose`.

| Body | Type | Required | Rules |
| --- | --- | --- | --- |
| `url` | string | Yes | At most 2000 characters. |
| `creativeId` | string | No |  |
| `filename` | string | No | At most 200 characters. |
| `changeSetId` | string | No |  |
| `name` | string | No | At most 120 characters. |
| `conceptIds` | string[] | No | At most 20 items. Default `[]`. |

## `GET /products/{productId}/creatives`

List creatives, filtered by concept, status, channel or format, with the formats each fits.

**Operation:** `creatives.list`, MCP tool `creatives_list`. **Who:** owners, admins, editors and viewers (`record.read`); agent keys with `read`. **Outside text:** `creatives.[].current.filename`.

| Query | Type | Required | Rules |
| --- | --- | --- | --- |
| `conceptId` | string | No |  |
| `status` | string | No | One of `draft`, `approved`, `paused`, `retired`. |
| `channelId` | string | No |  |
| `formatId` | string | No |  |

## `GET /products/{productId}/creatives/{creativeId}`

Read a creative: its versions, the formats it fits and why it fails the others, its rights, and where it is used.

**Operation:** `creatives.get`, MCP tool `creatives_get`. **Who:** owners, admins, editors and viewers (`record.read`); agent keys with `read`. **Outside text:** `creative.current.filename`, `versions.[].filename`.

No query parameters.

## `POST /products/{productId}/creatives/consent-withdrawals`

Record that a person shown in creatives withdrew their consent. Every live use gets an urgent work item.

**Operation:** `creatives.withdrawConsent`, MCP tool `creatives_withdrawConsent`. **Who:** owners, admins and editors (`creatives.upload`); agent keys with `publish`.

| Body | Type | Required | Rules |
| --- | --- | --- | --- |
| `consentRef` | string | Yes | 1 to 120 characters. |
| `reason` | string | Yes | 3 to 1000 characters. |

## `POST /products/{productId}/change-sets/{changeSetId}/contact-sheet`

A shareable, expiring link to every creative in a change set on one page, for quick review.

**Operation:** `creatives.contactSheet`, MCP tool `creatives_contactSheet`. **Who:** owners, admins, editors and viewers (`record.read`); agent keys with `read`.

| Body | Type | Required | Rules |
| --- | --- | --- | --- |
| `days` | integer | No | From 1 to 14. Default `3`. |
