---
title: "Edit a message"
method: PATCH
path: "/v2/messages/{messageId}"
tags: ["Messages"]
---

# Edit a message

`PATCH /v2/messages/{messageId}`

## Request

- Base URL: `https://api.zenzap.co`
- URL: `https://api.zenzap.co/v2/messages/{messageId}`
- 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: `message:write`
- TypeScript: <https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/docs/v2/messages/:messageId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Edit the text of a message. Only the bot that sent the message can edit it, and the bot must still be a member of the channel.

Notes:
- `text` is required and cannot be empty
- Message length is limited to 10000 characters
- Edited messages will have an `Edited` property marker applied

## Path parameters

- `messageId` string, uuid, required

## Headers

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

## Request body

- MessagePatchRequest
  - `text` string, required: Updated message text (max 10000 characters)

## Response `200`

Message updated successfully

## Other responses

- `400`: Bad request - invalid input
- `401`: Unauthorized - invalid or missing API token
- `403`: Forbidden - you do not have permission to perform this action
- `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)
