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

# Crée ou met à jour un utilisateur final

> Idempotent par externalId dans le projet et l'environnement courants. Un champ absent ne change rien, `null` le retire ; `tags` (ou `attributes`) remplace le jeu de tags.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/audience/users
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/users:
    post:
      tags:
        - Utilisateurs et appareils
      summary: Crée ou met à jour un utilisateur final
      description: >-
        Idempotent par externalId dans le projet et l'environnement courants. Un
        champ absent ne change rien, `null` le retire ; `tags` (ou `attributes`)
        remplace le jeu de tags.
      operationId: EndUsersController_upsert_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 128
                email:
                  anyOf:
                    - type: string
                      format: email
                      pattern: >-
                        ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                    - type: 'null'
                phone:
                  anyOf:
                    - type: string
                      minLength: 6
                      maxLength: 20
                    - type: 'null'
                locale:
                  anyOf:
                    - type: string
                      minLength: 2
                      maxLength: 10
                    - type: 'null'
                timezone:
                  anyOf:
                    - type: string
                      minLength: 3
                      maxLength: 64
                    - type: 'null'
                attributes:
                  type: object
                  propertyNames:
                    type: string
                    minLength: 1
                    maxLength: 64
                  additionalProperties:
                    anyOf:
                      - type: string
                        maxLength: 512
                      - type: number
                      - type: boolean
                tags:
                  anyOf:
                    - type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        anyOf:
                          - type: string
                            maxLength: 512
                          - type: number
                          - type: boolean
                    - maxItems: 50
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 48
              required:
                - externalId
      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.