> ## 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.

# Copy a client into the other environment (test ↔ live)



## OpenAPI

````yaml /openapi/clients.json post /clients/{id}/migrate
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:
    post:
      tags:
        - Clients
      summary: Copy a client into the other environment (test ↔ live)
      operationId: clients.migrate
      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:
                anyOf:
                  - type: object
                    properties:
                      status:
                        const: completed
                      targetId:
                        type: string
                        format: uuid
                      action:
                        enum:
                          - created
                          - updated
                        type: string
                      counts:
                        type: array
                        items:
                          type: object
                          properties:
                            resource:
                              enum:
                                - clients
                                - transactions
                                - addresses
                                - bankAccounts
                                - contactMethods
                                - documents
                                - evidence
                                - relationships
                              type: string
                            created:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            updated:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                          required:
                            - resource
                            - created
                            - updated
                    required:
                      - status
                      - targetId
                      - action
                      - counts
                  - type: object
                    properties:
                      status:
                        const: blocked
                      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
                    required:
                      - status
                      - blockers
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".

````