curl --request POST \
--url https://api-v3.aui.io/apollo-api/messaging/v1/events \
--header 'Content-Type: application/json' \
--header 'x-agent-api-key: <api-key>' \
--data '
{
"text": "<string>",
"agent_variables": {},
"thread_id": "<string>"
}
'import requests
url = "https://api-v3.aui.io/apollo-api/messaging/v1/events"
payload = {
"text": "<string>",
"agent_variables": {},
"thread_id": "<string>"
}
headers = {
"x-agent-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-agent-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', agent_variables: {}, thread_id: '<string>'})
};
fetch('https://api-v3.aui.io/apollo-api/messaging/v1/events', 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://api-v3.aui.io/apollo-api/messaging/v1/events",
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([
'text' => '<string>',
'agent_variables' => [
],
'thread_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-agent-api-key: <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-v3.aui.io/apollo-api/messaging/v1/events"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"agent_variables\": {},\n \"thread_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-agent-api-key", "<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-v3.aui.io/apollo-api/messaging/v1/events")
.header("x-agent-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"agent_variables\": {},\n \"thread_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v3.aui.io/apollo-api/messaging/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-agent-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"agent_variables\": {},\n \"thread_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"event_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}Send an event to trigger the agent
Enqueues an event for the agent bound to your agent API key, sent in the x-agent-api-key header. Pass text and/or agent_variables as the agent’s input, and an optional thread_id (your own conversation id) to continue an existing conversation — omit it to start a new one. A 202 means the event was durably accepted — processing happens asynchronously.
curl --request POST \
--url https://api-v3.aui.io/apollo-api/messaging/v1/events \
--header 'Content-Type: application/json' \
--header 'x-agent-api-key: <api-key>' \
--data '
{
"text": "<string>",
"agent_variables": {},
"thread_id": "<string>"
}
'import requests
url = "https://api-v3.aui.io/apollo-api/messaging/v1/events"
payload = {
"text": "<string>",
"agent_variables": {},
"thread_id": "<string>"
}
headers = {
"x-agent-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-agent-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', agent_variables: {}, thread_id: '<string>'})
};
fetch('https://api-v3.aui.io/apollo-api/messaging/v1/events', 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://api-v3.aui.io/apollo-api/messaging/v1/events",
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([
'text' => '<string>',
'agent_variables' => [
],
'thread_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-agent-api-key: <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-v3.aui.io/apollo-api/messaging/v1/events"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"agent_variables\": {},\n \"thread_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-agent-api-key", "<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-v3.aui.io/apollo-api/messaging/v1/events")
.header("x-agent-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"agent_variables\": {},\n \"thread_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v3.aui.io/apollo-api/messaging/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-agent-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"agent_variables\": {},\n \"thread_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"event_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>"
}
]
}
}Authorizations
Agent API key (sk-...) bound to a single agent. Authenticates the webhook event trigger (POST /messaging/v1/events) only.
Body
An event from an external system that triggers the agent bound to your webhook credential.
The message to run the agent on. When omitted, the agent runs on agent_variables alone.
Free-form key/value data passed to the agent as variables for this event.
Your own id for the conversation this event belongs to. Reuse the same value to continue a conversation; omit it to start a new one. Unique per agent.
1 - 255Response
Successful Response
Acknowledgement that an event was durably enqueued (not yet processed).
Unique id minted for this event; follows it everywhere.