List thread events
curl --request GET \
--url https://api.matrices.com/v1/threads/{threadId}/events \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.matrices.com/v1/threads/{threadId}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/threads/{threadId}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/threads/{threadId}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"events": [
{
"failureCode": "model_image_format_unsupported",
"eventId": "<string>",
"failureDetails": {
"formats": [
"jpeg"
],
"targetId": "<string>"
},
"occurredAt": "2023-11-07T05:31:56Z",
"seq": 123,
"threadId": "<string>",
"turnId": "<string>",
"type": "user_message",
"compaction": {
"attempt": "<string>",
"throughSeq": 123,
"preview": "<string>"
},
"content": [
{
"text": "<string>",
"type": "text"
}
],
"failureText": "<string>",
"hook": {
"decision": "allow",
"hookId": "<string>",
"index": 123,
"latencyMs": 123,
"point": "before_turn_start",
"processor": "url",
"deliveryId": "<string>",
"reason": "<string>",
"rewrote": true
},
"inReplyToSeq": 123,
"modelId": "<string>",
"principal": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
},
"providerToolCallId": "<string>",
"reveal": {
"families": [
"agents"
],
"tools": [
{
"name": "<string>",
"namespace": "<string>",
"toolsetId": "<string>",
"def": {
"name": "<string>",
"schema": "<unknown>",
"description": "<string>"
}
}
]
},
"submitMode": "queue",
"timing": {
"durationMs": 1,
"firstTextMs": 1
},
"toolCallId": "<string>",
"toolInput": "<unknown>",
"toolName": "<string>",
"toolOutput": "<unknown>",
"toolsetId": "<string>",
"usage": {
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"estimatedCost": 123,
"reasoningTokens": 123
},
"waitId": "<string>",
"waitResult": "<unknown>"
}
],
"nextCursor": "<string>"
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Events
List thread events
GET
/
v1
/
threads
/
{threadId}
/
events
List thread events
curl --request GET \
--url https://api.matrices.com/v1/threads/{threadId}/events \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.matrices.com/v1/threads/{threadId}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/threads/{threadId}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/threads/{threadId}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"events": [
{
"failureCode": "model_image_format_unsupported",
"eventId": "<string>",
"failureDetails": {
"formats": [
"jpeg"
],
"targetId": "<string>"
},
"occurredAt": "2023-11-07T05:31:56Z",
"seq": 123,
"threadId": "<string>",
"turnId": "<string>",
"type": "user_message",
"compaction": {
"attempt": "<string>",
"throughSeq": 123,
"preview": "<string>"
},
"content": [
{
"text": "<string>",
"type": "text"
}
],
"failureText": "<string>",
"hook": {
"decision": "allow",
"hookId": "<string>",
"index": 123,
"latencyMs": 123,
"point": "before_turn_start",
"processor": "url",
"deliveryId": "<string>",
"reason": "<string>",
"rewrote": true
},
"inReplyToSeq": 123,
"modelId": "<string>",
"principal": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
},
"providerToolCallId": "<string>",
"reveal": {
"families": [
"agents"
],
"tools": [
{
"name": "<string>",
"namespace": "<string>",
"toolsetId": "<string>",
"def": {
"name": "<string>",
"schema": "<unknown>",
"description": "<string>"
}
}
]
},
"submitMode": "queue",
"timing": {
"durationMs": 1,
"firstTextMs": 1
},
"toolCallId": "<string>",
"toolInput": "<unknown>",
"toolName": "<string>",
"toolOutput": "<unknown>",
"toolsetId": "<string>",
"usage": {
"inputTokens": 123,
"outputTokens": 123,
"totalTokens": 123,
"cacheReadTokens": 123,
"cacheWriteTokens": 123,
"estimatedCost": 123,
"reasoningTokens": 123
},
"waitId": "<string>",
"waitResult": "<unknown>"
}
],
"nextCursor": "<string>"
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Restrict events to one durable turn.
Minimum string length:
1Return only events with seq strictly greater than this value. 0 is equivalent to omitting the parameter. Requires ascending order and is mutually exclusive with cursor; combining it with either cursor or order=desc is rejected with 400.
Required range:
x >= 0Required range:
1 <= x <= 200Available options:
asc, desc