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

# API per creare utenti: entità User del vendor

> Pre-carica le entità User in Didit prima delle sessioni KYC. Importa utenti da database esterni o registrali per il monitoraggio delle transazioni.



Prompt per la creazione di un utente
        Copia il prompt negli appunti



      
      

\<pre>

\`Goal: Pre-create a Didit User entity by vendor_data before any verification session runs, and optionally email the person a verification link in the same call.

Endpoint: POST https://verification.didit.me/v3/users/create/
Auth header: x-api-key: <DIDIT_API_KEY>
Content-Type: application/json

Request body fields:
\- vendor_data (string, REQUIRED) — your unique identifier for this user. Free-form string, NOT a UUID. Must be unique among non-deleted users in the app. Normalised lowercase + whitespace trim, so "USER-1" and "user-1" collide. Max 2000 bytes (UTF-8 encoded); longer values return a 400.
\- full_name (string, max 512, optional)
\- display_name (string, optional) — friendly label for the Console (takes precedence over full_name for UI).
\- date_of_birth (string YYYY-MM-DD, optional)
\- status (enum, optional) — "ACTIVE" | "FLAGGED" | "BLOCKED" (VendorUserStatusChoices). Defaults to "ACTIVE".
\- metadata (object, optional) — arbitrary JSON you attach to the user.
\- approved_emails (object<string, boolean>, optional) — e.g. {"john@example.com": true}.
\- approved_phones (object<string, boolean>, optional).
\- issuing_states (object<ISO3, int>, optional) — e.g. {"USA": 1}.

Contact fields (all optional):
\- first_name, last_name (string, max 255 each): joined with a space into full_name when you don't send full_name.
\- email (string, email): stored in metadata.contact.email.
\- phone_number (string, max 32): stored in metadata.contact.phone_number.
\- country (string): ISO 3166 code, alpha-2 or alpha-3 ("ES" or "ESP"), stored uppercased in metadata.address.country.

Verification link (optional):
\- send_verification_link (boolean, default false): when true, Didit also creates a verification session for the person on workflow_id and emails them the link at email.
\- workflow_id (UUID): REQUIRED with send_verification_link. The workflow must verify a person: a Business Verification (KYB) workflow is refused.
\- language (string, max 10): language of the verification email, a supported language code. English when omitted.
\- The person and the session are created together or not at all. The session runs the same checks as POST /v3/session/ (blocklist, credits).

curl:
curl -X POST 'https://verification.didit.me/v3/users/create/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"vendor_data": "user-abc-123", "full_name": "John Doe"}'

curl with a verification link:
curl -X POST 'https://verification.didit.me/v3/users/create/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"vendor_data": "user-abc-789", "first_name": "Julia", "last_name": "Martin", "email": "julia.martin@example.com", "send_verification_link": true, "workflow_id": "YOUR_WORKFLOW_ID"}'

Response 201: full UserDetailItem (same shape as GET /v3/users/{vendor_data}/) plus verification_link. Includes didit_internal_id (UUID), session_count, approved_count=0, metadata, comments=[], created_at, updated_at. See /reference/data-models.
\- verification_link is always present: null without a link, otherwise { session_id, session_number, status, url, workflow_id, email }. url is the link Didit emailed.

Failure modes:
\- 400: nothing is written. Most errors are keyed by field. Common cases:
\{ "vendor_data": ["A user with this vendor_data already exists."] }  // conflict, NOT idempotent. Use PATCH /v3/users/{vendor_data}/ to update.
\{ "vendor_data": ["This field is required."] }
\{ "vendor_data": ["Ensure this field has no more than 2000 characters."] }  // oversized vendor_data, rejected before it reaches storage
\{ "metadata": ["Metadata must be a JSON object."] }
\{ "country": ["Use an ISO 3166 country code, like ES or ESP."] }
\{ "email": ["metadata.contact must be a JSON object to store this value."] }  // same on phone_number; metadata.address on country
\{ "email": ["An email address is required to send a verification link."] }
\{ "workflow_id": ["Pick the workflow to send a verification link for."] }
\{ "workflow_id": ["Invalid workflow_id."] }
\{ "workflow_id": ["This workflow verifies a business. Pick a workflow that verifies a person to send them a verification link."] }
\{ "contact_details": { "email_lang": ["Invalid email language. Supported languages are ..."] } }  // unsupported language
\{ "vendor_data": "This user or business has been blocked and cannot create new verification sessions." }
\{ "detail": "You don't have enough credits to perform this request. Please top up at https://business.didit.me" }
\- 401: missing or invalid x-api-key. { "detail": "Authentication credentials were not provided." }
\- 403: the API key is revoked or is not valid for this application. { "detail": "You do not have permission to perform this action." }
\- 403: a scoped key without users write. { "detail": "This API key has no write access to people." }
\- 403: send_verification_link with a scoped key that lacks sessions write. Nothing is written. { "detail": "This API key has no write access to sessions." }
\- 429: rate-limited.

Upsert pattern (this endpoint is NOT idempotent):
GET /v3/users/{vendor_data}/  → on 404, POST /v3/users/create/; on 200, PATCH /v3/users/{vendor_data}/.

Notes:
\- Verified-session-derived identity fields such as full_name and date_of_birth seeded here can be overwritten by the first approved User Verification (KYC) session.
\- If you are migrating from another provider and already have a trusted face image, create the User first, read didit_internal_id from this response, then call POST /v3/organization/{organization_id}/application/{application_id}/vendor-users/by-id/{didit_internal_id}/faces/upload/.
\- The create itself sends no webhook. Later changes to the user send user.data.updated or user.status.updated. With send_verification_link, the new session updates the user (session_count) in the same call, which sends user.data.updated.
\- API key access: a scoped key needs users write; with send_verification_link it also needs sessions write. Full-access keys can always call it.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.`

\</pre>



      
      

Incolla in

## PanoramicaCrea esplicitamente un'[entità utente](https://docs.didit.me/it/entities/users/overview.md) prima che venga eseguita qualsiasi sessione.
L'entità restituita entra nello stato `ACTIVE`, a meno che tu non specifichi diversamente.
Facoltativamente, la stessa chiamata invia alla persona via email un link di verifica (vedi [Invia un link di verifica](#invia-un-link-di-verifica)).## Quando usarlo- **Precaricare i metadati** (livello, origine della registrazione, tag interni) prima che il cliente esegua la verifica.
- **Migrare da un altro fornitore**: ricreare l'elenco degli utenti esistenti in Didit, così che cronologia e analisi partano da una base nota.
- **Importare volti di profili attendibili**: crea prima lo User, poi chiama [Carica il volto dell'utente](https://docs.didit.me/it/management-api/users/upload-face.md) con il `didit_internal_id` restituito.
- **Casi d'uso basati solo sulle transazioni**: registra un utente con `vendor_data` in modo da poter inviare transazioni senza mai eseguire una sessione di Verifica degli utenti (KYC).
- **Invitare qualcuno a verificarsi**: crea la persona e inviale via email un link di verifica in un'unica chiamata.## Dati di contattoPuoi inviare i dati di contatto della persona insieme ai campi del profilo.
Se non invii `full_name`, `first_name` e `last_name` vengono uniti con uno spazio in `full_name`.
`email` e `phone_number` vengono salvati in `metadata.contact`, e `country` in `metadata.address`.
`country` accetta un codice ISO 3166, alpha-2 o alpha-3 (`ES` o `ESP`), e viene salvato in maiuscolo.Se il `metadata` che invii contiene già un valore `contact` o `address` che non è un oggetto JSON, Didit non lo sovrascrive: la chiamata risponde con `400` sul campo di contatto che ne aveva bisogno.## Invia un link di verificaImposta `send_verification_link` su `true` per invitare la persona a verificarsi nella stessa chiamata.
Didit crea per la persona una sessione di verifica sul workflow indicato in `workflow_id` e le invia via email il link all'indirizzo `email`.
Usa `language` per scegliere la [lingua](https://docs.didit.me/it/integration/supported-languages.md) dell'email; se lo ometti, l'email è in inglese.```bash theme={null}
curl -X POST https://verification.didit.me/v3/users/create/ \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "vendor_data": "user-abc-789",
    "first_name": "Julia",
    "last_name": "Martin",
    "email": "julia.martin@example.com",
    "send_verification_link": true,
    "workflow_id": "YOUR_WORKFLOW_ID",
    "language": "es"
  }'
```- `email` e `workflow_id` sono obbligatori quando si invia un link, e il workflow deve verificare una persona: un workflow di Verifica aziendale (KYB) risponde con `400`.
- La sessione è sottoposta agli stessi controlli di [Crea sessione](https://docs.didit.me/it/sessions-api/create-session.md).
  La presenza di un `vendor_data` nella blocklist o l'insufficienza di crediti restituiscono `400`.
- La persona e la sessione vengono create insieme oppure non viene creato nulla.
  Quando un controllo fallisce, non viene scritto nulla e non viene inviata alcuna email.
- La risposta contiene `verification_link` con `session_id`, `session_number`, `status`, `url`, `workflow_id` della sessione e l'`email` a cui è stato inviato. Senza link, `verification_link` è `null`.## Note- `vendor_data` è obbligatorio e deve essere univoco per applicazione. Tentare di creare un duplicato restituisce un errore di conflitto: usa [`PATCH /v3/users/{vendor_data}/`](https://docs.didit.me/it/management-api/users/update) per aggiornare un utente esistente.
- `vendor_data` ha un limite rigido di 2000 byte (codificati in UTF-8). Un valore che supera tale limite restituisce un errore di validazione 400 invece di essere accettato.
- I campi che normalmente derivano dalle sessioni verificate (`full_name`, `date_of_birth`) possono essere precompilati qui, ma possono essere **sovrascritti** dalla prima sessione di Verifica degli utenti (KYC) approvata.
- Questo endpoint non accetta immagini del volto. Per associare un volto importato attendibile, usa [`POST /v3/organization/{organization_id}/application/{application_id}/vendor-users/by-id/{didit_internal_id}/faces/upload/`](https://docs.didit.me/it/management-api/users/upload-face) dopo che questo endpoint ha restituito `didit_internal_id`.
- La creazione in sé non invia alcun webhook. Le modifiche successive all'utente inviano `user.data.updated` o `user.status.updated`.
- Con `send_verification_link`, la nuova sessione aggiorna l'utente nella stessa chiamata, che invia `user.data.updated`.## AutorizzazioniIl segreto primario e le [chiavi API](https://docs.didit.me/it/console/api-keys.md) con accesso completo possono sempre chiamare questo endpoint.
Una chiave con accesso personalizzato richiede l'autorizzazione di scrittura per **Persone** (`users`).
Con `send_verification_link: true` richiede anche l'autorizzazione di scrittura per **Sessioni**, perché la chiamata crea una sessione e ne fornisce il link.
Senza di essa, la chiamata risponde con `403` con `This API key has no write access to sessions.` e non viene scritto nulla.
Una chiave limitata ad alcuni workflow o alle sessioni approvate non può raggiungere questo endpoint.I [ruoli e le autorizzazioni](https://docs.didit.me/it/console/roles-permissions.md) della Console determinano cosa può fare un membro del team nella Console.
Non vengono valutati per le richieste con chiave API.## Correlati- [Modello dati dell'utente](https://docs.didit.me/it/entities/users/data-model.md)
- [Carica il volto dell'utente](https://docs.didit.me/it/management-api/users/upload-face.md)
- [Collegamento vendor\_data](https://docs.didit.me/it/entities/vendor-data-linking.md)
- [Operazioni sugli utenti](https://docs.didit.me/it/entities/users/operations.md)


## OpenAPI

````yaml it/openapi-25.json POST /v3/users/create/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API di verifica dell'identità. Autenticati con l'intestazione x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/users/create/:
    post:
      tags:
        - Users
      summary: Crea utente
      description: >-
        Crea un [utente](/entities/users) tramite `vendor_data`, prima o senza
        una sessione di verifica. `vendor_data` deve essere univoco tra gli
        utenti dell'applicazione (un duplicato restituisce `400`). Non
        idempotente.


        **Dati di contatto:** `email` e `phone_number` vengono memorizzati in
        `metadata.contact`, e `country` in `metadata.address`. Quando invii
        `first_name` o `last_name` senza `full_name`, Didit li unisce in
        `full_name`.


        **Link di verifica:** con `send_verification_link: true`, Didit crea
        anche una sessione di verifica per la persona nel workflow identificato
        da `workflow_id` e le invia il link via email all'indirizzo `email`. La
        sessione esegue gli stessi controlli di [Crea
        sessione](/it/sessions-api/create-session), come la blocklist e il tuo
        saldo crediti. La persona e la sessione vengono create insieme oppure
        non vengono create affatto: se un qualsiasi controllo fallisce, non
        viene scritto nulla e non viene inviata alcuna email. Il campo
        `verification_link` della risposta descrive la sessione, ed è `null`
        quando non richiedi un link.


        **Accesso con chiave API:** una chiave API con ambito limitato necessita
        dell'autorizzazione in scrittura su `users`. Con
        `send_verification_link: true` richiede anche l'autorizzazione in
        scrittura su `sessions`, altrimenti la chiamata risponde con `403` prima
        che venga scritto alcunché. Le chiavi con accesso completo non sono
        interessate. Consulta [Chiavi API](/it/console/api-keys).
      operationId: create_user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - vendor_data
              properties:
                vendor_data:
                  type: string
                  description: >-
                    Il tuo identificatore univoco per questo utente (stringa a
                    formato libero, NON un UUID). Deve essere univoco tra gli
                    utenti dell'applicazione; confrontato esattamente come
                    inviato.
                full_name:
                  type: string
                  nullable: true
                  maxLength: 512
                  description: Nome legale completo dell'utente.
                display_name:
                  type: string
                  nullable: true
                  description: >-
                    Nome descrittivo mostrato nella console (ha la precedenza su
                    `full_name` per la visualizzazione dell'interfaccia utente).
                  maxLength: 255
                date_of_birth:
                  type: string
                  format: date
                  nullable: true
                  description: Data di nascita nel formato `YYYY-MM-DD`.
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - FLAGGED
                    - BLOCKED
                  default: ACTIVE
                  description: >-
                    Stato iniziale del ciclo di vita. Il valore predefinito è
                    `ACTIVE`.
                metadata:
                  type: object
                  nullable: true
                  description: >-
                    Oggetto JSON arbitrario da allegare all'utente. Il valore
                    predefinito è `{}`.
                approved_emails:
                  type: array
                  items:
                    type: string
                  description: >-
                    Indirizzi email già considerati attendibili per questo
                    utente, ad es. `["john@example.com"]`.
                approved_phones:
                  type: array
                  items:
                    type: string
                  description: >-
                    Numeri di telefono già considerati attendibili per questo
                    utente, ad es. `["+14155551234"]`.
                issuing_states:
                  type: array
                  items:
                    type: string
                  description: >-
                    Paesi di emissione preregistrati (ISO 3166-1 alpha-3), ad
                    es. `["USA"]`.
                first_name:
                  type: string
                  maxLength: 255
                  description: >-
                    Nome. Quando `full_name` non viene inviato, Didit unisce
                    `first_name` e `last_name` con uno spazio in `full_name`.
                    Non restituito come campo separato.
                last_name:
                  type: string
                  maxLength: 255
                  description: >-
                    Cognome. Unito a `first_name` in `full_name` quando
                    `full_name` non viene inviato. Non restituito come campo
                    separato.
                email:
                  type: string
                  format: email
                  description: >-
                    Email di contatto, memorizzata in `metadata.contact.email`
                    (sostituisce l'`email` inviata all'interno di
                    `metadata.contact`). Obbligatoria quando
                    `send_verification_link` è `true`: il link viene inviato a
                    questo indirizzo. Se `metadata.contact` non è un oggetto
                    JSON, la chiamata risponde `400` su questo campo.
                phone_number:
                  type: string
                  maxLength: 32
                  description: >-
                    Numero di telefono di contatto, memorizzato in
                    `metadata.contact.phone_number`. Se `metadata.contact` non è
                    un oggetto JSON, la chiamata risponde `400` su questo campo.
                country:
                  type: string
                  maxLength: 3
                  description: >-
                    Paese come codice ISO 3166, alpha-2 o alpha-3 (`ES` o
                    `ESP`). Memorizzato in lettere maiuscole in
                    `metadata.address.country`. Se `metadata.address` non è un
                    oggetto JSON, la chiamata risponde `400` su questo campo.
                send_verification_link:
                  type: boolean
                  default: false
                  description: >-
                    Quando è `true`, Didit crea una sessione di verifica per la
                    persona su `workflow_id` e le invia via email il link
                    all'indirizzo `email`. Richiede `email` e `workflow_id`. Una
                    chiave API con ambito limitato richiede anche
                    l'autorizzazione di scrittura per `sessions`.
                workflow_id:
                  type: string
                  format: uuid
                  description: >-
                    Il workflow della sessione di verifica. Obbligatorio quando
                    `send_verification_link` è `true`. Deve verificare una
                    persona fisica: un workflow di Verifica aziendale (KYB)
                    viene rifiutato. Ignorato altrimenti.
                language:
                  type: string
                  maxLength: 10
                  description: >-
                    Lingua dell'email di verifica, come codice di una [lingua
                    supportata](/it/integration/supported-languages). Inglese se
                    omessa. Ignorata quando `send_verification_link` non è
                    `true`.
            examples:
              Basic:
                summary: Crea con informazioni di base
                value:
                  vendor_data: user-abc-123
                  full_name: John Doe
              Full:
                summary: Tutti i campi
                value:
                  vendor_data: user-abc-456
                  full_name: Jane Smith
                  display_name: Jane S.
                  date_of_birth: '1990-05-15'
                  status: ACTIVE
                  metadata:
                    tier: premium
                    source: api
                  approved_emails:
                    - jane@example.com
              Contact details:
                summary: Nome, email, telefono e paese
                value:
                  vendor_data: user-abc-789
                  first_name: Julia
                  last_name: Martin
                  email: julia.martin@example.com
                  phone_number: '+34600000000'
                  country: ES
              With verification link:
                summary: >-
                  Crea la persona e invia alla persona un link di verifica via
                  email
                value:
                  vendor_data: user-abc-789
                  first_name: Julia
                  last_name: Martin
                  email: julia.martin@example.com
                  send_verification_link: true
                  workflow_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  language: es
      responses:
        '201':
          description: >-
            Utente creato. Il record utente completo (stessa struttura di Get
            User), più `verification_link`: la sessione di verifica inviata via
            email da Didit quando `send_verification_link` era `true`,
            altrimenti `null`.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UserDetailItem'
                  - type: object
                    required:
                      - verification_link
                    properties:
                      verification_link:
                        type: object
                        nullable: true
                        description: >-
                          La sessione di verifica creata e inviata via email da
                          Didit alla persona. Sempre presente: `null` quando
                          `send_verification_link` non era `true`.
                        required:
                          - session_id
                          - session_number
                          - status
                          - url
                          - workflow_id
                          - email
                        properties:
                          session_id:
                            type: string
                            format: uuid
                            description: ID della sessione di verifica.
                          session_number:
                            type: integer
                            description: >-
                              Numero sequenziale della sessione all'interno
                              della tua applicazione.
                          status:
                            type: string
                            description: >-
                              Stato della sessione, `Not Started` per una
                              sessione appena creata.
                          url:
                            type: string
                            format: uri
                            description: >-
                              Il link di verifica inviato via email da Didit
                              alla persona.
                          workflow_id:
                            type: string
                            format: uuid
                            nullable: true
                            description: Il workflow eseguito dalla sessione.
                          email:
                            type: string
                            format: email
                            description: L'indirizzo a cui è stato inviato il link.
              examples:
                Created:
                  value:
                    didit_internal_id: f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418
                    vendor_data: user-abc-123
                    display_name: null
                    full_name: John Doe
                    date_of_birth: null
                    effective_name: John Doe
                    status: ACTIVE
                    metadata: {}
                    portrait_image_url: null
                    session_count: 0
                    approved_count: 0
                    declined_count: 0
                    in_review_count: 0
                    issuing_states: []
                    approved_emails: []
                    approved_phones: []
                    features: {}
                    features_list: []
                    last_session_at: null
                    last_activity_at: '2025-06-15T10:30:00Z'
                    first_session_at: null
                    tags: []
                    comments: []
                    created_at: '2025-06-15T10:30:00Z'
                    updated_at: '2025-06-15T10:30:00Z'
                    verification_link: null
                Created with verification link:
                  value:
                    didit_internal_id: 9b2f6c1e-3d4a-4e5f-8a7b-1c2d3e4f5a6b
                    vendor_data: user-abc-789
                    display_name: null
                    full_name: Julia Martin
                    date_of_birth: null
                    effective_name: Julia Martin
                    status: ACTIVE
                    metadata:
                      contact:
                        email: julia.martin@example.com
                    portrait_image_url: null
                    session_count: 1
                    approved_count: 0
                    declined_count: 0
                    in_review_count: 0
                    issuing_states: []
                    approved_emails: []
                    approved_phones: []
                    features: {}
                    features_list: []
                    last_session_at: '2025-06-15T10:30:00Z'
                    last_activity_at: '2025-06-15T10:30:00Z'
                    first_session_at: '2025-06-15T10:30:00Z'
                    tags: []
                    comments: []
                    created_at: '2025-06-15T10:30:00Z'
                    updated_at: '2025-06-15T10:30:00Z'
                    verification_link:
                      session_id: 3fa85f64-5717-4562-b3fc-2c963f66afa7
                      session_number: 43762
                      status: Not Started
                      url: https://verify.didit.me/en/session/3FaJ9wLqX2Mz
                      workflow_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      email: julia.martin@example.com
        '400':
          description: >-
            Corpo non valido, indicizzato per campo: in genere un `vendor_data`
            duplicato, un campo obbligatorio mancante o un valore non valido.
            Con `send_verification_link: true`, anche un `email` o un
            `workflow_id` mancante, un workflow sconosciuto o di Verifica
            aziendale (KYB), una `language` non supportata (indicizzata come
            `contact_details.email_lang`), un `vendor_data` presente in
            blocklist o crediti insufficienti per avviare la sessione. Non viene
            scritto nulla.
          content:
            application/json:
              examples:
                Duplicate:
                  value:
                    vendor_data:
                      - A user with this vendor_data already exists.
                Missing vendor_data:
                  value:
                    vendor_data:
                      - This field is required.
                Bad metadata:
                  value:
                    metadata:
                      - Metadata must be a JSON object.
                Bad status:
                  value:
                    status:
                      - >-
                        Invalid status. Valid options are: ACTIVE, FLAGGED,
                        BLOCKED
                Bad country:
                  value:
                    country:
                      - Use an ISO 3166 country code, like ES or ESP.
                Contact not an object:
                  value:
                    email:
                      - >-
                        metadata.contact must be a JSON object to store this
                        value.
                Address not an object:
                  value:
                    country:
                      - >-
                        metadata.address must be a JSON object to store this
                        value.
                Link without email or workflow:
                  value:
                    email:
                      - >-
                        An email address is required to send a verification
                        link.
                    workflow_id:
                      - Pick the workflow to send a verification link for.
                Unknown workflow:
                  value:
                    workflow_id:
                      - Invalid workflow_id.
                Business workflow:
                  value:
                    workflow_id:
                      - >-
                        This workflow verifies a business. Pick a workflow that
                        verifies a person to send them a verification link.
                Blocklisted vendor_data:
                  value:
                    vendor_data: >-
                      This user or business has been blocked and cannot create
                      new verification sessions.
                Insufficient credits:
                  value:
                    detail: >-
                      You don't have enough credits to perform this request.
                      Please top up at https://business.didit.me
        '401':
          description: >-
            Nessuna credenziale fornita. Le richieste ai percorsi `/v3/users/*`
            senza un'intestazione `x-api-key` (o token `Authorization: Bearer`)
            vengono rifiutate dal middleware di autenticazione prima di
            raggiungere l'API.
          content:
            application/json:
              examples:
                Missing credentials:
                  value:
                    detail: >-
                      You must be authenticated with a valid access token to
                      access this endpoint.
        '403':
          description: >-
            Chiave API non valida o revocata, oppure la chiave non può creare
            utenti per questa applicazione. Una chiave API con restrizioni
            d'ambito necessita dei permessi di scrittura su `users` e anche di
            scrittura su `sessions` quando `send_verification_link` è `true`;
            non viene scritto nulla. Una chiave mancante restituisce `403`; una
            chiave errata, revocata o scaduta restituisce `401`.
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
                No sessions write:
                  summary: >-
                    La chiave con ambito richiede un link di verifica senza
                    autorizzazione di scrittura su sessions
                  value:
                    detail: This API key has no write access to sessions.
        '429':
          description: >-
            Limite di frequenza superato; rallenta e riprova dopo l'intervallo
            indicato in `Retry-After`.
          content:
            application/json:
              examples:
                Rate limited:
                  value:
                    detail: Request was throttled. Expected available in 30 seconds.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST 'https://verification.didit.me/v3/users/create/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"vendor_data": "user-abc-123", "full_name": "John Doe"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.users.create(
                vendor_data="user-abc-123",
                full_name="John Doe",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.users.create({
              vendor_data: "user-abc-123",
              full_name: "John Doe",
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.Create(ctx, didit.UsersCreateParams{\n\tVendorData: \"user-abc-123\",\n\tFullName:   didit.String(\"John Doe\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: |-
            import me.didit.Didit;
            import me.didit.types.UsersCreateParams;

            // Reads DIDIT_API_KEY.
            Didit client = new Didit();

            var result = client.users().create(UsersCreateParams.builder()
                    .vendorData("user-abc-123")
                    .fullName("John Doe")
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->users->create([
                'vendor_data' => 'user-abc-123',
                'full_name' => 'John Doe',
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.users.create(
              vendor_data: "user-abc-123",
              full_name: "John Doe"
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: |-
            using System;
            using System.Text.Json;
            using Didit;

            // Reads DIDIT_API_KEY.
            using var client = new DiditClient();

            var result = await client.Users.CreateAsync(new UsersCreateParams
            {
                VendorData = "user-abc-123",
                FullName = "John Doe",
            });
            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    UserDetailItem:
      type: object
      description: >-
        Dettaglio completo dell'utente. Estende UserListItem con metadati,
        commenti e updated_at.
      allOf:
        - $ref: '#/components/schemas/UserListItem'
        - type: object
          properties:
            metadata:
              type: object
              description: >-
                JSON di metadati personalizzati che hai allegato a questo
                utente. Il valore predefinito è `{}`.
            tags:
              type: array
              description: >-
                Assegnazioni dei tag. NOTA: nelle risposte di dettaglio ogni
                voce è un oggetto *collegamento* del tag (`{uuid, tag: {...},
                added_by_email, added_by_name, created_at}`), a differenza della
                struttura piatta `{uuid, name, color}` usata nelle risposte di
                elenco.
              items:
                type: object
                properties:
                  uuid:
                    type: string
                    format: uuid
                    description: UUID dell'assegnazione del tag (non del tag stesso).
                  tag:
                    type: object
                    properties:
                      uuid:
                        type: string
                        format: uuid
                      name:
                        type: string
                      color:
                        type: string
                      description:
                        type: string
                        nullable: true
                      source:
                        type: string
                        enum:
                          - didit
                          - custom
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  added_by_email:
                    type: string
                    nullable: true
                  added_by_name:
                    type: string
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
            comments:
              type: array
              items:
                type: object
                properties:
                  uuid:
                    type: string
                    format: uuid
                  comment_type:
                    type: string
                    enum:
                      - COMMENT
                      - STATUS_CHANGED
                      - METADATA_UPDATED
                      - TAG_ADDED
                      - TAG_REMOVED
                      - PROFILE_UPDATED
                  comment:
                    type: string
                    nullable: true
                  actor_email:
                    type: string
                    nullable: true
                  actor_name:
                    type: string
                    nullable: true
                  previous_status:
                    type: string
                    nullable: true
                    enum:
                      - ACTIVE
                      - FLAGGED
                      - BLOCKED
                      - null
                  new_status:
                    type: string
                    nullable: true
                    enum:
                      - ACTIVE
                      - FLAGGED
                      - BLOCKED
                      - null
                  previous_value:
                    type: object
                    nullable: true
                    description: Valori precedenti dei campi per le voci PROFILE_UPDATED.
                  new_value:
                    type: object
                    nullable: true
                    description: Nuovi valori dei campi per le voci PROFILE_UPDATED.
                  changed_fields:
                    type: array
                    items:
                      type: string
                    description: Nomi dei campi modificati da una voce PROFILE_UPDATED.
                  metadata:
                    type: object
                    nullable: true
                  mentioned_emails:
                    type: array
                    items:
                      type: string
                  created_at:
                    type: string
                    format: date-time
              description: >-
                Registro delle attività e commenti per questo utente (modifiche
                di stato, modifiche al profilo, note manuali).
            updated_at:
              type: string
              format: date-time
    UserListItem:
      type: object
      description: Un utente verificato.
      properties:
        didit_internal_id:
          type: string
          format: uuid
          description: UUID interno stabile di Didit per questo utente.
        vendor_data:
          type: string
          nullable: true
          description: >-
            Il tuo identificatore univoco per questo utente (passato durante la
            creazione delle sessioni). Può essere null se non è stato fornito
            alcun identificatore del fornitore.
        display_name:
          type: string
          nullable: true
          description: Nome visualizzato personalizzato impostato da te
        full_name:
          type: string
          nullable: true
          description: Nome completo estratto dai documenti verificati
        date_of_birth:
          type: string
          format: date
          nullable: true
        effective_name:
          type: string
          nullable: true
          description: >-
            Miglior nome disponibile: display_name se impostato, altrimenti
            full_name
        status:
          type: string
          enum:
            - ACTIVE
            - FLAGGED
            - BLOCKED
          description: >-
            Stato del ciclo di vita del record utente (NON uno stato della
            sessione). `ACTIVE` è il valore predefinito, `FLAGGED` contrassegna
            l'utente per una verifica manuale, `BLOCKED` impedisce nuove
            sessioni per questo `vendor_data`.
        portrait_image_url:
          type: string
          nullable: true
          description: >-
            URL prefirmato della foto ritratto dell'utente (scade dopo alcune
            ore)
        session_count:
          type: integer
          description: Numero totale di sessioni di verifica per questo utente
        approved_count:
          type: integer
          description: Numero di sessioni approvate
        declined_count:
          type: integer
          description: Numero di sessioni rifiutate
        in_review_count:
          type: integer
          description: Numero di sessioni in revisione
        issuing_states:
          type: array
          items:
            type: string
          description: >-
            Codici ISO 3166-1 alpha-3 dei paesi di emissione rilevati nei
            documenti d'identità approvati di questo utente, ad es. `["USA",
            "ESP"]`. Array vuoto se assenti.
        approved_emails:
          type: array
          items:
            type: string
          description: >-
            Indirizzi email verificati raccolti dalle sessioni approvate di
            questo utente, ad es. `["john@example.com"]`.
        approved_phones:
          type: array
          items:
            type: string
          description: >-
            Numeri di telefono verificati raccolti dalle sessioni approvate di
            questo utente, ad es. `["+14155551234"]`.
        features:
          type: object
          description: >-
            Stato aggregato per funzionalità in tutte le sessioni di questo
            utente. Chiavi possibili: `ID_VERIFICATION`, `NFC`, `LIVENESS`,
            `FACE_MATCH`, `POA`, `QUESTIONNAIRE`, `EMAIL_VERIFICATION`, `PHONE`,
            `AML`, `IP_ANALYSIS`, `AGE_ESTIMATION`, `DATABASE_VALIDATION`.
            Valori possibili: `Approved`, `Declined`, `In Review`, `Not
            Finished`, `Resub Requested`.
        features_list:
          type: array
          items:
            type: object
            properties:
              feature:
                type: string
              status:
                type: string
          description: >-
            Gli stessi dati di `features`, sotto forma di array ordinato di
            oggetti `{feature, status}`.
        last_session_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp della sessione più recente
        first_session_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp della prima sessione
        last_activity_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Timestamp dell'attività più recente su questo utente (sessione,
            transazione, cambio di stato, modifica dei dati, ecc.).
        tags:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
          description: Tag assegnati a questo utente
        created_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        La chiave API della tua applicazione, da Developers -> API keys nella
        Business Console. La chiave primaria ha accesso completo. Una chiave con
        nome può avere un ambito definito: nessuno, lettura o scrittura per
        risorsa, limitata ad alcuni workflow o a sessioni approvate, a un elenco
        di indirizzi IP e a una data di scadenza. 401 indica che la chiave è
        errata, revocata o scaduta; 403 indica che non è stata inviata alcuna
        chiave, che la chiave non ha accesso a questa risorsa o azione, oppure
        che la richiesta proviene da un indirizzo non incluso nel suo elenco IP;
        404 su una route di sessione indica che la sessione non rientra nei
        workflow o negli stati previsti dalla chiave. Una chiave senza accesso
        ai media riceve gli URL di immagini, video e PDF come null, e una chiave
        senza permessi di scrittura sulle sessioni riceve link e token di
        sessione come null. Consulta https://docs.didit.me/console/api-keys.

````

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