eWeWasl Docs

Copilot Sessions

List copilot sessions and inspect a session’s transcript and live plan.

Copilot conversations are grouped into sessions. Each ask_copilot call belongs to a session (new or continued via sessionId) and accumulates a message transcript plus a live todo plan. These read endpoints let you list and inspect them. All are scoped to the API-key owner.

List sessions

GET/api/v1/copilot/sessions
copilot
limitintegerOptional
Default: 20

Max sessions to return (1–50), newest first.

Response Example

{
  "data": [
    {
      "id": "9c3f0a1e-7b2d-4e54-9c2a-1f3b6d8e0a44",
      "title": null,
      "status": "active",
      "estimatedCostUsd": 0.0142,
      "createdAt": "2026-05-28T19:30:00.000Z",
      "updatedAt": "2026-05-28T19:42:11.000Z"
    }
  ]
}

Get a session

GET/api/v1/copilot/sessions/{id}
copilot

Returns the session metadata, its message transcript, and the current plan. Returns 404 if the session does not exist or belongs to another user.

data.sessionobject

Session metadata (id, title, status, estimatedCostUsd, timestamps).

data.messagesarray

The transcript, oldest first — each item has role, content, and createdAt.

data.todosarray

The live plan — position, text, status.

Get the live plan

GET/api/v1/copilot/sessions/{id}/todos
copilot

A focused view of just the ordered todo/plan items for a session — handy for polling the plan as it progresses. Returns 404 if the session is not owned by the key.

Response Example

{
  "data": [
    { "position": 0, "text": "تحليل أداء آخر 7 أيام", "status": "done", "updatedAt": "2026-05-28T19:41:02.000Z" },
    { "position": 1, "text": "اقتراح إعادة توزيع الميزانية", "status": "in_progress", "updatedAt": "2026-05-28T19:41:55.000Z" }
  ]
}

On this page