Authenticating to the API is done using an API key that is passed in an Authentication header. All requests to an API endpoint, must contain the following header:
Authorization: Bearer <API_KEY>
To get your API_KEY reach out to your account manager @Quack AI.
POST /conversation
Start a conversation. Optionally, send context data to initialize the session. A conversation_id will be returned in the response header.
Request:
// Headers
"X-Quack-Conversation-ID": "abc123" // if you don't have send without -> it will create a new one
// Payload example
{
"context": {
"user_id": "1234",
"product_line": "Product 1"
},
"messages":[
// you can put here previous messages
{
"content":"what integrations you support? ",
"role":"user" // roles will always be user or assistant
},
]
}
// the response will include toolCallId with result of "talk_to_an_agent"
```
a:{"toolCallId":"call_P9Xonb8qLaqwAursPMOHzibE","result":"talk_to_an_agent"}
```
In case of skipping ( out of scope for Quack / Quack can't answer it ):
// the response will include toolCallId with result of "skip_it"
```
a:{"toolCallId":"call_orLGhq3LG9tKkCOErl3DJJoW","result":"skip_it"}
```