---
title: "Edit queued message"
method: PUT
path: "/api/apps/{app_id}/chat/queue/{item_id}"
---

# Edit queued message

`PUT /api/apps/{app_id}/chat/queue/{item_id}`

## Request

- Base URL: `https://app.base44.com`
- URL: `https://app.base44.com/api/apps/{app_id}/chat/queue/{item_id}`
- Auth: HTTP bearer

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Replaces the text of a queued message before it runs. Its place in the queue doesn't change.

Only the person who queued a message can edit it, because it runs as them.

Once a message starts running it leaves the queue, so it can no longer be edited.

A collaborator in the editor can send a queued message into the turn that's running. While that's happening the message can't be changed or removed.

This is limited to 60 requests per minute per app for each workspace's personal API keys, so every key in a workspace shares one allowance. Every endpoint that changes the queue shares it. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted.</Note>

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time.</Warning>

## Path parameters

- `item_id` string, required: ID of the queued message to edit. Get it from `items[].id` in [Get message queue](/api-reference/get-message-queue).
- `app_id` string, required: ID of the app whose message queue this request acts on.

## Query parameters

- `branch_id` string: ID of the branch to work on, as returned by [List branches](/api-reference/list-branches). Omit it to work on the app's main branch.

## Request body

- EditQueueItemPayload
  - `content` string, required: New text for the queued message. Up to 100,000 characters.

## Response `200`

The queue with the edited message.

- MessageQueue: The messages waiting to run, in the order they run.
  - `items` QueuedMessage[], required: The queued messages, next to run first. Holds at most 7.
    - `id` string, required: ID of the queued message.
    - `content` string, required: Text of the message, as it will be sent to the AI.
    - `branch_id` string, nullable, required: ID of the branch the message was queued on, or `null` for main. The API acts on main's queue, so this is normally `null`.
    - `created_at` string, required: When the message was queued, as a UTC timestamp in ISO 8601 format.
  - `is_paused` boolean, required: Whether the queue is paused. While it is, queued messages don't run.

## Other responses

- `400`: `content` is longer than 100,000 characters.
- `401`: Missing or invalid credentials.
- `403`: You don't have editor access to this app, the app is blocked, you're a viewer in the app's workspace, your API key is read-only, you used a workspace API key, or someone else queued the message (`error.code` is `not_queue_item_author`).
- `404`: App not found, no message with this ID is queued, or no branch you can see has this `branch_id`. A message that isn't queued may already have started.
- `409`: A collaborator is sending this message into the turn that's running. Try again once it finishes.
- `422`: The request body is missing `content`, or it isn't a string.
- `429`: Rate limit exceeded. The base limit is 60 requests per minute. See [Rate limits](/developers/references/apps-api/get-started/rate-limits) for the multiplier your plan gets.

## Changes

> 58 revisions in range; 1 not diffed.

- **2026-10-21** `c23775445de2`: 1 breaking, 1 info
  - `query` request parameter `branch_id` list-of-types was narrowed by removing types `null`
  - for the `query` request parameter `branch_id`, the type was generalized from no type to `string`
- **2026-10-21** `721c47176351`: 1 info
  - added the new optional `query` request parameter `branch_id`
- **2026-10-12** `5e139db2e643`: 1 info
  - the endpoint scheme security `PersonalAccessTokenAuth` was added to the API
- **2026-10-06** `dddf17e0f9f0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/chat/queue/:item_id/put.md)

---

[API](https://skmtc.dev/adexad/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/adexad/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adexad/apis/base44-app-management-api/revisions/fa29e915c226?raw)
