> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myme.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Export tenant data

> Streams the tenant's items, edges, metadata, extensions, and blob references as NDJSON or a tar.gz archive. Filterable by `type`, `state`, `source`, `since` / `until`. NDJSON is the default — one JSON object per line, items first then edges then metadata, suitable for piping into another store or `jq`. `format=archive` produces a `marfa-archive-v1.tar.gz` ingestible by `POST /admin/restore-archive` for tenant-to-tenant migrations.

Long-running; the response keeps streaming until the filter is exhausted. Tenant-scoped — exports only what the caller can read. See [Bulk operations — archive restore](/api/bulk-operations#archive-restore) for the round-trip.



## OpenAPI

````yaml /openapi.json get /export
openapi: 3.1.0
info:
  title: Marfa API
  version: 4.2.0
  description: Typed data layer for structured personal data
servers: []
security: []
paths:
  /export:
    get:
      tags:
        - Export
      summary: Export tenant data
      description: >-
        Streams the tenant's items, edges, metadata, extensions, and blob
        references as NDJSON or a tar.gz archive. Filterable by `type`, `state`,
        `source`, `since` / `until`. NDJSON is the default — one JSON object per
        line, items first then edges then metadata, suitable for piping into
        another store or `jq`. `format=archive` produces a
        `marfa-archive-v1.tar.gz` ingestible by `POST /admin/restore-archive`
        for tenant-to-tenant migrations.


        Long-running; the response keeps streaming until the filter is
        exhausted. Tenant-scoped — exports only what the caller can read. See
        [Bulk operations — archive
        restore](/api/bulk-operations#archive-restore) for the round-trip.
      parameters:
        - schema:
            type: string
          required: false
          name: type
          in: query
        - schema:
            type: string
          required: false
          name: state
          in: query
        - schema:
            type: string
          required: false
          name: source
          in: query
        - schema:
            type: string
          required: false
          name: since
          in: query
        - schema:
            type: string
          required: false
          name: until
          in: query
        - schema:
            type: string
          required: false
          name: format
          in: query
        - schema:
            type: string
          required: false
          name: target_tenant_id
          in: query
      responses:
        '200':
          description: >-
            Streaming NDJSON export of items with metadata (or archive when
            format=archive)
          content:
            text/x-ndjson:
              schema:
                type: string
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - validation_error
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - unauthorized
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or OAuth Token
      description: Pass an API key (marfa_k1_...) or OAuth access token (marfa_at_...)

````