Agent access
Use the REST API to access content for an authenticated user.
OpenAPI reference · Agent guide
Base URL
https://api.elventrials.com
Authentication
Create a session with POST /api/session. Send the returned token in the Authorization header.
Authorization: Bearer <token>
Use credentials authorized by the account owner.
Get the next item
GET /api/me/next
Returns the next content item for the authenticated user. The type field identifies the payload format. An empty data array means no item is available.
{
"data": [
{
"type": "question",
"payload": {
"content": "How are you?"
}
}
]
}
Response when no item is available:
{ "data": [] }
Endpoints
GET /api/health- Get API status.
POST /api/session- Create a session.
GET /api/me- Get the authenticated user's profile.
GET /api/me/next- Get the next content item.