---
title: "Start an export of your organization's data"
method: POST
path: "/v2/data-export"
tags: ["Data Export"]
---

# Start an export of your organization's data

`POST /v2/data-export`

Start a background export of **your** organization's data and return a
task id. Poll `GET /v2/data-export/{task_id}` until it succeeds to get a
short-lived download URL for the `permit-org-export-<org>-<ts>.tar.gz`
(one `data/<table>.csv` per table + `manifest.json`).

Requires an Organization API key with ADMIN access; write/read-only keys are
rejected. The organization is taken from the key, so this only ever exports
your own organization. The archive contains your plaintext API-key secrets
(so a self-hosted import keeps working without re-issuing keys) — treat the
download URL and the file as credentials.

## Response `202`

Export job accepted; poll the result endpoint with the task id

- TaskResultOrgExportResult
  - `task_id` string, required — The unique id of the task.
  - `status` 'processing' | 'success' | 'failure' | 'cancelled', required — An enumeration.
  - `result` OrgExportResult — API result on a completed export poll — carries a freshly minted, short-lived presigned download URL (never persisted).
    - `download_url` string, required — Short-lived presigned URL to download the export archive. Treat as a credential — it grants access to the archive, which contains plaintext API-key secrets.
    - `expires_in_seconds` integer, required — How long the download URL stays valid.
    - `filename` string, required
    - `size_bytes` integer, required
  - `error` ErrorDetails
    - `id` string, required
    - `title` string, required
    - `support_link` string, uri
    - `error_code` 'INVALID_INPUT' | 'INVALID_JWKS_CONFIGURATION' | 'UNEXPECTED_ERROR' | 'NOT_FOUND' | 'DUPLICATE_ENTITY' | 'EMPTY_DECISION_LOGS' | 'MISSING_REQUEST_ATTRIBUTE' | 'FORBIDDEN_ACCESS' | 'INVALID_PERMISSION_FORMAT' | 'MISSING_PERMISSIONS' | 'UNSUPPORTED_ATTRIBUTE_TYPE' | 'MISSING_RESOURCE_ATTRIBUTE' | 'MISMATCH_ATTRIBUTES_TYPES' | 'INVALID_POLICY_REPO_STATUS' | 'INVALID_SMTP_CONFIGURATION' | 'MISMATCH_RESOURCE_INSTANCES_TENANTS' | 'PAGINATION_SIZE_OVERREACHED' | 'MISMATCH_RELATION_TYPE' | 'CONCURRENT_OPERATION_DISALLOWED' | 'UNAUTHORIZED', required — An enumeration.
    - `message` string
    - `additional_info` unknown

## Other responses

- `403` — The API key lacks ADMIN access to the organization — the archive contains every plaintext API-key secret, so a write/read-only key is rejected (same gate as GET /v2/api-key/{id})
- `422` — Validation Error
- `503` — Export storage is not configured — try again later

---

[API](https://skmtc.net/permit/apis/permit-io-api.md) · [All operations](https://skmtc.net/permit/apis/permit-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/permit/permit-io-api/revisions/d56798d2b3b3/schema)
