Retrieve a chat

get/v1/chat/{chatId}

Retired. This endpoint answers 410 Gone and no longer works. It is documented for reference only; use the v2 agent API's Chat instead.

Fetch one chat with its complete message history. Assistant messages include their slots; once you have called Search for a slot, its results array holds the products that were attached, and once you have generated compositions, compositions holds their ids.

While a streamed reply is still being generated, the trailing assistant message is a placeholder whose output_status part carries generating: true; the flag disappears when generation completes or fails.

Private keyapi.v1.chat.retrieveNo demoDeprecated

Path parameters

1
chatIdstring (uuid)required

The chat's id (a UUID). Surrounding whitespace is trimmed.

Response

200The chat.
Chatrequired

A conversation between a shopper and the stylist, as returned by Retrieve a chat.

chatIdstring (uuid)required

Unique id of the chat.

e.g. "3f0c2a4e-8b1d-4c6a-9e2f-7a5b1c0d9e88"
array<ChatMessage>required

The ordered message thread. User turns come first; each stylist turn is an assistant message with three content parts.

createdAtstring (date-time)required

When the chat was created.

e.g. "2026-09-12T14:03:11.412Z"
updatedAtstring (date-time)required

When the chat was last written to (a new message, slot results, or compositions).

e.g. "2026-09-12T14:09:48.907Z"

Errors

20

Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.

404
Chat not found or you do not have permission to access it.

No chat with that id belongs to the organization.

410
This endpoint has been retired (v1/chat/[chatId]).

Always, for API callers. This check runs before authentication and consumes no quota.

422
A valid chatId is required.

The path segment is only whitespace (for example %20).

curl -X GET "https://stylor.ai/api/v1/chat/YOUR_CHAT_ID" \
  -H "Authorization: Bearer $STYLOR_API_KEY"
Response · 200
{
  "chat": {
    "chatId": "3f0c2a4e-8b1d-4c6a-9e2f-7a5b1c0d9e88",
    "createdAt": "2026-09-12T14:03:11.412Z",
    "updatedAt": "2026-09-12T14:09:48.907Z",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "input_text",
            "text": "I need a smart-casual outfit for a rooftop dinner, budget around $300."
          }
        ]
      },
      {
        "role": "assistant",
        "content": [
          {
            "type": "output_text",
            "text": "For a rooftop dinner I'd pair a silk slip dress with a cropped leather jacket and strappy heels."
          },
          {
            "type": "output_slots",
            "slots": [
              {
                "id": "8066a68a-a39e-4d3e-993a-3887f6245032",
                "type": "search",
                "slot": "dress",
                "query": "black silk slip dress",
                "filters": {
                  "fit": [
                    "slim"
                  ],
                  "pattern": [
                    "solid"
                  ],
                  "material": [
                    "silk"
                  ],
                  "color_family": [
                    "black"
                  ],
                  "color_rgb": [
                    20,
                    20,
                    20
                  ],
                  "family": [
                    "dress"
                  ],
                  "exclude_terms": [
                    "maxi"
                  ],
                  "boost_terms": [
                    "silk"
                  ],
                  "minPrice": null,
                  "maxPrice": 180
                },
                "results": [
                  {
                    "itemId": "2f9d8c7b-6a5e-4d3c-b2a1-0f9e8d7c6b5a",
                    "description": "Black silk slip dress with cowl neck, midi length, slim fit, $165",
                    "displayOrder": 0
                  },
                  {
                    "itemId": "4e1a2b3c-5d6f-4a7b-8c9d-0e1f2a3b4c5d",
                    "description": "Satin bias-cut slip dress in onyx, adjustable straps, $149",
                    "displayOrder": 1
                  }
                ]
              },
              {
                "id": "5b2e9f40-3c7d-4e1a-9f6b-8d0c2a4e6f17",
                "type": "outfit_compositions",
                "results": [],
                "compositions": [
                  "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d"
                ]
              }
            ]
          },
          {
            "type": "output_status",
            "status": "resolved"
          }
        ]
      }
    ]
  }
}