Assistant
1 operation in the WP Waterfall API.
Ask the dashboard assistant a question
post/assistant/messagesPermalink to Ask the dashboard assistant a question
- Dashboard session only, no API key
A signed-in session only. No API key may call it. The assistant answers with reads that run as the caller's own session, so it sees what the caller sees. It answers 503 until the model is set up on the server.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, AssistantMessageRequest
Fields
| Name | Type | Description |
|---|---|---|
message required | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | AssistantAnswer | The answer, with the reads it used and the ones it refused |
400 | Problem | The session has no active company |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
503 | Problem | The assistant is not set up on this server |
200 response fields
| Name | Type | Description |
|---|---|---|
answer required | string | |
tools_used required | array of string | |
refused_tools required | array of string |