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

# Preview a cross-environment client migration



## OpenAPI

````yaml /openapi/clients.json post /clients/{id}/migrate/preview
openapi: 3.1.1
info:
  title: ARTU Compliance API
  version: 1.0.0
  description: 'API for compliance management. Documentation: https://docs.artu.ai'
servers:
  - url: https://api.artu.ai
security:
  - bearerAuth: []
    environmentHeader: []
paths:
  /clients/{id}/migrate/preview:
    post:
      tags:
        - Clients
      summary: Preview a cross-environment client migration
      operationId: clients.migratePreview
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                to:
                  enum:
                    - test
                    - live
                  type: string
                precedence:
                  enum:
                    - source
                    - target
                  type: string
                  default: source
                include:
                  type: object
                  properties:
                    addresses:
                      type: boolean
                      default: true
                    bankAccounts:
                      type: boolean
                      default: true
                    contactMethods:
                      type: boolean
                      default: true
                    documents:
                      type: boolean
                      default: true
                    relationships:
                      type: boolean
                      default: true
                    transactions:
                      type: boolean
                      default: true
                  default:
                    addresses: true
                    bankAccounts: true
                    contactMethods: true
                    documents: true
                    relationships: true
                    transactions: true
              required:
                - to
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  target:
                    type: object
                    properties:
                      exists:
                        type: boolean
                      action:
                        enum:
                          - create
                          - update
                        type: string
                      id:
                        anyOf:
                          - type: string
                            format: uuid
                          - type: 'null'
                    required:
                      - exists
                      - action
                      - id
                  blockers:
                    type: array
                    items:
                      type: object
                      properties:
                        resource:
                          enum:
                            - client
                            - transaction
                          type: string
                        id:
                          type: string
                          format: uuid
                        label:
                          type: string
                        reason:
                          const: missing-external-id
                      required:
                        - resource
                        - id
                        - label
                        - reason
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        resource:
                          enum:
                            - clients
                            - transactions
                            - addresses
                            - bankAccounts
                            - contactMethods
                            - documents
                            - evidence
                            - relationships
                          type: string
                        total:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        creates:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        updates:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                        - resource
                        - total
                        - creates
                        - updates
                required:
                  - target
                  - blockers
                  - items
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key authentication. Obtain your API key from the dashboard.
    environmentHeader:
      type: apiKey
      in: header
      name: X-Environment
      description: Target environment for the request. Must be "test" or "live".

````