---
title: "Send a message to an agent"
method: POST
path: "/agents/sendMessage"
---

# Send a message to an agent

`POST /agents/sendMessage`

Sends a message to a deployed agent and returns a job ID that can be used to poll for the response. Requires the `api:agent:message:*` scope.

## Request body

- object
  - `agentId` string, uuid, required
  - `conversation` union, required
    - object
      - `type` 'new', required
      - `dataInputVariableSelections` object, nullable
    - object
      - `type` 'existing', required
      - `conversationId` string, uuid, required
  - `message` string, required

## Response `200`

Message sent successfully

- object
  - `jobId` string, required

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal server error

## Changes

- **2026-04-01** (v1) `391bd1d6134b` — 1 info
  - api operation id `agents_sendMessage` removed and replaced with ``
- **2026-04-01** (v1) `6fada222f87f` — 1 info
  - api operation id `agents_sendMessage` was added
- **2026-03-16** (v1) `78c3b8726301` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/credal-ai/apis/credal-api/changes/agents/sendMessage/post.md)

---

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