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)
| Name | Type | Required |
|---|---|---|
x-workspace | string (uuid) | Yes |
Response 200: 22 fields
| Name | Type | Required |
|---|---|---|
items | array of object | Yes |
items[].id | string (uuid) | Yes |
items[].format | "csv" | "json" | Yes |
items[].include | array of "posts" | "votes" | "comments" | "end_users" | Yes |
items[].status | "pending" | "running" | "completed" | "failed" | "expired" | Yes |
items[].contains_emails | boolean | Yes |
items[].rows | object | Yes |
items[].rows.posts | integervalue ≥ 0 | No |
items[].rows.votes | integervalue ≥ 0 | No |
items[].rows.comments | integervalue ≥ 0 | No |
items[].rows.end_users | integervalue ≥ 0 | No |
items[].bytes | integer | nullvalue ≥ 0 | Yes |
items[].filename | string | null | Yes |
items[].error_code | string | null | Yes |
items[].requested_by | string (uuid) | Yes |
items[].created_at | string (date-time) | Yes |
items[].finished_at | string (date-time) | null | Yes |
items[].expires_at | string (date-time) | null | Yes |
items[].download | object | null | Yes |
items[].download.url | string (uri) | Yes |
items[].download.expires_at | string (date-time) | Yes |
next_cursor | null | Yes |
Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.
curl 'https://api.upvoiced.com/v1/exports' \
-H "Authorization: Bearer $UPVOICED_API_KEY" \
-H "X-Workspace: $UPVOICED_WORKSPACE_ID"const data = await upvoiced.get('/v1/exports');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)
| Name | Type | Required |
|---|---|---|
x-workspace | string (uuid) | Yes |
idempotency-key | stringpattern ^[A-Za-z0-9_.:-]{8,128}$ | No |
| Name | Type | Required |
|---|---|---|
format | "csv" | "json" | Yes |
include | array of "posts" | "votes" | "comments" | "end_users"items 1–4 | Yes |
Response 202: 20 fields
| Name | Type | Required |
|---|---|---|
id | string (uuid) | Yes |
format | "csv" | "json" | Yes |
include | array of "posts" | "votes" | "comments" | "end_users" | Yes |
status | "pending" | "running" | "completed" | "failed" | "expired" | Yes |
contains_emails | boolean | Yes |
rows | object | Yes |
rows.posts | integervalue ≥ 0 | No |
rows.votes | integervalue ≥ 0 | No |
rows.comments | integervalue ≥ 0 | No |
rows.end_users | integervalue ≥ 0 | No |
bytes | integer | nullvalue ≥ 0 | Yes |
filename | string | null | Yes |
error_code | string | null | Yes |
requested_by | string (uuid) | Yes |
created_at | string (date-time) | Yes |
finished_at | string (date-time) | null | Yes |
expires_at | string (date-time) | null | Yes |
download | object | null | Yes |
download.url | string (uri) | Yes |
download.expires_at | string (date-time) | Yes |
Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.
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"
]
}'const data = await upvoiced.post('/v1/exports', { body: { format: 'csv', include: ['posts'] } });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)
| Name | Type | Required |
|---|---|---|
id | string (uuid) | Yes |
| Name | Type | Required |
|---|---|---|
x-workspace | string (uuid) | Yes |
Response 200: 20 fields
| Name | Type | Required |
|---|---|---|
id | string (uuid) | Yes |
format | "csv" | "json" | Yes |
include | array of "posts" | "votes" | "comments" | "end_users" | Yes |
status | "pending" | "running" | "completed" | "failed" | "expired" | Yes |
contains_emails | boolean | Yes |
rows | object | Yes |
rows.posts | integervalue ≥ 0 | No |
rows.votes | integervalue ≥ 0 | No |
rows.comments | integervalue ≥ 0 | No |
rows.end_users | integervalue ≥ 0 | No |
bytes | integer | nullvalue ≥ 0 | Yes |
filename | string | null | Yes |
error_code | string | null | Yes |
requested_by | string (uuid) | Yes |
created_at | string (date-time) | Yes |
finished_at | string (date-time) | null | Yes |
expires_at | string (date-time) | null | Yes |
download | object | null | Yes |
download.url | string (uri) | Yes |
download.expires_at | string (date-time) | Yes |
Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.
curl 'https://api.upvoiced.com/v1/exports/0190f5e2-4c1d-7a3b-8c2d-5e6f7a8b9c0d' \
-H "Authorization: Bearer $UPVOICED_API_KEY" \
-H "X-Workspace: $UPVOICED_WORKSPACE_ID"const data = await upvoiced.get('/v1/exports/{id}', { path: { id: '0190f5e2-4c1d-7a3b-8c2d-5e6f7a8b9c0d' } });No MCP tool for this operation. The MCP server covers the everyday reads and writes.