Skip to main content
POST
/
a2a
/
{assistant_id}
curl --request POST \
  --url https://api.example.com/a2a/{assistant_id} \
  --header 'Accept: <accept>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "message/send",
  "params": {
    "message": {
      "role": "user",
      "parts": [
        {
          "kind": "text",
          "text": "Hello from A2A"
        },
        {
          "kind": "data",
          "data": {
            "locale": "en-US"
          }
        }
      ],
      "messageId": "msg-1",
      "contextId": "f5bd2a40-74b6-4f7a-b649-ea3f09890003"
    }
  }
}
'
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "kind": "task",
    "id": "run-uuid",
    "contextId": "f5bd2a40-74b6-4f7a-b649-ea3f09890003",
    "status": {
      "state": "completed"
    },
    "artifacts": [
      {
        "artifactId": "artifact-uuid",
        "name": "Assistant Response",
        "parts": [
          {
            "kind": "text",
            "text": "Hello back"
          }
        ]
      }
    ]
  }
}

Headers

Accept
string
required

For message/stream, must include text/event-stream. For all other methods, use application/json.

Path Parameters

assistant_id
string<uuid>
required

The ID of the assistant to communicate with

Body

application/json
jsonrpc
enum<string>
required

JSON-RPC version

Available options:
2.0
id
string
required

Request identifier

method
enum<string>
required

The method to invoke

Available options:
message/send,
message/stream,
tasks/get,
tasks/cancel
params
Message Send/Stream Parameters · object

Method parameters; shape depends on the method.

Response

JSON-RPC response for non-streaming methods. For message/stream, the response is an SSE stream of JSON-RPC envelopes.

jsonrpc
enum<string>
required
Available options:
2.0
id
string
required
result
object

Success result containing task information or task details

error
object

Error information if request failed