> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# `POST /api/v1/a2a/messages`

> `POST /api/v1/a2a/messages`

### Request body

`SendMessageRequest`

<ParamField body="conversation_id" type="string,null" />

<ParamField body="from_agent_id" type="string" required />

<ParamField body="message_type" type="string" required />

<ParamField body="payload" type="object" required />

<ParamField body="to_agent_id" type="string" required />

### Responses

<ResponseField name="201" type="MessageResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/a2a/messages' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "conversation_id": null,
    "from_agent_id": "string",
    "message_type": "string",
    "payload": {},
    "to_agent_id": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "attempts": 1,
    "conversation_id": "string",
    "created_at": "string",
    "from_agent_id": "string",
    "id": "string",
    "message_type": "string",
    "sequence_number": 1,
    "status": "string",
    "to_agent_id": "string"
  }
  ```
</ResponseExample>
