---
title: "Inject a message into a running agent session on a leg"
method: POST
path: "/legs/{id}/agent/message"
tags: ["Legs"]
---

# Inject a message into a running agent session on a leg

`POST /legs/{id}/agent/message`

Sends a context message or instruction to the running agent. Supported by Deepgram (InjectAgentMessage), Pipecat (TextFrame), and VAPI (control URL). Returns 501 for ElevenLabs.

## Request body

- AgentMessageRequest
  - `message` string, required — Context or instruction to inject into the running agent session

## Response `200`

Message sent

- StatusResponse
  - `instance_id` string — Instance identifier
  - `status` string, required

## Other responses

- `400` — Invalid JSON or missing message
- `404` — No agent attached to this leg
- `409` — Agent session not running
- `501` — Provider does not support message injection

## Changes

- **2026-03-26** `7856459e2b72` — 1 info
  - endpoint added
- **2026-03-26** `d09c97c6ca8c` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/voiceblender/apis/voiceblender-api/changes/legs/:id/agent/message/post.md)

---

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