Events
Send Events
Send Events through the OMA API.
POST
/
v1
/
sessions
/
{session_id}
/
events
Send Events
curl --request POST \
--url http://localhost:38080/v1/sessions/{session_id}/events \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"events": [
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
]
}
]
}
'import requests
url = "http://localhost:38080/v1/sessions/{session_id}/events"
payload = { "events": [
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
]
}
] }
headers = {
"X-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-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
type: 'user.message',
content: [{type: 'text', text: 'Where is my order #1234?'}]
}
]
})
};
fetch('http://localhost:38080/v1/sessions/{session_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/sessions/{session_id}/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"type\": \"user.message\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Where is my order #1234?\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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))
}{
"data": [
{
"type": "user.message",
"id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
],
"processed_at": "2026-03-15T10:00:00Z"
}
]
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}Every request requires
?beta=true.Authorizations
omaApiKeyomaBearer
OMA workspace API key.
Path Parameters
Path parameter session_id
Query Parameters
Selects the beta API contract for this endpoint. Must be true.
Available options:
true Body
application/json
Request parameters for sending events to a session.
Events to send to the session.
Parameters for sending a user message to the session.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Example:
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
]
}
Example:
[
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
]
}
]
Response
Successful response (OK)
Events that were successfully sent to the session.
Sent events
A user message event in the session conversation.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Example:
{
"type": "user.message",
"id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
],
"processed_at": "2026-03-15T10:00:00Z"
}
Was this page helpful?
⌘I
Send Events
curl --request POST \
--url http://localhost:38080/v1/sessions/{session_id}/events \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"events": [
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
]
}
]
}
'import requests
url = "http://localhost:38080/v1/sessions/{session_id}/events"
payload = { "events": [
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
]
}
] }
headers = {
"X-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-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
type: 'user.message',
content: [{type: 'text', text: 'Where is my order #1234?'}]
}
]
})
};
fetch('http://localhost:38080/v1/sessions/{session_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/sessions/{session_id}/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"type\": \"user.message\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Where is my order #1234?\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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))
}{
"data": [
{
"type": "user.message",
"id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
"content": [
{
"type": "text",
"text": "Where is my order #1234?"
}
],
"processed_at": "2026-03-15T10:00:00Z"
}
]
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}