Vocatech

Recipes

Pull today’s calls

Written beside the API’s code, and read from it every hour.

Plain text
  1. Ask GET /v1/calls with sort=day_asc and limit=500, and raise page until it reaches meta.total_pages.
  2. Read each call's journey: one entry per leg, for every menu, group and person. A transcribed leg has summary and transcription. A recorded leg has recording_url.
  3. recording_url is an API address. Call it with your key: the answer holds a signed url that works for 30 minutes with no key. Download from there.
  4. A call parked and picked up again is recorded in parts. Each leg lists its parts in recordings, oldest first, each with its own url. recording_url, summary and transcription are the latest part's. To keep every part, fetch each entry of recordings the same way.
# 1. Today's calls, New York time, 500 a page, oldest first
curl "https://api.vocatech.com/v1/calls?sort=day_asc&limit=500&page=1" \
  -H "Authorization: Bearer $VOCATECH_API_KEY"

# 2. A recording: ask for a signed link, then download it with no key (uses jq)
url=$(curl -s https://api.vocatech.com/v1/media/rec_58213407 \
  -H "Authorization: Bearer $VOCATECH_API_KEY" | jq -r .url)
curl -o rec_58213407.mp3 "$url"

Transcripts come after the call. They usually land minutes after a call ends and can take longer on a busy day, so a call you pull right away may not have one yet. Pull again later, or subscribe to call.transcription and have it pushed to you.

For another day or range, add start_date, end_date (YYYY-MM-DD) and your timezone. Filters for direction, status, extension and a text search are in the Calls reference.