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

# Accepter une invitation d'utilisateur partagé

> POST /multi-users/accept-invitation/

Accepte une invitation d'utilisateur partagé et définit le mot de passe du coéquipier, sur l'hôte de l'**API de gestion** (`api.scanova.io`).

```
POST https://api.scanova.io/multi-users/accept-invitation/
```

<Warning>
  Contrairement à tout autre endpoint de cette page, celui-ci **ne** nécessite **pas** de clé d'API de gestion — il est `AllowAny`. Il est destiné à être appelé depuis le navigateur du coéquipier invité lui-même, via le lien de son e-mail d'invitation, et non depuis l'intégration du compte qui invite.
</Warning>

<ParamField body="hash" type="string" required>
  Le hash d'invitation du lien envoyé par e-mail, 250 caractères maximum.
</ParamField>

<ParamField body="password1" type="string" required>
  Le nouveau mot de passe du coéquipier.
</ParamField>

<ParamField body="password2" type="string" required>
  Confirmation du mot de passe — doit correspondre à `password1`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.scanova.io/multi-users/accept-invitation/" \
    -H "Content-Type: application/json" \
    -d '{
      "hash": "a1b2c3d4e5f6...",
      "password1": "correct-horse-battery-staple",
      "password2": "correct-horse-battery-staple"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  "Invitation accepted"
  ```
</ResponseExample>

## Validité du hash

Un hash n'est valide que s'il existe, n'a pas déjà été utilisé, et a été envoyé dans la fenêtre de validité de lien d'invitation configurée du compte — l'invitation initiale comme tout [renvoi](/fr/api-reference/management-api/shared-users/resend-invitation) actualisent l'horodatage à partir duquel cette fenêtre est mesurée. `400` avec `"Verification link is invalid or expired."` si le hash échoue à l'une de ces vérifications, ou si les deux mots de passe ne correspondent pas ou échouent à la politique de mot de passe.

## Voir aussi

* [Inviter un utilisateur partagé](/fr/api-reference/management-api/shared-users/invite) — d'où provient le hash du lien envoyé par e-mail.
* [Renvoyer l'e-mail d'invitation d'un utilisateur partagé](/fr/api-reference/management-api/shared-users/resend-invitation) — obtenir un nouveau hash si l'original a expiré.
* [Présentation de l'API de gestion](/fr/api-reference/management-api/overview) — le schéma d'authentification que cet endpoint n'utilise délibérément **pas**.


## OpenAPI

````yaml api-reference/openapi/management-api.json POST /multi-users/accept-invitation/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /multi-users/accept-invitation/:
    post:
      summary: Accept a shared-user invitation
      description: >-
        Public endpoint — no Management API key required — called by the invited
        teammate's browser from the link in their invitation email, not by the
        inviting account's own integration.
      operationId: acceptManagedInvitation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                hash:
                  type: string
                  maxLength: 250
                  description: The invitation hash from the emailed link.
                password1:
                  type: string
                password2:
                  type: string
              required:
                - hash
                - password1
                - password2
            example:
              hash: a1b2c3d4e5f6...
              password1: correct-horse-battery-staple
              password2: correct-horse-battery-staple
      responses:
        '200':
          description: Invitation accepted — the shared user can now log in.
        '400':
          description: >-
            Hash invalid/already used/expired (per
            INVITATION_LINK_VALIDITY_DAYS), or the two passwords don't
            match/fail policy.
      security: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````