Quickstart
Integration Flow
Choose the base URL
For the production environment:
https://public-api.thinkvoice.aiBase URLs for test, preprod or on-prem environments are shared separately by our team.
Get a token
curl --request POST 'https://public-api.thinkvoice.ai/api/public/auth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "[email protected]",
"password": "YourPassword"
}'Store the access_token value from the response.
Use the token in all protected requests
Send the following header with every protected request, except for the Call Ingestion and Text Channels (/api/v1/webhooks/*) endpoints:
Authorization: Bearer <access_token>Query call records
Adjust the date range, call type and pagination parameters as needed. See the Call Records page for details.
Get the details of a single call
Pass the callId you received via webhook or saw in the Call Records response as the callId query parameter. See the Call Detail page for details.
Download the call recording
Send a GET request to the recordUrl from the response using the same Bearer token. See the Call Recording page for details.
Start a voice agent call
Start a call by filling in the assistantId, phoneNumberId and customerNumber fields. See the Voice Agent page for details.
List call logs
Filter by date range, phone number, call_id, status and limit. See the Call Logs page for details.
Send PBX calls to ThinkVoice (optional)
If you want to send calls from your PBX to ThinkVoice for analysis, use the X-Api-Key and X-Api-Secret values provided by our team instead of a Bearer token. See the Call Ingestion section for details.
Send text channel conversations to ThinkVoice (optional)
To have conversations from text channels such as live chat analyzed together with their messages, use the X-Api-Key and X-Api-Secret values (or a Bearer token). See the Text Channels section for details.
Handle errors
Catch and handle 400, 401, 403 and 429 responses on the client side. See the Error Codes page for details.
Environments
| Environment | Base URL |
|---|---|
| Production | https://public-api.thinkvoice.ai |
Practical Tips
- Run your first tests with cURL
- Get a token first, then test the endpoints one by one with the same token
- The token is valid for 2 hours; renew it with
refresh_tokenbefore it expires - If you need deep pagination, keep the
skip + take ≤ 10,000limit in mind (for/public-calls/get-calls) - You can track calls started with
voice-agent/start-callthroughvoice-agent/call-log - Do not treat feedback summary texts as raw data — sensitive fields are masked