History

The Directory API gives you access to Organizations, Accounts, Employees and Groups. Every Entity within the subsequent API calls must have an Organization attached and API calls must be made with a User specific JWT.

Search conversation history.

post
Body
querystringRequired

Search query string.

pageintegerOptional

Page number (0-based) for paginated results.

countintegerOptional

Number of results per page.

Responses
200
Success
application/json
post
POST /api/v1/agent/search HTTP/1.1
Host: api.peoplelogic.dev
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "query": "sales report",
  "page": 0,
  "count": 10
}
[
  {
    "id": "conv123",
    "conversationId": "conv123",
    "result": "Conversation about Quarterly Results",
    "timestamp": "2025-07-01T08:00:00Z",
    "type": "conversation"
  },
  {
    "id": "msg789",
    "conversationId": "conv123",
    "result": "Q2 sales increased by 20%.",
    "timestamp": "2025-07-01T08:05:00Z",
    "type": "message"
  }
]

Retrieve conversation history.

post

Get all messages in a conversation, optionally those after a specific time.

Body
questionstringOptional

User's question or message.

maxResultsintegerOptional

Max number of results or steps (defaults to 5).

additionalInstructionsstringOptional

Additional instructions or context for the agent.

conversationIdstringOptional

ID of an existing conversation (for follow-ups; omit for new questions).

sincestring · date-timeOptional

If provided, get history messages since this timestamp (used in history request).

Responses
200
Success
application/json
post
POST /api/v1/agent/history HTTP/1.1
Host: api.peoplelogic.dev
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "conversationId": "conv123",
  "since": "2025-07-13T00:00:00Z"
}
[
  {
    "tenant": "acme-inc",
    "userId": "user123",
    "agent": "",
    "messageType": "user_request",
    "message": "How can I improve team productivity?",
    "tokenUsage": 0,
    "timeSpent": 0,
    "conversationId": "conv123",
    "timestamp": "2025-07-13T15:00:00Z",
    "sources": []
  },
  {
    "tenant": "acme-inc",
    "userId": "user123",
    "agent": "Peoplelogic Agent",
    "messageType": "agent_response",
    "message": "Encourage open communication and regular feedback...",
    "tokenUsage": 1500,
    "timeSpent": 3000,
    "conversationId": "conv123",
    "timestamp": "2025-07-13T15:00:05Z",
    "sources": [
      {
        "name": "Employee Handbook",
        "type": "document",
        "url": "https://example.com/handbook.pdf"
      }
    ]
  }
]

Was this helpful?