staqlydocs
REST APIAPI referenceAuth

Start a workspace export

Start a workspace export (admin; GDPR data portability)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/workspace/export

Queues a background job that builds a ZIP (workspace.json, collections.ndjson, posts.ndjson with their targets, events.ndjson, media.ndjson, media/ files under their original names, webhooks.json with secrets redacted, channels.json without credentials, schedules.json, README.txt). Every plan can export. On a plan without data export (Starter) the export is data only (includes_media: false): the same files without media/, media.ndjson lists each file by id, original_name and mime_type. Plus and above, the trial and the Community Edition get the files too. Only one export per workspace may be pending or running (409 with details.export_id). Finished archives are deleted after 24 hours.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Header Parameters

Idempotency-Key?string

Replays the stored response when the same key is repeated with the same method, path, query string and body within 24 hours (422 idempotency_mismatch with a different request, 409 idempotency_in_progress while the first one runs). Not applied to multipart uploads or to responses that carry a secret.

Lengthlength <= 200

Response Body

Accepted

application/json
  1. response
id*string
status*string
Value in"pending""running""ready""failed""expired"
includes_media*boolean

false for a data-only export (Starter): no media/ files in the ZIP

size_bytes*integer
error?string
created_at*string
Formatdate-time
started_at*|
Formatdate-time
finished_at*|
Formatdate-time
expires_at*string
Formatdate-time
download_url?string

Relative URL, present when status is ready

curl -X POST 'https://staqly.example.com/v1/workspace/export'
{  "id": "string",  "status": "pending",  "includes_media": true,  "size_bytes": 0,  "error": "string",  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "finished_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "download_url": "string"}