---
title: "Send message to agent"
method: POST
path: "/workspaces/{id}/agent"
tags: ["agent"]
---

# Send message to agent

`POST /workspaces/{id}/agent`

## Path parameters

- `id` string, required

## Request body

- ProtoAgentMessage
  - `attachments` ProtoAttachment[]
    - `content` integer[]
    - `file_name` string
    - `file_path` string
    - `mime_type` string
  - `prompt` string
  - `session_id` string

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-07-17** `0fc77e68cc86` — 1 breaking, 2 info
  - removed the success response with the status `202`
  - removed the non-success response with the status `409`
  - added the success response with the status `200`
- **2026-07-16** `bf3b824e3c67` — 1 breaking, 2 info
  - removed the success response with the status `200`
  - added the non-success response with the status `409`
  - added the success response with the status `202`

[Change history](https://skmtc.dev/charmbracelet/apis/crush-api/changes/workspaces/:id/agent/post.md)

---

[API](https://skmtc.dev/charmbracelet/apis/crush-api.md) · [All operations](https://skmtc.dev/charmbracelet/apis/crush-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/charmbracelet/crush-api/revisions/0fc77e68cc86/schema)
