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

# Migrate devices tokens

> Migrate device tokens from an old system to Masivo



## OpenAPI

````yaml POST /customers/migrate/devices
openapi: 3.0.1
info:
  title: Masivo's REST API
  description: Learn how to use Masivo's REST API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.masivo.ai/api/storefront/v1
security:
  - bearerAuth: []
paths:
  /customers/migrate/devices:
    post:
      description: Migrate device tokens from an old system to Masivo
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - customers
              properties:
                customers:
                  type: array
                  minimum: 1
                  maximum: 1000
                  items:
                    $ref: '#/components/schemas/CustomerWithDevices'
            example: {}
        required: true
      responses:
        '201':
          description: Customer devices updated successfully
        '422':
          description: Invalid device entry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CustomerWithDevices:
      type: object
      required:
        - id
        - devices
      properties:
        id:
          type: string
          description: Your customer unique identifier
        devices:
          type: array
          items:
            $ref: '#/components/schemas/Device'
    Error:
      required:
        - error
        - details
      type: object
      properties:
        error:
          type: string
        details:
          type: string
    Device:
      type: object
      properties:
        device_token:
          type: string
          description: The unique token that identifies the device
        device_info:
          type: object
          description: Optional information about the device
          properties:
            platform:
              description: The platform of the device
              type: string
              enum:
                - ios
                - android
                - web
                - windows
                - macos
            model:
              description: The model of the device
              type: string
            osVersion:
              description: The operating system version of the device
              type: string
        expires_at:
          type: string
          format: date-time
          description: The date when the device token expires
        created_at:
          type: string
          format: date-time
          description: The date when the device was registered
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````