AI Coach

Get paginated chat history

get/api/chat-history

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/chat-history
  • Auth
    HTTP bearer

Query parameters

pagenumber
limitnumber
searchstring
responseTypestring

Filter by response_type. Defaults to "chat" only. Pass "all" to include daily_fix and other types.

Response

unknown required

Example response

{
  "success": true,
  "conversations": [
    {
      "id": 2,
      "sessionId": "6b1f2c7e-3d4a-4f8b-9c21-0a5e7d8f1b32",
      "userMessage": "[Menu Fix]",
      "aiResponse": "Looked at that menu. Best call is the Grilled Salmon — 420 cal, 38g protein.",
      "responseType": "chat",
      "attachments": [
        {
          "url": "https://cdn.example.com/lucille-chat/42/1754563-8821.jpg?Policy=...&Signature=...&Key-Pair-Id=...",
          "mime": "image/jpeg",
          "name": "IMG_4821.jpg"
        }
      ],
      "card": {
        "type": "menu_fix",
        "v": 1,
        "status": "done",
        "clientTurnId": "c1f0e9d8-...",
        "payload": {
          "recommendations": [],
          "avoid": [],
          "phaseBlocked": false
        }
      },
      "createdAt": "2026-02-19T10:00:01.000Z"
    },
    {
      "id": 1,
      "sessionId": "6b1f2c7e-3d4a-4f8b-9c21-0a5e7d8f1b32",
      "userMessage": "How much protein?",
      "aiResponse": "Great question!...",
      "responseType": "chat",
      "attachments": [],
      "card": null,
      "createdAt": "2026-02-19T10:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 42,
    "totalPages": 3
  }
}

Changes

No recorded changes to this operation across all 34 revisions of this API.