Upload recordings with the API

Send audio files straight to your extensions from your own system - no portal login needed.

Try it live →

1Get your API key

In the portal, open Users, then API keys, and press New key. Give it a name and press Copy.

You can limit a key to some extensions: Only these or All except these. Leave the list empty to allow every extension. Switch on Include sub-extensions and an extension in the list also covers everything under it.

Keep the key secret, like a password. If it leaks, delete it on the Users page and make a new one.

2Send the key with every call

Add this header. Put your key in place of YOUR_KEY.

Authorization: Bearer YOUR_KEY

3See your extensions

This lists every extension your key may use. Each has an extension_id: the same Extension ID number you see in the portal.

curl -H "Authorization: Bearer YOUR_KEY" \
  https://api.hotlinex.net/v1/extensions
extension_idThe number you upload to, like 40566
nameThe extension's name
pathThe keys a caller presses to get there, like 2/4/0
typeWhat it does: menu, playback, voicemail...
activeWhether it is switched on
recordingsHow many recordings it plays now

4Upload a recording

Send the audio file to the extension's number. Here it goes to extension 40566.

curl -H "Authorization: Bearer YOUR_KEY" \
  -F "file=@shiur.mp3" \
  https://api.hotlinex.net/v1/extensions/40566/recordings

Want it at a set number in the list? Add -F "number=5". Without it, it goes on top.

Any common audio file works (mp3, wav, m4a, ogg...). Up to 4096 MB and 600 minutes per file. If the extension needs approval, the file waits in Pending until someone approves it.

5Check that it's ready

The upload answers with an upload_id. Ask about it until status says ready, usually a few seconds.

curl -H "Authorization: Bearer YOUR_KEY" \
  https://api.hotlinex.net/v1/uploads/UPLOAD_ID
queuedWaiting its turn
processingBeing converted
readyDone - callers can hear it
failederror says why

?If something goes wrong

401The key is missing or wrong. Copy it again from the Users page.
403This key may not use that extension. Check its list on the Users page.
404No extension has that number.
409The account is out of space. Empty Trash or ask for more.
413 / 415The file is too big, too long, or not audio.