---
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

---

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