Overview
Your phone system, chat platform, help desk, or any other system can send conversations to Ender Turing directly. Each conversation is one HTTPS request that carries a developer API token. There is no separate sign-in step.
Recordings are sent as audio files. Ender Turing reads the call details from the file name and transcribes the call.
Chats are sent as JSON with the participants and the messages. Email and ticket threads use the same format, with one message per email or comment.
Ender Turing then analyzes the conversation, and it appears on the All Conversations page like any other.
Use this when a system or a partner uploads conversations automatically. To upload a few by hand, use Upload in the web interface instead.
How It Works
Before You Start
You need two things from your Ender Turing administrator:
Your Ender Turing address, for example
company.enderturing.com.A developer API token. It starts with
et_api_. The administrator creates it on the Developer API tokens tab, as described in API Access. The predefined Session API role can upload conversations. A custom role needs the permission to create conversations.
Keep the token secret, like a password. Store it in a secrets manager, not in code, and never put it in a URL, a log, or a ticket. If it leaks, ask your administrator to revoke it: the old token stops working at once.
Every request needs two headers:
Authorization: Bearer <your token>;a
User-Agentthat starts withEnderTuringSDK/and names your tool, for exampleEnderTuringSDK/my-dialer/1.0. Without it, the Ender Turing cloud firewall may block the request.
Uploading a Recording
Send one POST request per recording to:
https://company.enderturing.com/api/v1/recognizer/audio-file
The body is multipart/form-data with one field named file that holds the recording, with an audio content type set on that field.
Example with curl:
curl -X POST "https://company.enderturing.com/api/v1/recognizer/audio-file" \ -H "Authorization: Bearer <your token>" \ -H "User-Agent: EnderTuringSDK/<your app name>/1.0" \ -F "file=@20261203_1015_101_0501234567_IN_0.wav;type=audio/wav"
Example with Python and the requests library:
import requestsname = "20261203_1015_101_0501234567_IN_0.wav"
with open(name, "rb") as f:
response = requests.post(
"https://company.enderturing.com/api/v1/recognizer/audio-file",
headers={
"Authorization": "Bearer <your token>",
"User-Agent": "EnderTuringSDK/<your app name>/1.0",
},
files={"file": (name, f, "audio/wav")},
timeout=300,
)
print(response.status_code, response.text)
Both examples set the content type of the file field (type=audio/wav and "audio/wav"). Without it the upload fails.
Language
You do not need to send a language. Ender Turing uses the language configured for your account.
If your account processes recordings in more than one language, add ?language=<code> to the address, with the language code your administrator gives you. The code must match a language your account has speech recognition for.
File Rules
Extension | Content type to send |
|---|---|
|
|
|
|
|
|
|
|
Send stereo recordings with the agent and the customer on separate channels.
Name each file in the format Ender Turing reads, so the date, time, agent, customer number, direction, and agent channel are filled in for you. The format is described under Filename Format in Upload. It also lets Ender Turing spot a file it already received, which makes retries safe. To test your names, see Checking a File Name below.
Files under about 1 KB are too small for speech recognition. They create a conversation without a transcript.
Checking a File Name
When you set up the integration, check once that Ender Turing reads the file names your system produces. Send one example name, without the file, with the same two headers, to:
GET https://company.enderturing.com/api/v1/recognizer/filename-parser?filename=<file name>
Example with curl:
curl -G "https://company.enderturing.com/api/v1/recognizer/filename-parser" \ -H "Authorization: Bearer <your token>" \ -H "User-Agent: EnderTuringSDK/<your app name>/1.0" \ --data-urlencode "filename=20261203_1015_101_0501234567_IN_0.wav"
The check uses the same rules as the upload and saves nothing. You do not need it before each upload: check again only when your system's file naming changes.
If the answer lists details such as
start_dt,direction,agent_phone_number, andcaller_id, a recording with that name gets those details, and retrying it is safe.If the answer is
null, Ender Turing reads nothing from the name. The recording is still accepted, but without those details, and a retry can create a second conversation.
Uploading a Chat
Send one POST request per chat, with a JSON body, to:
https://company.enderturing.com/api/v1/sessions/chats
A short example with curl:
curl -X POST "https://company.enderturing.com/api/v1/sessions/chats" \
-H "Authorization: Bearer <your token>" \
-H "User-Agent: EnderTuringSDK/<your app name>/1.0" \
-H "Content-Type: application/json" \
-d '{
"language_code": "en",
"direction": "in",
"participants": [
{"role": "customer", "phone": "3807212345678", "full_name": "John Doe"},
{"role": "agent", "phone": "101", "full_name": "Anna Smith"}
],
"messages": [
{"msg_from": "3807212345678", "dt": "2026-12-03T11:03:00", "text": "My card is blocked."},
{"msg_from": "101", "dt": "2026-12-03T11:04:10", "text": "I can help. Let me check your account."}
],
"metadata": {"chat_system_id": "chat-000123"}
}'
What the fields mean:
Field | Required | Meaning |
|---|---|---|
| Yes | Everyone in the chat. Each has a |
| Yes | The messages in time order. Each has |
| No | The chat's language, for example |
| No |
|
| No | When the chat started and ended, in your team's local time. Left out, they are taken from the first and last message. |
| No | Topic names to put on the chat. Topics that do not exist yet are created. |
| No | Details from your system, such as |
Each message's
msg_frommust match thephoneof one of the participants.Send every time as your team's local clock time, with no
Zand no offset such as+02:00. Ender Turing does not convert time zones: it drops the zone and keeps the clock time as sent. For example, a chat at 11:03 in Warsaw is sent as2026-12-03T11:03:00.A chat that no agent joined, for example one the customer left early, still needs a participant with the
botrole. Ender Turing then files it under its shared chatbot agent.Agents are matched to Ender Turing agents by
phone. An agent with a new phone is added automatically. A chat whose agent is switched off in Ender Turing is not saved (see the answers below).Send your own ID for the chat in
metadata.chat_system_id. You can then find the chat later by that ID, as described under Finding a Conversation by an ID From Another System in API Access.The full list of fields and a complete example are in the API reference: ask a person with access to open API Documentation in the Help menu and look up
POST /api/v1/sessions/chats.
What the Answer Means
Answer | Meaning | What to do |
|---|---|---|
| Accepted. Processing has started. A | Nothing. |
| Recordings only: a file with this name was already uploaded. Ender Turing checks this only for names it can read (see Checking a File Name). The answer carries the existing | Nothing. Do not send it again. |
| The token is missing, wrong, expired, or revoked. | Check the |
| The token's role does not allow uploads. | Ask your administrator to check the token's roles. |
| Recordings only: the file type, extension, or content type is not supported. | Fix the file or its content type, then send it again. |
| Recordings only: the agent in the file name is switched off in Ender Turing. | Do not retry. Tell your administrator if the agent should be active. |
| Chats only: the agent with that | Do not retry. Keep the chat and tell your administrator. Send it again after the agent is switched on. |
| The request is missing a required field or has a wrong value. For recordings, this usually means the file field is not named | Fix the request, then send it again. |
| A temporary problem. | Retry later, as described below. |
An HTML page instead of JSON | The cloud firewall stopped the request. | Check the |
Retries and Good Practice
Recordings: retrying is safe only for names Ender Turing can read. For those, it recognizes a file it already accepted and answers
duplicate. Names it cannot read, such asrecording.wav, are not checked, so a retry after a timeout can create a second conversation for the same call.Chats: Ender Turing does not check for duplicates. Every request creates a new chat. After a timeout or no answer, do not send the chat again right away: it may already be saved, and it shows up in search only after processing finishes. Processing usually takes 1 to 10 seconds, and longer when the system is busy. Wait a few minutes, look for the chat by its
chat_system_id, and send it again only if it is still not there.Wait longer between retries, for example 1, 5, and 15 minutes, then alert someone.
Keep each recording or chat until you get a
200answer with asession_idor"status": "duplicate"for it.Send conversations one after another, not many at the same time.
Allow time for large files. The answer to a recording upload comes only after the whole file is stored, so use a timeout of a few minutes.
