Confirm
Call this endpoint to get a Superflows response to user input via our API. It may call your APIs (if you've set them up) to get the right answer.
POST https://dashboard.superflows.ai/api/v1/answers
Authentication
When sending requests to the Superflows API, you need to authenticate using an Authorization: Bearer
header.
You can find your API token on the API settings page. It starts sfk-*
Example request
curl -X POST 'https://dashboard.superflows.ai/api/v1/confirm' \\
-H 'Content-type: application/json' \\
-H 'Authorization: Bearer <Your-Superflows-API-key>' \\
-d '{
"conversation_id": 72734,
"confirm": true,
"user_api_key": "<Your-Software's-API-key>",
}'
Query parameters
conversation_id number
Required
The id returned in the previous response in this conversation where confirmation was required.
confirm boolean
Required
Whether the user confirmed the action should be taken or not. Set to true
or false
.
user_api_key string
(optional)
To call your API, Superflows may need an API key. This API key is passed in the header set in the Superflows dashboard.
mock_api_responses boolean
(optional) default false
When set to true, all responses from your API are mocked. Set to false
when in production.
Responses
200
application/json
Those JSON objects have the following format:
id number
The conversation id. Required to make further requests in the same conversation.
role: "function" | "error"
This is the type of message you're receiving.
"function"
messages contain the response from calls to your API.
"error"
messages contain error information.
content: string
The content of the chunk of the response.
If the role is "function"
, the content is a string in JSON format, which is the response from the action called.
name: string (optional)
Only present if the role is “function”.
400
Invalid request body | No API host found - add an API host on the API settings page
401
Authentication failed
404
No active actions found
405
Only POST requests allowed
500
Internal Server Error