Assistant APIRate an answer

Rate an answer

Records whether an answer helped. Ratings show with your docs site's in Analytics.

curl -X POST "https://api.documentation.ai/api/v1/assistant/feedback" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "answer_id": "ans_7f3c2a9e41b84d0e9a1c6b5d2e8f0a13",
  "rating": "up"
}'
{
  "recorded": true
}
POST
/feedback
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

An Assistant API key from Settings > Assistant API: the secret key (asst_sk_...) from servers and tools, or the publishable key (asst_pk_...) or a reader credential (asst_rc_...) from pages on the key's allowed origins. See Authentication.

An Assistant API key from Settings > Assistant API: the secret key (asst_sk_...) from servers and tools, or the publishable key (asst_pk_...) or a reader credential (asst_rc_...) from pages on the key's allowed origins. See Authentication.
Content-Typestring
Required

The media type of the request body

Options: application/json
answer_idstring
Required

The id of an answer given to the same key in the last 30 days.

Min length: 1 • Max length: 100
ratingstring
Required

Whether the answer helped.

Options: up, down
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. An Assistant API key from Settings > Assistant API: the secret key (asst_sk_...) from servers and tools, or the publishable key (asst_pk_...) or a reader credential (asst_rc_...) from pages on the key's allowed origins. See Authentication.

Body

application/json
answer_idstring
Required

The id of an answer given to the same key in the last 30 days.

Example:
ans_7f3c2a9e41b84d0e9a1c6b5d2e8f0a13
ratingstring
Required

Whether the answer helped.

Allowed values:updown

Responses

recordedboolean

Always true.