Skip to content

Answer a question about an attachment

POST
/api/v1/chat/attachment/answer
curl --request POST \
--url 'http://localhost:11044/api/v1/chat/attachment/answer?answer=example' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

Applies the capability the user chose. Accepts human phrasing (“yes”, “add it to my documents”) or a capability id. Omit attachmentId to answer the most recent question.

answer
required
string

The user’s reply, in their own words (yes, add it to my documents, a decline such as no) or a capability id from the question’s options; one that matches no option answers unclear with the options rather than guessing

attachmentId
string

The attachment whose question this answers, as attachmentId from POST /chat/attachment; omitted, the caller’s most recently asked, unexpired question is answered

Outcome status: applied, declined, no-question, unclear, or unavailable

Media type*/*

What became of an answer to an attachment question. status names the outcome

object

No active chat session

Media type*/*

A refusal from the attachment endpoints: the word error and the reason, written to be shown

object
message
required

Why the file or the answer was refused: an empty or oversized file, or no active chat session

string
status
required

Always error

string

Example

error