Send a task to a realm
JSON-RPC 2.0 endpoint for A2A clients, with the realm’s A2A token:
message/send starts a task (a run of the skill’s team; name the skill in
message.metadata.skill_id or a data part, with inputs) and returns it;
message/stream does the same and streams status updates as server-sent events until the
task ends; tasks/get returns a task by id. JSON-RPC errors (unknown method, missing
id) come back as { jsonrpc, id, error: { code, message } } with HTTP 400.
Requires the realm’s A2A bearer token (Authorization: Bearer cliq_a2a_…), minted with Generate a token (type: "a2a").
curl --request POST \
--url https://{host}/a2a/o/{org}/r/{slug}/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": {
"message": {
"role": "user",
"parts": [
{
"kind": "text",
"text": "Review PR 42"
}
],
"metadata": {
"skill_id": "acme/code-review",
"inputs": {
"pr_url": "https://github.com/acme/api/pull/42"
}
}
}
}
}
'import requests
url = "https://{host}/a2a/o/{org}/r/{slug}/send"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": { "message": {
"role": "user",
"parts": [
{
"kind": "text",
"text": "Review PR 42"
}
],
"metadata": {
"skill_id": "acme/code-review",
"inputs": { "pr_url": "https://github.com/acme/api/pull/42" }
}
} }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'message/send',
params: {
message: {
role: 'user',
parts: [{kind: 'text', text: 'Review PR 42'}],
metadata: {
skill_id: 'acme/code-review',
inputs: {pr_url: 'https://github.com/acme/api/pull/42'}
}
}
}
})
};
fetch('https://{host}/a2a/o/{org}/r/{slug}/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/a2a/o/{org}/r/{slug}/send",
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' => 'message/send',
'params' => [
'message' => [
'role' => 'user',
'parts' => [
[
'kind' => 'text',
'text' => 'Review PR 42'
]
],
'metadata' => [
'skill_id' => 'acme/code-review',
'inputs' => [
'pr_url' => 'https://github.com/acme/api/pull/42'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{host}/a2a/o/{org}/r/{slug}/send"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"message/send\",\n \"params\": {\n \"message\": {\n \"role\": \"user\",\n \"parts\": [\n {\n \"kind\": \"text\",\n \"text\": \"Review PR 42\"\n }\n ],\n \"metadata\": {\n \"skill_id\": \"acme/code-review\",\n \"inputs\": {\n \"pr_url\": \"https://github.com/acme/api/pull/42\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{host}/a2a/o/{org}/r/{slug}/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"message/send\",\n \"params\": {\n \"message\": {\n \"role\": \"user\",\n \"parts\": [\n {\n \"kind\": \"text\",\n \"text\": \"Review PR 42\"\n }\n ],\n \"metadata\": {\n \"skill_id\": \"acme/code-review\",\n \"inputs\": {\n \"pr_url\": \"https://github.com/acme/api/pull/42\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/a2a/o/{org}/r/{slug}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"message/send\",\n \"params\": {\n \"message\": {\n \"role\": \"user\",\n \"parts\": [\n {\n \"kind\": \"text\",\n \"text\": \"Review PR 42\"\n }\n ],\n \"metadata\": {\n \"skill_id\": \"acme/code-review\",\n \"inputs\": {\n \"pr_url\": \"https://github.com/acme/api/pull/42\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Realm A2A bearer (mint/rotate via /v1/auth/generate_token|rotate_token with type: a2a and realm_id).
Body
Response
A JSON-RPC response { jsonrpc, id, result } whose result is the task (for message/stream, a text/event-stream of such messages).
curl --request POST \
--url https://{host}/a2a/o/{org}/r/{slug}/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": {
"message": {
"role": "user",
"parts": [
{
"kind": "text",
"text": "Review PR 42"
}
],
"metadata": {
"skill_id": "acme/code-review",
"inputs": {
"pr_url": "https://github.com/acme/api/pull/42"
}
}
}
}
}
'import requests
url = "https://{host}/a2a/o/{org}/r/{slug}/send"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": { "message": {
"role": "user",
"parts": [
{
"kind": "text",
"text": "Review PR 42"
}
],
"metadata": {
"skill_id": "acme/code-review",
"inputs": { "pr_url": "https://github.com/acme/api/pull/42" }
}
} }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'message/send',
params: {
message: {
role: 'user',
parts: [{kind: 'text', text: 'Review PR 42'}],
metadata: {
skill_id: 'acme/code-review',
inputs: {pr_url: 'https://github.com/acme/api/pull/42'}
}
}
}
})
};
fetch('https://{host}/a2a/o/{org}/r/{slug}/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/a2a/o/{org}/r/{slug}/send",
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' => 'message/send',
'params' => [
'message' => [
'role' => 'user',
'parts' => [
[
'kind' => 'text',
'text' => 'Review PR 42'
]
],
'metadata' => [
'skill_id' => 'acme/code-review',
'inputs' => [
'pr_url' => 'https://github.com/acme/api/pull/42'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{host}/a2a/o/{org}/r/{slug}/send"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"message/send\",\n \"params\": {\n \"message\": {\n \"role\": \"user\",\n \"parts\": [\n {\n \"kind\": \"text\",\n \"text\": \"Review PR 42\"\n }\n ],\n \"metadata\": {\n \"skill_id\": \"acme/code-review\",\n \"inputs\": {\n \"pr_url\": \"https://github.com/acme/api/pull/42\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{host}/a2a/o/{org}/r/{slug}/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"message/send\",\n \"params\": {\n \"message\": {\n \"role\": \"user\",\n \"parts\": [\n {\n \"kind\": \"text\",\n \"text\": \"Review PR 42\"\n }\n ],\n \"metadata\": {\n \"skill_id\": \"acme/code-review\",\n \"inputs\": {\n \"pr_url\": \"https://github.com/acme/api/pull/42\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/a2a/o/{org}/r/{slug}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"message/send\",\n \"params\": {\n \"message\": {\n \"role\": \"user\",\n \"parts\": [\n {\n \"kind\": \"text\",\n \"text\": \"Review PR 42\"\n }\n ],\n \"metadata\": {\n \"skill_id\": \"acme/code-review\",\n \"inputs\": {\n \"pr_url\": \"https://github.com/acme/api/pull/42\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body