Skip to content
UpVoiced Docs

API reference

Exports

Exports of the workspace data.

Set up the SDK client used in the examples

API key or Dashboard session:

import { UpVoiced } from '@upvoiced/sdk';

const apiKey = process.env['UPVOICED_API_KEY']; // uv_live_… (Settings → API keys)
const workspace = process.env['UPVOICED_WORKSPACE_ID']; // sent as X-Workspace
if (!apiKey || !workspace) throw new Error('Set UPVOICED_API_KEY and UPVOICED_WORKSPACE_ID.');
const upvoiced = new UpVoiced({ apiKey, workspace });

curl examples read $UPVOICED_API_KEY and $UPVOICED_WORKSPACE_IDfrom your shell. MCP examples are the tools/call request an MCP client sends to the MCP server with the same API key.

GET/v1/exports

Recent exports (owner/admin; no download URLs)

Authentication
API key or Dashboard session; API key scope admin
Operation id
listExports
Headers
NameTypeRequired
x-workspacestring (uuid)Yes
Response 200: 22 fields
Response 200 (application/json)
NameTypeRequired
itemsarray of objectYes
items[].idstring (uuid)Yes
items[].format"csv" | "json"Yes
items[].includearray of "posts" | "votes" | "comments" | "end_users"Yes
items[].status"pending" | "running" | "completed" | "failed" | "expired"Yes
items[].contains_emailsbooleanYes
items[].rowsobjectYes
items[].rows.postsintegervalue ≥ 0No
items[].rows.votesintegervalue ≥ 0No
items[].rows.commentsintegervalue ≥ 0No
items[].rows.end_usersintegervalue ≥ 0No
items[].bytesinteger | nullvalue ≥ 0Yes
items[].filenamestring | nullYes
items[].error_codestring | nullYes
items[].requested_bystring (uuid)Yes
items[].created_atstring (date-time)Yes
items[].finished_atstring (date-time) | nullYes
items[].expires_atstring (date-time) | nullYes
items[].downloadobject | nullYes
items[].download.urlstring (uri)Yes
items[].download.expires_atstring (date-time)Yes
next_cursornullYes

Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.

curl
curl 'https://api.upvoiced.com/v1/exports' \
  -H "Authorization: Bearer $UPVOICED_API_KEY" \
  -H "X-Workspace: $UPVOICED_WORKSPACE_ID"
TypeScript SDK
const data = await upvoiced.get('/v1/exports');
MCP

No MCP tool for this operation. The MCP server covers the everyday reads and writes.

POST/v1/exports

Queue a CSV/JSON export of posts, votes, comments and end-users (owner/admin; end-users owner-only)

Authentication
API key or Dashboard session; API key scope admin
Operation id
createExport
Idempotency
Send an Idempotency-Key to make retries safe.
Headers
NameTypeRequired
x-workspacestring (uuid)Yes
idempotency-keystringpattern ^[A-Za-z0-9_.:-]{8,128}$No
Request body (JSON)
NameTypeRequired
format"csv" | "json"Yes
includearray of "posts" | "votes" | "comments" | "end_users"items 1–4Yes
Response 202: 20 fields
Response 202 (application/json)
NameTypeRequired
idstring (uuid)Yes
format"csv" | "json"Yes
includearray of "posts" | "votes" | "comments" | "end_users"Yes
status"pending" | "running" | "completed" | "failed" | "expired"Yes
contains_emailsbooleanYes
rowsobjectYes
rows.postsintegervalue ≥ 0No
rows.votesintegervalue ≥ 0No
rows.commentsintegervalue ≥ 0No
rows.end_usersintegervalue ≥ 0No
bytesinteger | nullvalue ≥ 0Yes
filenamestring | nullYes
error_codestring | nullYes
requested_bystring (uuid)Yes
created_atstring (date-time)Yes
finished_atstring (date-time) | nullYes
expires_atstring (date-time) | nullYes
downloadobject | nullYes
download.urlstring (uri)Yes
download.expires_atstring (date-time)Yes

Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.

curl
curl -X POST 'https://api.upvoiced.com/v1/exports' \
  -H "Authorization: Bearer $UPVOICED_API_KEY" \
  -H "X-Workspace: $UPVOICED_WORKSPACE_ID" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "format": "csv",
  "include": [
    "posts"
  ]
}'
TypeScript SDK
const data = await upvoiced.post('/v1/exports', { body: { format: 'csv', include: ['posts'] } });
MCP

No MCP tool for this operation. The MCP server covers the everyday reads and writes.

GET/v1/exports/{id}

Export detail with a 5-minute signed download URL (owner/admin; email-bearing exports owner-only)

Authentication
API key or Dashboard session; API key scope admin
Operation id
getExport
Path parameters
NameTypeRequired
idstring (uuid)Yes
Headers
NameTypeRequired
x-workspacestring (uuid)Yes
Response 200: 20 fields
Response 200 (application/json)
NameTypeRequired
idstring (uuid)Yes
format"csv" | "json"Yes
includearray of "posts" | "votes" | "comments" | "end_users"Yes
status"pending" | "running" | "completed" | "failed" | "expired"Yes
contains_emailsbooleanYes
rowsobjectYes
rows.postsintegervalue ≥ 0No
rows.votesintegervalue ≥ 0No
rows.commentsintegervalue ≥ 0No
rows.end_usersintegervalue ≥ 0No
bytesinteger | nullvalue ≥ 0Yes
filenamestring | nullYes
error_codestring | nullYes
requested_bystring (uuid)Yes
created_atstring (date-time)Yes
finished_atstring (date-time) | nullYes
expires_atstring (date-time) | nullYes
downloadobject | nullYes
download.urlstring (uri)Yes
download.expires_atstring (date-time)Yes

Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.

curl
curl 'https://api.upvoiced.com/v1/exports/0190f5e2-4c1d-7a3b-8c2d-5e6f7a8b9c0d' \
  -H "Authorization: Bearer $UPVOICED_API_KEY" \
  -H "X-Workspace: $UPVOICED_WORKSPACE_ID"
TypeScript SDK
const data = await upvoiced.get('/v1/exports/{id}', { path: { id: '0190f5e2-4c1d-7a3b-8c2d-5e6f7a8b9c0d' } });
MCP

No MCP tool for this operation. The MCP server covers the everyday reads and writes.