PreviewAPI version 0.4.0

Export reply audio

Page through every reply to your prompts and download each one as an MP3.

GET /api/v1/exports/replies returns a list of every reply to your prompts, newest first, a page at a time. Each entry has a download link. Your script fetches the files itself; nothing is zipped up or queued on our side.

You need an access token first. The Authentication guide shows how to get one.

Fetch the first page

curl
curl "https://api.voxpop.audio/api/v1/exports/replies?limit=25" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "success": true,
  "data": {
    "items": [
      {
        "postId": "3mj2k7wq4xa2c",
        "promptId": "3mi5a5dynk2n3",
        "promptTitle": "What should we cover next season?",
        "createdAt": "2026-10-14T09:12:44.000Z",
        "durationMs": 41200,
        "replier": "Sam Rivera",
        "download": {
          "url": "https://api.voxpop.audio/api/v1/media/eyJ...",
          "filename": "my-show-what-should-we-cover-next-season-sam-rivera-7wq4xa2c.mp3",
          "format": "mp3",
          "expiresAt": "2026-10-16T18:05:00.000Z"
        }
      }
    ],
    "nextCursor": "eyJ0IjoxNzI..."
  }
}

Each item is one reply:

  • postId is the reply's id, and promptId the prompt it answers.
  • promptTitle is the prompt's title, or its text if it has no title.
  • replier is the listener's handle or display name. For a reply left by phone it's a label like caller 1234; the full number is never included.
  • durationMs is the length of the recording, when it's known.
  • download is null when a reply has no audio. Skip those.

Download links expire

Fetch a page's files before you ask for the next page. The links aren't meant to be stored.

  • An mp3 link (download.format is "mp3") works for five minutes after the page is served. It needs no Authorization header, because the token in the URL is the permission.
  • An original link is the file as it was recorded, used when there's no MP3 version of it. It expires within the hour.

download.expiresAt tells you when each link stops working. If a link has lapsed, request the same page again (same cursor) and you'll get fresh links. An expired MP3 link answers 404.

download.filename is unique within an export, so you can save every file into one folder without collisions.

Ask for the next page

When nextCursor is a string, pass it back as cursor to get the next page. When it's null, you have everything.

curl
curl "https://api.voxpop.audio/api/v1/exports/replies?limit=25&cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

limit sets the page size, from 1 to 50. The default is 25. Smaller pages leave you more time per link if your downloads are slow.

Filters

  • promptId: only replies to one prompt.
  • status: live, archived or all. The default is all, so replies you've archived in the inbox are included unless you say otherwise.
  • dateFrom and dateTo: an ISO 8601 date or timestamp, like 2026-10-01.

Rate limits

The export allows 10 page requests a minute, and the MP3 links 60 downloads a minute. Over either limit you get a 429. Wait a minute and retry.

A complete script

This downloads every reply into a replies folder:

JavaScript
// Downloads every reply into ./replies. Node 18+.
// getAccessToken() is the helper from the Authentication guide.
import { mkdir, writeFile } from 'node:fs/promises';

const EXPORT_URL = 'https://api.voxpop.audio/api/v1/exports/replies';

async function getPage(cursor) {
  const url = new URL(EXPORT_URL);
  url.searchParams.set('limit', '25');
  if (cursor) url.searchParams.set('cursor', cursor);
  const res = await fetch(url, {
    headers: { Authorization: `Bearer ${await getAccessToken()}` },
  });
  const body = await res.json();
  if (!body.success) {
    throw new Error(`Export failed (${res.status}): ${body.error.message}`);
  }
  return body.data;
}

await mkdir('replies', { recursive: true });
let cursor = null;

do {
  const page = await getPage(cursor);

  // Download this page's files BEFORE asking for the next page:
  // the links expire a few minutes after the page is served.
  for (const item of page.items) {
    if (!item.download) continue; // a reply with no audio
    const file = await fetch(item.download.url);
    if (!file.ok) throw new Error(`${item.download.filename}: ${file.status}`);
    await writeFile(`replies/${item.download.filename}`, Buffer.from(await file.arrayBuffer()));
  }

  cursor = page.nextCursor;
} while (cursor);