---
title: "Set or update a topic cover image"
method: PATCH
path: "/v2/topics/{topicId}/cover-image"
tags: ["Topics (group chats/channels/conversations)"]
---

# Set or update a topic cover image

`PATCH /v2/topics/{topicId}/cover-image`

## Request

- Base URL: `https://api.zenzap.co`
- URL: `https://api.zenzap.co/v2/topics/{topicId}/cover-image`
- Auth: one of:
  - HTTP bearer and API key in header `X-Signature`
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.zenzap.co/oauth/token` scopes: `channel:write`
- TypeScript: <https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/docs/v2/topics/:topicId/cover-image/patch.ts> (a function with typed inputs; its response is checked against the schema)

Upload a cover image for an existing topic. Send the image as `multipart/form-data` with a
`filePart` (the image).

**Authorization:** Your API key bot must be a member of the topic (returns 404 if not).

**Cover image requirements:**
- must be a valid image (JPEG or PNG); undecodable images return 400
- non-square images are automatically center-cropped to a square
- max dimension 4096×4096; larger images return 400
- max size 8 MB; converted to JPEG automatically

**Behavior:** The image is uploaded first; the topic's cover is only updated once the upload
succeeds, so a topic never references a missing image.

## Path parameters

- `topicId` string, uuid, required

## Headers

- `X-Signature` string
- `X-Timestamp` integer

## Request body `multipart/form-data`

- TopicCoverImageUploadRequest: Multipart body for setting/updating a topic cover image.
  - `filePart` string, binary, required: Cover image file. Must be a valid image (JPEG or PNG), max 4096×4096 and 8 MB. Automatically converted to JPEG and center-cropped to a square. Oversized or invalid images return 400.

## Response `200`

Cover image updated successfully

- TopicCoverImageUpdateResponse
  - `id` string, uuid: The topic ID
  - `updatedAt` integer: Unix timestamp in milliseconds when the topic was updated

## Other responses

- `400`: Bad request - invalid input
- `401`: Unauthorized - invalid or missing API token
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api.md) - [All operations](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/revisions/37faae2c2036?raw)
