Permit.io Data Export API

Customer self-service organization data export (PER-14389). Async job: `POST /v2/data-export` starts a background export of the caller's own organization; `GET /v2/data-export/{task_id}` polls it and, once ready, returns a short-lived presigned download URL for the tar.gz (one CSV per table + manifest). The org is derived from the API key (never a path/query parameter), so a key can only ever export its own org. Auth: an Organization API key with ADMIN access, because the archive contains every plaintext API-key secret in the org. A write or read-only key is rejected (403), exactly as it is on `GET /v2/api-key/{id}`.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

POST /v2/data-export Start an export of your organization's data #
GET /v2/data-export/{task_id} Get the status / download URL of an export #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/permitio:permitio-data-export-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

permitio-data-export-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Permit.io Data Export API
  description: Authorization as a service
  version: 2.0.0
tags:
- name: Data Export
  description: 'Customer self-service organization data export (PER-14389).


    Async job: `POST /v2/data-export` starts a background export of the caller''s own

    organization; `GET /v2/data-export/{task_id}` polls it and, once ready, returns

    a short-lived presigned download URL for the tar.gz (one CSV per table +

    manifest). The org is derived from the API key (never a path/query parameter),

    so a key can only ever export its own org.


    Auth: an Organization API key with ADMIN access, because the archive contains

    every plaintext API-key secret in the org. A write or read-only key is rejected

    (403), exactly as it is on `GET /v2/api-key/{id}`.'
paths:
  /v2/data-export:
    post:
      tags:
      - Data Export
      summary: Start an export of your organization's data
      description: '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--.tar.gz`

        (one `data/

        .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.'
      operationId: start_organization_export
      responses:
        '202':
          description: Export job accepted; poll the result endpoint with the task id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResult_OrgExportResult_'
        '403':
          description: 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})
        '503':
          description: Export storage is not configured — try again later
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/data-export/{task_id}:
    get:
      tags:
      - Data Export
      summary: Get the status / download URL of an export
      description: 'Poll an export started by `POST /v2/data-export`. While it runs the

        status is `processing`; on `success` the `result` carries a short-lived

        presigned `download_url`; on `failure` the `error` explains why (e.g. the

        org is too large for the self-service export). Only exports of your own

        organization are visible.'
      operationId: get_organization_export
      security:
      - HTTPBearer: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          description: The export task id from the POST response
          title: Task Id
        description: The export task id from the POST response
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResult_OrgExportResult_'
        '403':
          description: 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':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ErrorCode:
      type: string
      enum:
      - 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
      - CONDITION_SET_OVER_DEPTH
      - POLICY_GUARD_PROTECTED
      - KEY_SCOPE
      - NOT_PROVISIONED
      title: ErrorCode
    OrgExportResult:
      properties:
        download_url:
          type: string
          title: Download Url
          description: 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:
          type: integer
          title: Expires In Seconds
          description: How long the download URL stays valid.
        filename:
          type: string
          title: Filename
        size_bytes:
          type: integer
          title: Size Bytes
      additionalProperties: false
      type: object
      required:
      - download_url
      - expires_in_seconds
      - filename
      - size_bytes
      title: OrgExportResult
      description: 'API result on a completed export poll — carries a freshly minted,

        short-lived presigned download URL (never persisted).'
    ErrorDetails:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        support_link:
          anyOf:
          - type: string
            maxLength: 65536
            minLength: 1
            format: uri
          - type: 'null'
          title: Support Link
        error_code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
          default: ''
        additional_info:
          title: Additional Info
      type: object
      required:
      - id
      - title
      - error_code
      title: ErrorDetails
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    TaskStatus:
      type: string
      enum:
      - processing
      - success
      - failure
      - cancelled
      title: TaskStatus
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskResult_OrgExportResult_:
      properties:
        task_id:
          type: string
          title: Task Id
          description: The unique id of the task.
        status:
          $ref: '#/components/schemas/TaskStatus'
          description: The status of the task.
        result:
          anyOf:
          - $ref: '#/components/schemas/OrgExportResult'
          - type: 'null'
          description: The result of the task when the task finished.
        error:
          anyOf:
          - $ref: '#/components/schemas/ErrorDetails'
          - type: 'null'
          description: The error details when the task failed.
      additionalProperties: false
      type: object
      required:
      - task_id
      - status
      title: TaskResult[OrgExportResult]
  securitySchemes:
    HTTPBearer:
      type: http
      description: 'Authorization header, we support the bearer authentication scheme (see: RFC 6750)'
      scheme: bearer
      bearerFormat: JWT