Vocatech

In depth

Pagination and dates

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

Plain text

List routes take page, from 1, and limit, and answer with meta:

meta in GET /v1/calls
{
  "meta": {
    "page": 2,
    "limit": 500,
    "total_pages": 4,
    "total_calls": 1873
  }
}
RoutelimitTotal in meta
GET /v1/calls1 to 500, default 500total_calls
GET /v1/messages1 to 500, default 500total_messages
GET /v1/faxes1 to 500, default 500total_faxes
GET /v1/contacts1 to 500, default 100total_contacts
GET /v1/webhooks/failures1 to 100, default 20total
GET /v1/callers/{number}1 to 50 calls, default 10, no pagescounts
GET /v1/messages/queueUp to 200 items, no pagesqueue.pending

Dates and time zones

  • start_date and end_date are YYYY-MM-DD, and you send both or neither. Neither, or only one, means today.
  • They are read in timezone, an IANA name such as America/Chicago. The default is America/New_York. A name the API does not know falls back to New York, so check query.timezone in the answer.
  • A request covers at most 366 days, and end_date may not come before start_date. Either answers 400. For more history, walk a year at a time.
  • The answer echoes what it used in query: the local dates and the time zone.
  • Every time in an answer is UTC, except created_at in the send answers of POST /v1/messages and POST /v1/faxes, which carries New York time with its offset. Webhook endpoint, failure and queue listings write times as 2026-09-24 13:06:53, also UTC.

Stable order

Rows that tie on the sort key come back in a fixed order, so a page never repeats or skips a row while the data stands still. New calls land while you page, though. To walk a range cleanly, sort day_asc, or walk a window that has closed, such as yesterday.

# Every page, oldest first, until page reaches meta.total_pages (uses jq)
page=1
while :; do
  body=$(curl -s -H "Authorization: Bearer $VOCATECH_API_KEY" \
    "https://api.vocatech.com/v1/messages?start_date=2026-09-01&end_date=2026-09-23&sort=day_asc&limit=500&page=$page")
  echo "$body" | jq -c '.messages[]'
  [ "$page" -ge "$(echo "$body" | jq '.meta.total_pages')" ] && break
  page=$((page + 1))
done

For a nightly sync, walk yesterday in full each night. For a first import, walk a year at a time.