RiskPilot API
RiskPilot customer API

Whether the chat is available, and your monthly quota

GET
/api/v1/customer/chat

Whether the chat is available, and your monthly quota › Responses

OK

available
​boolean · required
​ChatQuota · required
maxInputChars
​integer · required
disclaimer
​string · required
reason
​string | null · enum
Enum values:
not_configured
package_disabled
message
​string | null

Your conversations

GET
/api/v1/customer/chat/conversations

Your conversations › query Parameters

limit
​integer · min: 1 · max: 200

Page size.

Default: 50
offset
​integer · min: 0

Items to skip.

Default: 0

Your conversations › Responses

OK

​Conversation[] · required
total
​integer · required
limit
​integer
offset
​integer

Start a conversation

POST
/api/v1/customer/chat/conversations

Start a conversation › Request Body optional

title
​string

Start a conversation › Responses

Created.

id
​string · required
title
​string · required
createdAt
​string · date-time
updatedAt
​string · date-time
messages
​integer

A conversation and its messages

GET
/api/v1/customer/chat/conversations/{id}

A conversation and its messages › path Parameters

id
​string · pattern: ^\d{1,18}$ · required

Conversation id.

A conversation and its messages › Responses

OK

id
​string · required
title
​string · required
createdAt
​string · date-time
updatedAt
​string · date-time
messages
​integer
disclaimer
​string

Delete a conversation

DELETE
/api/v1/customer/chat/conversations/{id}

Delete a conversation › path Parameters

id
​string · pattern: ^\d{1,18}$ · required

Conversation id.

Delete a conversation › Responses

Done (no body).

No data returned

Ask a question (JSON, or server-sent events with Accept: text/event-stream or ?stream=1)

POST
/api/v1/customer/chat/conversations/{id}/messages

Answers from RiskPilot's own data in your package's scope, with citations. Streaming sends start ({ conversationId, userMessage }), delta ({ text }) pieces, then done (the JSON answer) or error ({ error, code }). A failed answer (502 chat_model_failed) does not count against the quota.

Ask a question (JSON, or server-sent events with Accept: text/event-stream or ?stream=1) › path Parameters

id
​string · pattern: ^\d{1,18}$ · required

Conversation id.

Ask a question (JSON, or server-sent events with Accept: text/event-stream or ?stream=1) › query Parameters

stream
​string · enum

Server-sent events.

Enum values:
1

Ask a question (JSON, or server-sent events with Accept: text/event-stream or ?stream=1) › Request Body

message
​string · required

The question.

Ask a question (JSON, or server-sent events with Accept: text/event-stream or ?stream=1) › Responses

The answer.

conversationId
​string · required
​ChatMessage · required
​ChatMessage
​object
​ChatQuota
disclaimer
​string