Skip to main content
GET
/
api
/
assistants
/
threads
/
{threadId}
/
messages
Retrieve session thread messages
curl --request GET \
  --url https://agent-service-511985928315.us-east4.run.app/api/assistants/threads/{threadId}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Envole-User-Id: <api-key>'
[
  {
    "id": "msg_122",
    "role": "user",
    "content": "Can you send an email to john@company.com about the project status update?",
    "timestamp": "2024-01-01T11:59:00Z"
  },
  {
    "id": "msg_123",
    "handle": "@project_manager",
    "role": "assistant",
    "content": "I'll send an email to john@company.com with the project status update. Let me compose and send that for you.",
    "toolExecutionHumanApprovalRequest": [
      {
        "toolId": "tool_456",
        "name": "gmail_send_email",
        "provider": "GMAIL",
        "category": "EMAIL",
        "toolExecutionId": "exec_789",
        "executionBatchId": "batch_101",
        "toolArguments": {
          "to": "john@company.com",
          "subject": "Project Status Update",
          "body": "Hi John,\n\nHere's the latest project status update...",
          "from": "assistant@company.com"
        },
        "status": "PENDING_HUMAN_APPROVAL"
      }
    ],
    "timestamp": "2024-01-01T12:00:00Z"
  }
]
Get messages from a session thread.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

X-Envole-User-Id
string
header
required

External user identifier; not necessarily registered with Envole

Path Parameters

threadId
string
required

Query Parameters

maxResults
integer

Response

A list of session thread messages.

id
string
handle
string
role
enum<string>
Available options:
user,
assistant,
system
content
string
toolExecutionHumanApprovalRequest
object[]
timestamp
string<date-time>
I