Before sending your first request, you need to set up three server-side endpoints on your side. See Customer Endpoints in Platform Features.
Once your endpoints are set up, you can start using our API to enqueue your users’ conversations.
Your First Request
We have designed a simple and reliable API for enqueuing your conversations. To receive your first reply, simply follow the steps below.
1. Authentication
We use access keys to authenticate requests made to our API. An access key is required to start sending requests. To create one, visit your customer dashboard under “Project > Access Keys” section.
Once you have your access key, include it in every request using the HTTP header Authorization like this Bearer {api-key} (e.g. Authorization: Bearer sk-proj-XXXXXXXXXX).
2. Request Parameters
Conversation enqueue endpoint requires the following parameters:
3. Building Your Request Body
Our API expects a request containing JSON. Below is an example of the expected format:
4. Sending Your Request
You have to send a request using a cURL command.
You should receive a 204 HTTP response status, indicating that your request has been accepted. An answer will be sent soon to your Incoming Content Endpoint.
5. Receiving Your Reply
You will receive a reply as soon as possible. If the user replies again, simply enqueue the conversation again, and we’ll continue from there!
Check your project logs for any errors from your customer endpoints. To do this, go to your customer dashboard, navigate to the Project section in the left sidebar, and select Logs.
Before You Go Live
A short checklist of profile details that are easy to forget but materially affect conversation quality. All are returned by your Profile Endpoint; see the Profile data type for the full schema.
Double-check timeZone first. It’s the most common omission, and the symptoms (wrong time of day, odd greetings) are easy to mistake for a model issue.