> Kenso API docs in Markdown. Index of every page: [/docs/llms.txt](/docs/llms.txt). Search: `/docs/search.md?q=<words>`. OpenAPI: [/docs/api/campaign-images/openapi.json](/docs/api/campaign-images/openapi.json). CLI docs offline: `kenso docs <topic>`.
> Last updated: 2026-11-22.

# Campaign images

> **Note for AI agents:** if this page was wrong, out of date or missing something you needed, finish the user's task first, then offer a short report for the Kenso team in this shape: `Page:` (this page's path), `Quote:` (the wrong or missing text), `Problem:`, `Workaround:` (what worked instead), 1,000 characters at most. Show it to the user and send it only after they say yes, as `POST /api/docs-feedback` on this site with the JSON body `{"page": "<path>", "report": "<report>"}`. Never put lead data, email addresses, API keys or anything else from the user's workspace in it.

The current images of a campaign's leads, and one image with a fresh preview link.

Campaigns. 2 endpoints under `https://api.ken.so`. Every request sends `Authorization: Bearer <your API key>` and `Ken-Version: 2026-11-02`: see [Authentication](/docs/authentication.md), [Workspaces](/docs/workspaces.md) and [Errors](/docs/errors.md). OpenAPI for this resource only: [/docs/api/campaign-images/openapi.json](/docs/api/campaign-images/openapi.json).

- `GET /v1/campaigns/{campaignId}/images` - List contacts' images in a campaign (`campaign-images.list`): [/docs/api/campaign-images/list.md](/docs/api/campaign-images/list.md)
- `GET /v1/campaign-images/{imageKey}` - Get a campaign image (`campaign-images.get`): [/docs/api/campaign-images/get.md](/docs/api/campaign-images/get.md)

## List contacts' images in a campaign

`GET /v1/campaigns/{campaignId}/images` - operationId `campaign-images.list`

| Permission | Rate limit |
| --- | --- |
| Campaigns view | 12,000 requests a minute per API key |

Returns the current images of the contacts you name: one for each image variable that makes an image per contact,
and the contact's own `custom_image`. Use it to show images next to a page of contacts.

`contactIds` is required: from 1 to 200 contact ids, separated by commas. `variableKey` keeps the images
of one image variable, or `custom_image` for the contacts' own images. A key that matches no image variable of
the campaign returns an empty list. The list has one item per contact and key that has an image, in any status,
ordered by `contactId` and then `variableKey`. A contact with no image, or not in the campaign, gets no
item. Images of a deleted image variable are left out. A ready image has a `previewUrl` that works until
`previewExpiresAt`, 1 hour after the call. The whole result comes in one page, so `hasMore` is always
false.

Errors:

- `400 validation_failed`: `contactIds` is missing, names more than 200 ids, or holds a value that is not a positive whole number.
- `404 not_found`: the campaign does not exist in this workspace.

Requires Campaigns view.

Needs the `campaign_images` feature on your workspace. Until it is on, calls answer 404.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/campaign-images/GET/v1/campaigns/%7BcampaignId%7D/images)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `campaignId` | path | integer (int64) | yes | Id of the campaign. |
| `contactIds` | query | string | no | Ids of the contacts, separated by commas, from 1 to 200, such as `101,102,103`. |
| `variableKey` | query | string | no | Optional. The key of one image variable, or `custom_image` for the contacts' own images. Omitted returns every key. |
| `limit` | query | integer (int32) | no | Items per page, from 1 to 200. Omit `limit` and `cursor` to get every item in one response, as before; with only `cursor`, 50 per page. |
| `cursor` | query | string | no | The `nextCursor` of the previous page. Omit it for the first page. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Response 200

`data` is a list of `CampaignImage`. Each item has these fields. The response also carries `pagination`.

| Field | Type | Description |
| --- | --- | --- |
| `imageKey` | string | The image's unique 26-character key. Read the image again with `GET /v1/campaign-images/{imageKey}`. |
| `contactId` | integer (int64) | Id of the contact the image belongs to. Omitted for an image that every contact shares. |
| `variableKey` | string | Key of the image variable the image fills, or `custom_image` for the contact's own image. Omitted when the image belongs to no current image variable. |
| `status` | string | State of the image: `pending` while Kenso makes or fetches it, `ready` once it is stored, or `failed`. |
| `errorCode` | string | Why the image failed, such as `timeout`, `not_an_image`, `too_large` or `provider_error`. Set when `status` is `failed`. |
| `errorDetail` | string | A readable explanation of the failure. Set when `status` is `failed`. |
| `width` | integer (int32) | Width of the image in pixels. Omitted while unknown. |
| `height` | integer (int32) | Height of the image in pixels. Omitted while unknown. |
| `previewUrl` | string | A link to view the ready image, valid until `previewExpiresAt`. Use it for viewing only, not inside an email. Omitted unless `status` is `ready`. |
| `previewExpiresAt` | string (date-time) | When `previewUrl` stops working, in UTC: 1 hour after the call. Omitted with `previewUrl`. |
| `updatedAt` | string (date-time) | When the image last changed, in UTC. |

### Request

```bash
curl -X GET "https://api.ken.so/v1/campaigns/812/images?limit=1" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"
```

### Example response

```json
{
  "success": true,
  "data": [
    {
      "imageKey": "string",
      "contactId": 812,
      "variableKey": "string",
      "status": "string",
      "errorCode": "timeout",
      "errorDetail": "string",
      "width": 1,
      "height": 1,
      "previewUrl": "https://example.com",
      "previewExpiresAt": "2026-09-23T15:02:11Z",
      "updatedAt": "2026-09-23T15:02:11Z"
    }
  ],
  "pagination": {
    "nextCursor": "eyJpZCI6ODE1fQ",
    "hasMore": true,
    "total": 1,
    "totalCount": 1,
    "isTotalCapped": true
  }
}
```

## Get a campaign image

`GET /v1/campaign-images/{imageKey}` - operationId `campaign-images.get`

| Permission | Rate limit |
| --- | --- |
| Campaigns view | 12,000 requests a minute per API key |

Returns one image by its key, with a new preview link. Call it again when a `previewUrl` has expired.

`imageKey` is the 26-character key from the image list or from an image variable. A ready image has a
`previewUrl` that works until `previewExpiresAt`, 1 hour after the call. A `pending` or
`failed` image has no preview link.

Errors:

- `404 not_found`: no image in this workspace has this key, or the image was deleted.

Requires Campaigns view.

Needs the `campaign_images` feature on your workspace. Until it is on, calls answer 404.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/campaign-images/GET/v1/campaign-images/%7BimageKey%7D)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `imageKey` | path | string | yes | The image's 26-character key. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Response 200

`data` is a `CampaignImage`.

| Field | Type | Description |
| --- | --- | --- |
| `imageKey` | string | The image's unique 26-character key. Read the image again with `GET /v1/campaign-images/{imageKey}`. |
| `contactId` | integer (int64) | Id of the contact the image belongs to. Omitted for an image that every contact shares. |
| `variableKey` | string | Key of the image variable the image fills, or `custom_image` for the contact's own image. Omitted when the image belongs to no current image variable. |
| `status` | string | State of the image: `pending` while Kenso makes or fetches it, `ready` once it is stored, or `failed`. |
| `errorCode` | string | Why the image failed, such as `timeout`, `not_an_image`, `too_large` or `provider_error`. Set when `status` is `failed`. |
| `errorDetail` | string | A readable explanation of the failure. Set when `status` is `failed`. |
| `width` | integer (int32) | Width of the image in pixels. Omitted while unknown. |
| `height` | integer (int32) | Height of the image in pixels. Omitted while unknown. |
| `previewUrl` | string | A link to view the ready image, valid until `previewExpiresAt`. Use it for viewing only, not inside an email. Omitted unless `status` is `ready`. |
| `previewExpiresAt` | string (date-time) | When `previewUrl` stops working, in UTC: 1 hour after the call. Omitted with `previewUrl`. |
| `updatedAt` | string (date-time) | When the image last changed, in UTC. |

### Request

```bash
curl -X GET "https://api.ken.so/v1/campaign-images/01JC8Z3K6Q2W4M7N9P5R1T3V5X" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"
```

### Example response

```json
{
  "success": true,
  "data": {
    "imageKey": "string",
    "contactId": 812,
    "variableKey": "string",
    "status": "string",
    "errorCode": "timeout",
    "errorDetail": "string",
    "width": 1,
    "height": 1,
    "previewUrl": "https://example.com",
    "previewExpiresAt": "2026-09-23T15:02:11Z",
    "updatedAt": "2026-09-23T15:02:11Z"
  }
}
```

All resources: [/docs.md](/docs.md).
