Export the organization list as CSV
POST /v1/organization_exports: Export the organization list as CSV.
POST /
Starts a server-side CSV export of the environment’s organizations (id, name, external_id, status, created_at, metadata as JSON), newest first, optionally narrowed by the list’s exact metadata filter. Poll GET /v1/organization_exports/{export} for the download URL, valid 24 hours. Cells a spreadsheet would run as a formula are prefixed with a quote.
- Scope
organizations:read- Auth
- Secret key (
sk_…) - Since
- 1.0
Headers
Section titled “Headers”
Minor version; defaults to the environment’s pin.OhAuthCat-Versionstring
Request body
Section titled “Request body”
Exact metadata filter, likemetadataobjectmetadata[key]=valueon the list.
Responses
Section titled “Responses”- 202 Accepted; the export is pending. OrganizationExport
- 400 Invalid request. Codes: parameter_invalid, parameter_missing, version_unsupported and resource-specific codes from the catalogue. Error
- 401 Codes: authentication_required, api_key_invalid. Error
- 403 Codes: api_key_scope_missing, ip_not_allowed, plan_limit_reached. Error
- 429 Code: rate_limited. Retry-After is set. Error
- 503 Code: service_unavailable. Retry-After is set; writes are paused. Error
- default Any other error, including internal_error. Every code is in the error catalogue. Error
Errors share one shape; see the error code catalogue.
curl -X POST \ "https://api.ohauthcat.com/v1/organization_exports" \ -H "Authorization: Bearer $OHAUTHCAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "metadata": { "plan": "enterprise" }}'const response = await fetch("https://api.ohauthcat.com/v1/organization_exports", { method: "POST", headers: { Authorization: `Bearer ${process.env.OHAUTHCAT_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "metadata": { "plan": "enterprise" } }),});const data = await response.json();import osimport requests
response = requests.post( "https://api.ohauthcat.com/v1/organization_exports", headers={"Authorization": f"Bearer {os.environ['OHAUTHCAT_API_KEY']}"}, json={ "metadata": { "plan": "enterprise", }, },)data = response.json(){ "id": "oexp_01J9ZQ4M7K2X8V3N5B6C1D0E9F", "object": "organization_export", "state": "pending", "row_count": 1, "url": "https://app.acme.com/callback", "expires_at": "2026-01-15T09:30:00Z"}