Skip to content

Datasets, files and tasks

These endpoints act as one signed-in person — the same datasets, RebelVault files and Agent tasks that person sees in the portal and the mobile app. They need a standard user’s token from POST /authorize/totp.

A customer-wide API user token is refused with 403 standard_user_token_required: there is no person behind it, so there is nothing personal for it to act on. API user tokens keep working on /infer and /image-analysis.

All endpoints live under /api/v1 and take the usual header:

HeaderValue
AuthorizationBearer <token from /authorize/totp>

Datasets

GET /api/v1/datasets?limit=200

The datasets the person may query — their spec_id values are what /infer accepts in spec_ids.

{
"items": [
{
"spec_id": "a1b2…",
"project_id": 9,
"name": "Fleet bookings",
"status": "ready",
"row_count": 1543,
"created_at": "2026-10-01T08:00:00Z",
"updated_at": "2026-11-01T08:00:00Z",
"llm_exposure": "full",
"dataset_kind": "structured"
}
]
}

llm_exposure (full, limited, advisory) is the dataset’s AI exposure policy: selecting a limited dataset means answers hold back raw row values.

Files (RebelVault)

GET /api/v1/files list owned, shared and dataset-granted files
POST /api/v1/files upload a personal file (multipart field `file`)
GET /api/v1/files/{file_id} metadata, shares and embedding status
GET /api/v1/files/{file_id}/download short-lived download link
DELETE /api/v1/files/{file_id} delete a file the person owns
  • Uploads land in the person’s own RebelVault, exactly like the Agent chat-bar upload, and are embedded for search. POST /files requires an Idempotency-Key header: retrying with the same key and the same file replays the first response instead of storing a duplicate.
  • Download needs download permission on the file (owner, or a share that allows download).
  • Delete only works on files the person owns — including documents the Agent generated for them.

Agent tasks

POST /api/v1/tasks create a task (requires Idempotency-Key header)
GET /api/v1/tasks list the person's tasks
GET /api/v1/tasks/{task_id} one task
GET /api/v1/tasks/{task_id}/runs run history
PATCH /api/v1/tasks/{task_id} retitle, reword, pause/resume, change cadence
DELETE /api/v1/tasks/{task_id} delete

Create body:

{
"title": "Morning fleet digest",
"prompt": "Summarise yesterday's workshop bookings",
"cadence_seconds": 86400,
"run_at": null,
"max_runs": null,
"email_results": true
}
  • One-off task: set run_at and leave cadence_seconds null. Recurring: set cadence_seconds (minimum 60).
  • Scheduled reports: a title or prompt that asks for a spreadsheet (“excel”, “xlsx”, “workbook”, “spreadsheet”) creates a scheduled report. Each run saves a workbook to the person’s RebelVault and opens a follow-up chat. A report created here has no datasets selected, so it builds from the person’s files; to schedule a report over datasets, create it in an Agent chat with those datasets selected.
  • Tasks are licence-gated. If the customer’s tier doesn’t include Agent tasks, these endpoints return 402 feature_unavailable.
  • Task quota follows the customer’s licence (402 quota_exceeded when full).

Errors

StatusCodeMeaning
401—Missing, invalid or expired token
402feature_unavailable, quota_exceededLicence tier or quota
403standard_user_token_requiredThe token is an API user’s, not a person’s
404file_not_found, task_not_foundNot found, or not visible to this person
409idempotency_key_conflictSame key reused with a different body
422—Idempotency-Key header missing on a mutation, or an invalid body