Skip to content
Skip to Content
Coder Docs

List chat user prompts

GET
/api/v2/chats/{chat}/prompts

Returns the user-authored prompts in a chat, newest first, with each prompt's text parts concatenated in the order they were authored. Used by the composer to power the up/down arrow prompt-history cycle without paging through every message in the chat.

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

chat*string

Chat ID

Formatuuid

Query Parameters

limit?integer

Page size, 0 to 2000. 0 (the default) means the server-side default of 500.

Response Body

OK

application/json
  1. response
prompts?array<>

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/api/v2/chats/{chat}/prompts" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "prompts": [    {      "id": 0,      "text": "string"    }  ]}