curl --request GET \
--url 'https://api.neyrs.cloud/v1/messages?sessionId=session_abc123def456&limit=50' \
--header 'Authorization: Bearer neyrs_live_abc123def456'
const response = await fetch(
'https://api.neyrs.cloud/v1/messages?sessionId=session_abc123def456&limit=50',
{
headers: {
'Authorization': `Bearer ${process.env.NEYRS_API_KEY}`
}
}
);
import requests
response = requests.get(
'https://api.neyrs.cloud/v1/messages',
params={
'sessionId': 'session_abc123def456',
'limit': 50
},
headers={
'Authorization': f'Bearer {api_key}'
}
)
{
"messages": [
{
"messageId": "msg_abc123def456",
"role": "user",
"content": "Swap 5 SOL for USDC",
"timestamp": "2024-03-08T14:30:00Z",
"intent": {
"action": "swap",
"confidence": 0.98
}
},
{
"messageId": "msg_xyz789ghi012",
"role": "agent",
"content": "I'll swap 5 SOL for USDC. Expected output: ~736.25 USDC",
"timestamp": "2024-03-08T14:30:01Z"
}
],
"pagination": {
"hasMore": false,
"nextCursor": null
}
}
{
"error": {
"code": "session_not_found",
"message": "Session not found"
}
}
Messages
Get Message History
Retrieve conversation history for a session
GET
/
v1
/
messages
curl --request GET \
--url 'https://api.neyrs.cloud/v1/messages?sessionId=session_abc123def456&limit=50' \
--header 'Authorization: Bearer neyrs_live_abc123def456'
const response = await fetch(
'https://api.neyrs.cloud/v1/messages?sessionId=session_abc123def456&limit=50',
{
headers: {
'Authorization': `Bearer ${process.env.NEYRS_API_KEY}`
}
}
);
import requests
response = requests.get(
'https://api.neyrs.cloud/v1/messages',
params={
'sessionId': 'session_abc123def456',
'limit': 50
},
headers={
'Authorization': f'Bearer {api_key}'
}
)
{
"messages": [
{
"messageId": "msg_abc123def456",
"role": "user",
"content": "Swap 5 SOL for USDC",
"timestamp": "2024-03-08T14:30:00Z",
"intent": {
"action": "swap",
"confidence": 0.98
}
},
{
"messageId": "msg_xyz789ghi012",
"role": "agent",
"content": "I'll swap 5 SOL for USDC. Expected output: ~736.25 USDC",
"timestamp": "2024-03-08T14:30:01Z"
}
],
"pagination": {
"hasMore": false,
"nextCursor": null
}
}
{
"error": {
"code": "session_not_found",
"message": "Session not found"
}
}
Authorization
string
required
Bearer token. Format:
Bearer neyrs_live_abc123def456Query Parameters
string
required
Session ID. Format:
session_<16 chars>number
Number of messages to return. Default: 50, Max: 100
string
Pagination cursor for next page
Response
array
Array of message objectsEach message contains:
messageId(string): Message identifierrole(string):useroragentcontent(string): Message texttimestamp(string): ISO 8601 timestampintent(object): Parsed intent (if applicable)
object
Pagination metadataProperties:
hasMore(boolean): More messages availablenextCursor(string): Cursor for next page
curl --request GET \
--url 'https://api.neyrs.cloud/v1/messages?sessionId=session_abc123def456&limit=50' \
--header 'Authorization: Bearer neyrs_live_abc123def456'
const response = await fetch(
'https://api.neyrs.cloud/v1/messages?sessionId=session_abc123def456&limit=50',
{
headers: {
'Authorization': `Bearer ${process.env.NEYRS_API_KEY}`
}
}
);
import requests
response = requests.get(
'https://api.neyrs.cloud/v1/messages',
params={
'sessionId': 'session_abc123def456',
'limit': 50
},
headers={
'Authorization': f'Bearer {api_key}'
}
)
{
"messages": [
{
"messageId": "msg_abc123def456",
"role": "user",
"content": "Swap 5 SOL for USDC",
"timestamp": "2024-03-08T14:30:00Z",
"intent": {
"action": "swap",
"confidence": 0.98
}
},
{
"messageId": "msg_xyz789ghi012",
"role": "agent",
"content": "I'll swap 5 SOL for USDC. Expected output: ~736.25 USDC",
"timestamp": "2024-03-08T14:30:01Z"
}
],
"pagination": {
"hasMore": false,
"nextCursor": null
}
}
{
"error": {
"code": "session_not_found",
"message": "Session not found"
}
}