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

# Remplace un jeton et transfère l'historique de l'ancien



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/audience/devices/rotate
openapi: 3.1.0
info:
  title: API DexNotify
  version: '1'
  description: >-
    SMS, e-mail, WhatsApp, notifications push, contacts et campagnes, par une
    seule API. Authentification par clé API dans l’en-tête `x-api-key`.
servers:
  - url: https://api.dexnotify.com
    description: Production et staging
security:
  - api-key: []
tags:
  - name: SMS
  - name: E-mail
  - name: WhatsApp
  - name: Contacts
  - name: Listes de contacts
  - name: Campagnes
  - name: Modèles e-mail
  - name: Automatisations
  - name: Notifications push
  - name: Campagnes push
  - name: Journal des messages
  - name: In-app
  - name: Live Activities
  - name: Utilisateurs et appareils
  - name: Segments
  - name: Modèles push
  - name: Événements
  - name: Statistiques
paths:
  /api/v1/audience/devices/rotate:
    post:
      tags:
        - Utilisateurs et appareils
      summary: Remplace un jeton et transfère l'historique de l'ancien
      operationId: DevicesController_rotate_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                previousToken:
                  type: string
                  minLength: 16
                  maxLength: 4096
                token:
                  type: string
                  minLength: 16
                  maxLength: 4096
                webPushKeys:
                  type: object
                  properties:
                    p256dh:
                      type: string
                      minLength: 80
                      maxLength: 96
                    auth:
                      type: string
                      minLength: 20
                      maxLength: 32
                  required:
                    - p256dh
                    - auth
              required:
                - previousToken
                - token
      responses:
        '200':
          description: ''
      security:
        - api-key: []
components:
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Clé API du projet, créée dans le dashboard (Développeurs › Clés API et
        SDK). Une clé `dxn_prod_` vise la production, une clé `dxn_stag_` le
        staging.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.