Skip to main content
POST
Create an export
scope: "user" (the default) exports the effective subject — the key owner, or a provisioned subject selected with X-Exo-Subject / the reserved subject body field. scope: "org" exports every member’s data and requires the admin scope (403 permission_denied otherwise), the same posture as the org-wide GET /v1/usage. The response is 202 with an exportId: poll GET /v1/exports/{id} until status is succeeded, then follow downloadUrl. An Idempotency-Key header makes the accept replay-safe (D11) — a retry with the same key and body returns the original 202 without enqueuing a second export.

Authorization

This route requires the write scope. A missing or invalid credential returns 401 authentication_error. A valid credential without the scope returns 403 permission_denied, and the problem body names the exact scope required.

Headers

These are request conventions the contract does not declare as parameters, so they do not appear in the schema tables below.

Success responses

Errors

Beyond the shared statuses, this route can answer with idempotency_in_flight, idempotency_key_reuse. Every problem body names its own code, and the type URI always resolves to the matching page. Every error is an RFC 9457 application/problem+json body carrying a stable code, a requestId, and a suggestedAction where Exo has one. See Errors.

Notes

  • scope: "org" requires admin. The default, scope: "user", exports the effective subject.
  • JSON is the only format in v1. The contract pins format to a single value.
  • 202 then poll. Wait for status: "succeeded", then follow downloadUrl.

Authorizations

X-Exo-API-Key
string
header
required

An Exo API key (exo_...) sent as the X-Exo-API-Key header.

Body

application/json

POST /v1/exports request body.

subject is a RESERVED top-level field consumed by the shared subject seam (spec 4.2) and is intentionally NOT declared here -- declaring it would shadow the seam and let the body disagree with the resolved principal.

format
string
default:json
Allowed value: "json"
scope
enum<string>
default:user
Available options:
user,
org

Response

The export was accepted and is being assembled

202 body of POST /v1/exports: the pollable export id.

exportId
string
required