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

# Export customer data

> Export MoonPay-verified customer data using a consent token



## OpenAPI

````yaml POST /platform/v1/customers/export
openapi: 3.1.0
info:
  title: MoonPay
  version: 1.0.0
servers:
  - url: https://api.moonpay.com
    description: Production Environment
    variables: {}
  - url: https://api.moonpay.dev
    description: Sandbox Environment
    variables: {}
security: []
tags:
  - name: Assets
  - name: Quote
  - name: Customer
  - name: Identity
  - name: Transactions
paths:
  /platform/v1/customers/export:
    post:
      summary: Export a customer's verified MoonPay identity
      description: >-
        Returns the MoonPay-verified identity for the customer that issued the
        consent token. Requires the partner's secret API key (`X-Api-Key`) and
        the single-use consent token presented as `Authorization: Bearer <jwt>`.
        Returns 403 if the consent token is not bound to a customer. The consent
        token is consumed on success, and each returned `downloadUrl` is
        short-lived (see field); if a URL expires before the partner has fetched
        the file, mint a fresh consent token via `POST
        /platform/v1/partner/grants` and call this endpoint again.
      operationId: CustomerExportController.export
      parameters: []
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CustomerExportIdentity'
                required:
                  - data
                unevaluatedProperties:
                  not: {}
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Access is forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '409':
          description: The request conflicts with the current state of the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
      security:
        - AccessTokenAuth: []
          SecretApiKeyInHeaderAuth: []
components:
  schemas:
    CustomerExportIdentity:
      type: object
      required:
        - basicDetails
        - residentialAddress
        - phoneNumber
        - taxIdentifiers
        - files
      properties:
        basicDetails:
          allOf:
            - $ref: '#/components/schemas/CustomerExportBasicDetails'
          description: The customer's basic personal details.
        residentialAddress:
          allOf:
            - $ref: '#/components/schemas/CustomerExportResidentialAddress'
          description: The customer's residential address.
        phoneNumber:
          allOf:
            - $ref: '#/components/schemas/CustomerExportPhoneNumber'
          description: The customer's phone number.
        taxIdentifiers:
          type: array
          items:
            $ref: '#/components/schemas/CustomerExportTaxIdentifier'
          description: >-
            Tax identifiers recorded on the customer's identity. Empty when the
            customer has no recorded tax identifiers.
        files:
          type: array
          items:
            $ref: '#/components/schemas/CustomerExportFile'
          description: >-
            Identity-related files the customer has submitted, each with a
            pre-signed download URL.
      unevaluatedProperties:
        not: {}
      description: >-
        The customer's MoonPay-verified identity. All fields are populated from
        the customer's latest approved identity verification.
    UnauthorizedError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - unauthorized
        message:
          type: string
          enum:
            - Not authorized
      unevaluatedProperties:
        not: {}
      description: Missing or invalid credentials.
    ForbiddenError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - forbidden
        message:
          type: string
          enum:
            - Forbidden
      unevaluatedProperties:
        not: {}
      description: Insufficient permissions.
    ConflictError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - conflict
        message:
          type: string
          enum:
            - Conflict
      unevaluatedProperties:
        not: {}
      description: The request conflicts with the current customer state.
    CustomerExportBasicDetails:
      type: object
      required:
        - firstName
        - lastName
        - dateOfBirth
        - nationality
      properties:
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Customer's first/given name. `null` for mononymous customers
            recorded with only a last name.
          examples:
            - Jane
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Customer's last/family name. `null` for mononymous customers
            recorded with only a first name.
          examples:
            - Doe
        dateOfBirth:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Customer's date of birth in `YYYY-MM-DD` format. `null` when MoonPay
            does not hold this value.
          examples:
            - '1990-01-15'
        nationality:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Customer's nationality as an [ISO 3166-1
            alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country
            code. `null` when MoonPay does not hold this value.
          examples:
            - USA
      unevaluatedProperties:
        not: {}
      description: >-
        The customer's basic personal details from their verified MoonPay
        identity.
    CustomerExportResidentialAddress:
      type: object
      required:
        - country
        - locality
        - street
        - postalCode
      properties:
        country:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Country of the residential address as an [ISO 3166-1
            alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country
            code. `null` when MoonPay does not hold this value.
          examples:
            - USA
        administrativeArea:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            State, province, or territory. Present when the country has
            subdivisions recognised by MoonPay (currently USA and CAN); `null`
            when MoonPay does not hold this value for those countries. Omitted
            for all other countries.
          examples:
            - NY
        locality:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            City, town, or locality. `null` when MoonPay does not hold this
            value.
          examples:
            - New York
        street:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            First line of the residential address (street). `null` when MoonPay
            does not hold this value.
          examples:
            - 350 Fifth Avenue
        subStreet:
          type: string
          description: >-
            Optional second line of the residential address (apartment, unit,
            building). Omitted when MoonPay does not hold this value.
          examples:
            - Apt 1A
        postalCode:
          anyOf:
            - type: string
            - type: 'null'
          description: Postal or ZIP code. `null` when MoonPay does not hold this value.
          examples:
            - '10118'
      unevaluatedProperties:
        not: {}
      description: The customer's residential address from their verified MoonPay identity.
    CustomerExportPhoneNumber:
      type: object
      required:
        - number
      properties:
        number:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The customer's phone number in
            [E.164](https://en.wikipedia.org/wiki/E.164) format. `null` when
            MoonPay does not hold this value.
          examples:
            - '+14155551234'
      unevaluatedProperties:
        not: {}
      description: The customer's phone number from their verified MoonPay identity.
    CustomerExportTaxIdentifier:
      type: object
      required:
        - type
        - value
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/CustomerExportTaxIdentifierType'
          description: Type of tax identifier.
        country:
          type: string
          description: >-
            Country issuing the identifier as an ISO 3166-1 alpha-3 code.
            Present for `tin` entries; omitted for country-specific schemes
            (`ssn`, `cpf`).
          examples:
            - GBR
        value:
          type: string
          description: Identifier value as recorded by MoonPay.
      unevaluatedProperties:
        not: {}
      description: A tax identifier on the customer's verified MoonPay identity.
    CustomerExportFile:
      type: object
      required:
        - id
        - type
        - uploadedAt
        - downloadUrl
      properties:
        id:
          type: string
          format: uuid
          description: MoonPay's identifier for the file.
        type:
          allOf:
            - $ref: '#/components/schemas/CustomerExportFileType'
          description: Type of file.
        side:
          allOf:
            - $ref: '#/components/schemas/CustomerExportFileSide'
          description: >-
            Side of the document. Present for two-sided file types; omitted for
            single-sided.
        uploadedAt:
          type: string
          format: date-time
          description: Timestamp at which MoonPay received the file.
        downloadUrl:
          type: string
          format: uri
          description: >-
            A pre-signed URL for downloading the file. The URL expires 60
            minutes after the response is returned. Do not attach your API key
            when fetching it; the signature is the only credential required.
      unevaluatedProperties:
        not: {}
      description: >-
        An identity-related file on the customer's verified MoonPay identity,
        including a pre-signed download URL.
    CustomerExportTaxIdentifierType:
      type: string
      enum:
        - tin
        - ssn
        - cpf
      description: Type of tax identifier returned in the verified identity payload.
    CustomerExportFileType:
      type: string
      enum:
        - driving_licence
        - national_identity_card
        - passport
        - residence_permit
        - selfie
        - proof_of_address
      description: >-
        Type of identity-related file referenced in the verified identity
        payload.
    CustomerExportFileSide:
      type: string
      enum:
        - front
        - back
      description: >-
        Side of a two-sided identity document. Present for `driving_licence`,
        `national_identity_card`, and `residence_permit`; omitted for
        single-sided file types.
  securitySchemes:
    AccessTokenAuth:
      type: http
      scheme: bearer
      description: |-
        Bearer authentication header using an access token.

        Example: `Authorization: Bearer <accessToken>`
    SecretApiKeyInHeaderAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: |-
        Secret key authentication via the `X-Api-Key` header.

        Example: `X-Api-Key: <secretKey>`

````