curl --request POST \
--url https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Tenant-Name: <api-key>' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "SendMessage",
"params": {
"message": {
"role": "ROLE_USER",
"messageId": "msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73",
"parts": [
{
"text": "Code this encounter."
}
]
}
}
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Tenant-Name': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'SendMessage',
params: {
message: {
role: 'ROLE_USER',
messageId: 'msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73',
parts: [{text: 'Code this encounter.'}]
}
}
})
};
fetch('https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Tenant-Name", "<api-key>");
request.AddJsonBody("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"SendMessage\",\n \"params\": {\n \"message\": {\n \"role\": \"ROLE_USER\",\n \"messageId\": \"msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73\",\n \"parts\": [\n {\n \"text\": \"Code this encounter.\"\n }\n ]\n }\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
import requests
url = "https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a"
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "SendMessage",
"params": { "message": {
"role": "ROLE_USER",
"messageId": "msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73",
"parts": [{ "text": "Code this encounter." }]
} }
}
headers = {
"Authorization": "Bearer <token>",
"Tenant-Name": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'SendMessage',
'params' => [
'message' => [
'role' => 'ROLE_USER',
'messageId' => 'msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73',
'parts' => [
[
'text' => 'Code this encounter.'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Tenant-Name: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"SendMessage\",\n \"params\": {\n \"message\": {\n \"role\": \"ROLE_USER\",\n \"messageId\": \"msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73\",\n \"parts\": [\n {\n \"text\": \"Code this encounter.\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Tenant-Name", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a")
.header("Authorization", "Bearer <token>")
.header("Tenant-Name", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"SendMessage\",\n \"params\": {\n \"message\": {\n \"role\": \"ROLE_USER\",\n \"messageId\": \"msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73\",\n \"parts\": [\n {\n \"text\": \"Code this encounter.\"\n }\n ]\n }\n }\n}")
.asString();{
"jsonrpc": "2.0",
"id": "msg-001",
"result": {
"task": {
"id": "task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62",
"contextId": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
"status": {
"state": "TASK_STATE_COMPLETED"
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"howToFix": "<string>",
"details": {
"validationErrors": [
{
"field": "<string>",
"reason": "<string>"
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"howToFix": "<string>",
"details": {
"validationErrors": [
{
"field": "<string>",
"reason": "<string>"
}
]
},
"requestId": "<string>"
}
}A2A JSON-RPC binding
The JSONRPC protocol binding for A2A v1.0. Accepts a single JSON-RPC 2.0
request whose method is one of SendMessage, SendStreamingMessage,
GetTask, ListTasks, CancelTask, or SubscribeToTask.
Streaming methods (SendStreamingMessage, SubscribeToTask) respond with
text/event-stream; all others respond with a single JSON-RPC response.
curl --request POST \
--url https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Tenant-Name: <api-key>' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "SendMessage",
"params": {
"message": {
"role": "ROLE_USER",
"messageId": "msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73",
"parts": [
{
"text": "Code this encounter."
}
]
}
}
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Tenant-Name': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'SendMessage',
params: {
message: {
role: 'ROLE_USER',
messageId: 'msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73',
parts: [{text: 'Code this encounter.'}]
}
}
})
};
fetch('https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Tenant-Name", "<api-key>");
request.AddJsonBody("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"SendMessage\",\n \"params\": {\n \"message\": {\n \"role\": \"ROLE_USER\",\n \"messageId\": \"msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73\",\n \"parts\": [\n {\n \"text\": \"Code this encounter.\"\n }\n ]\n }\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
import requests
url = "https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a"
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "SendMessage",
"params": { "message": {
"role": "ROLE_USER",
"messageId": "msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73",
"parts": [{ "text": "Code this encounter." }]
} }
}
headers = {
"Authorization": "Bearer <token>",
"Tenant-Name": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'SendMessage',
'params' => [
'message' => [
'role' => 'ROLE_USER',
'messageId' => 'msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73',
'parts' => [
[
'text' => 'Code this encounter.'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Tenant-Name: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"SendMessage\",\n \"params\": {\n \"message\": {\n \"role\": \"ROLE_USER\",\n \"messageId\": \"msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73\",\n \"parts\": [\n {\n \"text\": \"Code this encounter.\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Tenant-Name", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.{env}.corti.app/v2/agentic/agents/{agentId}/a2a")
.header("Authorization", "Bearer <token>")
.header("Tenant-Name", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"SendMessage\",\n \"params\": {\n \"message\": {\n \"role\": \"ROLE_USER\",\n \"messageId\": \"msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73\",\n \"parts\": [\n {\n \"text\": \"Code this encounter.\"\n }\n ]\n }\n }\n}")
.asString();{
"jsonrpc": "2.0",
"id": "msg-001",
"result": {
"task": {
"id": "task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62",
"contextId": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
"status": {
"state": "TASK_STATE_COMPLETED"
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"howToFix": "<string>",
"details": {
"validationErrors": [
{
"field": "<string>",
"reason": "<string>"
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"howToFix": "<string>",
"details": {
"validationErrors": [
{
"field": "<string>",
"reason": "<string>"
}
]
},
"requestId": "<string>"
}
}Authorizations
OAuth 2.0 / OIDC bearer token.
The tenant the request operates within.
Headers
A2A protocol version in Major.Minor form (A2A §3.6). Optional; defaults to 1.0 when absent. This surface implements 1.0 only. Patch versions MUST NOT be sent and are not considered during negotiation.
^\d+\.\d+$Path Parameters
Agent identifier (prefixed UUIDv7).
Agent identifier. Accepts agt.<uuidv7> or a bare UUIDv7 on input; always returned prefixed.
^(agt\.)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40"
Body
A single JSON-RPC 2.0 request envelope.
A JSON-RPC 2.0 request envelope.
JSON-RPC protocol version; always 2.0.
"msg-001"
JSON-RPC method name (PascalCase on the wire).
SendMessage, SendStreamingMessage, GetTask, ListTasks, CancelTask, SubscribeToTask "SendMessage"
JSON-RPC params object.
{
"message": {
"role": "ROLE_USER",
"parts": [
{
"text": "What is the ICD-10 code for asthma?"
}
]
}
}
Response
A single JSON-RPC response (non-streaming methods), or an
text/event-stream for the streaming methods (SendStreamingMessage,
SubscribeToTask) where each event's data is a JSON-encoded
JSONRPCResponse.
A JSON-RPC 2.0 response envelope.
JSON-RPC protocol version; always 2.0.
"msg-001"
JSON-RPC result object (present on success).
{
"task": {
"id": "task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62"
}
}
JSON-RPC error object (present on failure).
Show child attributes
Show child attributes
{
"code": -32600,
"message": "Invalid Request"
}
Was this page helpful?