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

# Threads: Upload an image for a Facebook reply

> **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.

One endpoint of [Threads](/docs/api/threads.md). Authentication, workspaces and errors: [/docs.md](/docs.md).

## Upload an image for a Facebook reply

`POST /v1/threads/{threadId}/images` - operationId `threads.create-image`

| Permission | Rate limit |
| --- | --- |
| Inbox edit and the `reply` permission | 30 requests a minute per API key |

Facebook threads only (any other thread is 404). Multipart field `file`: a jpg, png or webp image up to 8 MB,
checked by its content. A thread holds at most 4 images until the next reply sends them; an image not sent within
24 hours is dropped. Pass the returned `id` in `imageIds` on `POST /v1/threads/{threadId}/messages`.
Requires Inbox edit and the `reply` permission.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `threadId` | path | string | yes | The Facebook thread's `thr_` id. |
| `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`. |

### Request body

`multipart/form-data`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string (binary) | no | The image, as a multipart file part. |

### Response 201

`data` is a `ThreadImage`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The image's id (`img_`), passed in `imageIds` on `POST /v1/threads/{threadId}/messages`. |
| `contentType` | string | `image/jpeg`, `image/png` or `image/webp`, read from the file's content. |
| `sizeBytes` | integer (int64) | The image's size in bytes. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/threads/thr_ZW1haWw6NDAyMjg0LjFAZXhhbXBsZS5jb20/images" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -F "file=@./file"
```

### Example response

```json
{
  "success": true,
  "data": {
    "id": "img_7Qm2xV9pLk3Rt8Wz",
    "contentType": "image/png",
    "sizeBytes": 184320
  }
}
```
