> ## 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：ベンダーのユーザーエンティティ

> KYCセッションの実行前に、Diditのベンダーのユーザーエンティティを事前に作成できます。外部データベースからの一括オンボーディングや、取引モニタリング用のユーザー登録に対応します。



ユーザー作成プロンプト
        プロンプトをクリップボードにコピー



      
      

\<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>



      
      

貼り付け先

## 概要セッションを実行する前に、[Userエンティティ](https://docs.didit.me/ja/entities/users/overview.md)を明示的に作成します。
返されるエンティティは、別途指定しない限り`ACTIVE`ステータスになります。
オプションで、同じ呼び出しで本人に認証リンクをメール送信することもできます([認証リンクを送信する](#認証リンクを送信する)を参照)。## 利用する場面- **メタデータの事前登録**(レベル、登録経路、社内タグ)を、顧客が認証を行う前に行う場合。
- **他ベンダーからの移行**: 既存のユーザー一覧をDiditで再作成し、履歴と分析を既知の基準から開始する場合。
- **信頼済みのプロフィール用顔画像のインポート**: まずUserを作成し、返された`didit_internal_id`を使って[ユーザー顔画像のアップロード](https://docs.didit.me/ja/management-api/users/upload-face.md)を呼び出します。
- **取引のみのユースケース**: `vendor_data`を指定してUserを登録し、ユーザー認証(KYC)セッションを一度も実行せずに取引を送信できるようにする場合。
- **認証への招待**: 1回の呼び出しで本人を作成し、認証リンクをメールで送信する場合。## 連絡先情報プロフィールフィールドとあわせて、本人の連絡先情報を送信できます。
`full_name`を送信しない場合、`first_name`と`last_name`がスペースで連結されて`full_name`になります。
`email`と`phone_number`は`metadata.contact`に、`country`は`metadata.address`に保存されます。
`country`にはISO 3166コード(alpha-2またはalpha-3、`ES`または`ESP`)を指定でき、指定した値は大文字に変換されて保存されます。送信する`metadata`にJSONオブジェクトではない`contact`または`address`の値がすでに含まれている場合、Diditはそれを上書きせず、該当する連絡先フィールドに対して`400`を返します。## 認証リンクを送信する同じ呼び出しで本人に認証を依頼するには、`send_verification_link`を`true`に設定します。
Diditは`workflow_id`のワークフローで本人の認証セッションを作成し、`email`宛てにリンクをメール送信します。
メールの[言語](https://docs.didit.me/ja/integration/supported-languages.md)は`language`で選択します。省略した場合は英語になります。```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`と`workflow_id`が必須で、ワークフローは個人を認証するものでなければなりません。法人確認 (KYB)ワークフローを指定すると`400`が返されます。
- セッションには[セッションの作成](https://docs.didit.me/ja/sessions-api/create-session.md)と同じチェックが適用されます。
  `vendor_data`がブロックリストに登録されている場合やクレジットが不足している場合は`400`が返されます。
- 本人とセッションは一緒に作成されるか、どちらも作成されないかのいずれかです。
  いずれかのチェックに失敗した場合、何も書き込まれず、メールも送信されません。
- レスポンスには`verification_link`が含まれ、セッションの`session_id`、`session_number`、`status`、`url`、`workflow_id`、および送信先の`email`が入ります。
  リンクを送信しない場合、`verification_link`は`null`です。## 注意事項- `vendor_data`は必須で、アプリケーションごとに一意でなければなりません。重複して作成しようとすると競合エラーが返されます。既存のユーザーを更新するには[`PATCH /v3/users/{vendor_data}/`](https://docs.didit.me/ja/management-api/users/update)を使用してください。
- `vendor_data`には2000バイト(UTF-8エンコード)の厳格な上限があります。上限を超える値は受け付けられず、400バリデーションエラーが返されます。
- 通常は認証済みセッションから導出されるフィールド(`full_name`、`date_of_birth`)はここで事前登録できますが、最初に承認済みとなったユーザー認証(KYC)セッションによって**上書き**される場合があります。
- このエンドポイントは顔画像を受け付けません。信頼できるインポート済みの顔画像を紐付けるには、このエンドポイントが`didit_internal_id`を返した後に[`POST /v3/organization/{organization_id}/application/{application_id}/vendor-users/by-id/{didit_internal_id}/faces/upload/`](https://docs.didit.me/ja/management-api/users/upload-face)を使用してください。
- 作成自体ではWebhookは送信されません。その後のユーザーに対する変更では`user.data.updated`または`user.status.updated`が送信されます。
- `send_verification_link`を指定した場合、新しいセッションが同じリクエスト内でユーザーを更新するため、`user.data.updated`が送信されます。## 権限プライマリシークレットとフルアクセスの[APIキー](https://docs.didit.me/ja/console/api-keys.md)は、常にこのエンドポイントを呼び出せます。
カスタムアクセスのキーには、**People**(`users`)の書き込み権限が必要です。
`send_verification_link: true`を指定する場合は、呼び出しがセッションを作成してそのリンクを発行するため、**Sessions**の書き込み権限も必要です。
この権限がない場合、呼び出しは`This API key has no write access to sessions.`とともに`403`を返し、何も書き込まれません。
一部のワークフローまたは承認済みセッションに限定されたキーは、このエンドポイントにアクセスできません。Consoleの[役割と権限](https://docs.didit.me/ja/console/roles-permissions.md)は、チームメンバーがConsoleで実行できる操作を決定するものです。
APIキーによるリクエストでは評価されません。## 関連項目- [ユーザーデータモデル](https://docs.didit.me/ja/entities/users/data-model.md)
- [ユーザーの顔画像をアップロード](https://docs.didit.me/ja/management-api/users/upload-face.md)
- [ベンダーデータの紐付け](https://docs.didit.me/ja/entities/vendor-data-linking.md)
- [ユーザー操作](https://docs.didit.me/ja/entities/users/operations.md)


## OpenAPI

````yaml ja/openapi-25.json POST /v3/users/create/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 本人確認API。x-api-keyヘッダーで認証します。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/users/create/:
    post:
      tags:
        - Users
      summary: ユーザーを作成
      description: >-
        `vendor_data`を指定して[ユーザー](/entities/users)を作成します。認証セッションの前でも、認証セッションなしでも作成できます。`vendor_data`はアプリケーションのユーザー間で一意である必要があります（重複すると`400`が返されます）。冪等ではありません。


        **連絡先情報:**
        `email`と`phone_number`は`metadata.contact`に、`country`は`metadata.address`に保存されます。`full_name`なしで`first_name`または`last_name`を送信すると、Diditはそれらを結合して`full_name`にします。


        **認証リンク:** `send_verification_link:
        true`を指定すると、Diditは`workflow_id`でその人物の認証セッションも作成し、`email`宛てにリンクをメールで送信します。このセッションでは、ブロックリストやクレジット残高など、[Create
        Session](/ja/sessions-api/create-session)と同じチェックが実行されます。人物とセッションは両方とも作成されるか、どちらも作成されないかのいずれかです。いずれかのチェックに失敗した場合、何も書き込まれず、メールも送信されません。レスポンスの`verification_link`はセッションの内容を表し、リンクを要求しない場合は`null`になります。


        **APIキーのアクセス:**
        スコープ付きAPIキーには`users`の書き込み権限が必要です。`send_verification_link:
        true`の場合は`sessions`の書き込み権限も必要で、ない場合は何も書き込まれる前に`403`が返されます。フルアクセスキーには影響しません。[APIキー](/ja/console/api-keys)を参照してください。
      operationId: create_user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - vendor_data
              properties:
                vendor_data:
                  type: string
                  description: >-
                    このユーザーに対するお客様独自の識別子です（自由形式の文字列で、UUIDではありません）。アプリケーションのユーザーの間で一意である必要があり、送信されたとおりに完全一致で照合されます。
                full_name:
                  type: string
                  nullable: true
                  maxLength: 512
                  description: ユーザーの法的な氏名。
                display_name:
                  type: string
                  nullable: true
                  description: コンソールに表示されるわかりやすい表示名（UI表示では`full_name`より優先されます）。
                  maxLength: 255
                date_of_birth:
                  type: string
                  format: date
                  nullable: true
                  description: '`YYYY-MM-DD`形式の生年月日。'
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - FLAGGED
                    - BLOCKED
                  default: ACTIVE
                  description: 初期のライフサイクルステータス。デフォルトは`ACTIVE`です。
                metadata:
                  type: object
                  nullable: true
                  description: ユーザーに付与する任意のJSONオブジェクト。デフォルトは`{}`です。
                approved_emails:
                  type: array
                  items:
                    type: string
                  description: 'このユーザーについて事前に信頼済みとするメールアドレス。例: `["john@example.com"]`。'
                approved_phones:
                  type: array
                  items:
                    type: string
                  description: 'このユーザーについて事前に信頼済みとする電話番号。例: `["+14155551234"]`。'
                issuing_states:
                  type: array
                  items:
                    type: string
                  description: '事前登録された発行国（ISO 3166-1 alpha-3）。例: `["USA"]`。'
                first_name:
                  type: string
                  maxLength: 255
                  description: >-
                    名。`full_name`が送信されない場合、Diditは`first_name`と`last_name`をスペースで結合して`full_name`にします。個別のフィールドとしては返されません。
                last_name:
                  type: string
                  maxLength: 255
                  description: >-
                    姓。`full_name`が送信されない場合、`first_name`と結合して`full_name`になります。個別のフィールドとしては返されません。
                email:
                  type: string
                  format: email
                  description: >-
                    連絡先メールアドレス。`metadata.contact.email`に保存されます（`metadata.contact`内で送信した`email`は置き換えられます）。`send_verification_link`が`true`の場合は必須で、リンクはこのアドレスに送信されます。`metadata.contact`がJSONオブジェクトでない場合、このフィールドについて`400`が返されます。
                phone_number:
                  type: string
                  maxLength: 32
                  description: >-
                    連絡先電話番号。`metadata.contact.phone_number`に保存されます。`metadata.contact`がJSONオブジェクトでない場合、このフィールドについて`400`が返されます。
                country:
                  type: string
                  maxLength: 3
                  description: >-
                    ISO
                    3166コード(alpha-2またはalpha-3)で指定する国(`ES`または`ESP`)。大文字に変換されて`metadata.address.country`に保存されます。`metadata.address`がJSONオブジェクトでない場合、このフィールドについて`400`が返されます。
                send_verification_link:
                  type: boolean
                  default: false
                  description: >-
                    `true`の場合、Diditは`workflow_id`のワークフローでその人物の認証セッションを作成し、`email`宛てにリンクをメールで送信します。`email`と`workflow_id`が必須です。スコープ付きAPIキーの場合は、`sessions`の書き込み権限も必要です。
                workflow_id:
                  type: string
                  format: uuid
                  description: >-
                    検証セッションのワークフロー。`send_verification_link`が`true`の場合は必須です。個人を検証するワークフローである必要があり、法人確認
                    (KYB)のワークフローは拒否されます。それ以外の場合は無視されます。
                language:
                  type: string
                  maxLength: 10
                  description: >-
                    認証メールの言語。[対応言語](/ja/integration/supported-languages)のコードで指定します。省略した場合は英語です。`send_verification_link`が`true`でない場合は無視されます。
            examples:
              Basic:
                summary: 基本情報で作成
                value:
                  vendor_data: user-abc-123
                  full_name: John Doe
              Full:
                summary: すべてのフィールド
                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: 氏名、メールアドレス、電話番号、国
                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: 人物を作成し、認証リンクをメールで送信する
                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: >-
            ユーザーが作成されました。ユーザーの完全なレコード（Get
            Userと同じ形式）に加えて、`verification_link`を返します。これは`send_verification_link`が`true`の場合にDiditがメールで送信した認証セッションで、それ以外の場合は`null`です。
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/UserDetailItem'
                  - type: object
                    required:
                      - verification_link
                    properties:
                      verification_link:
                        type: object
                        nullable: true
                        description: >-
                          Diditが作成し、本人にメールで送信した認証セッション。常に含まれます。`send_verification_link`が`true`でなかった場合は`null`です。
                        required:
                          - session_id
                          - session_number
                          - status
                          - url
                          - workflow_id
                          - email
                        properties:
                          session_id:
                            type: string
                            format: uuid
                            description: 認証セッションのID。
                          session_number:
                            type: integer
                            description: アプリケーション内でのセッションの連番。
                          status:
                            type: string
                            description: セッションのステータスです。作成直後のセッションでは`Not Started`です。
                          url:
                            type: string
                            format: uri
                            description: Diditが本人にメールで送信した認証リンク。
                          workflow_id:
                            type: string
                            format: uuid
                            nullable: true
                            description: セッションで実行されるワークフロー。
                          email:
                            type: string
                            format: email
                            description: リンクの送信先アドレス。
              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: >-
            リクエストボディが無効です。エラーはフィールドごとに返されます。主な原因は、`vendor_data`の重複、必須フィールドの欠落、不正な形式の値です。`send_verification_link:
            true`の場合は、`email`または`workflow_id`の欠落、不明なワークフローまたは法人確認 (KYB)
            のワークフロー、サポートされていない`language`
            (キーは`contact_details.email_lang`)、ブロックリストに登録された`vendor_data`、セッションを開始するためのクレジット不足も原因となります。何も書き込まれません。
          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: >-
            認証情報が指定されていません。`x-api-key`ヘッダー（または`Authorization:
            Bearer`トークン）なしの`/v3/users/*`パスへのリクエストは、APIに到達する前に認証ミドルウェアによって拒否されます。
          content:
            application/json:
              examples:
                Missing credentials:
                  value:
                    detail: >-
                      You must be authenticated with a valid access token to
                      access this endpoint.
        '403':
          description: >-
            APIキーが無効であるか取り消されている、またはこのキーではこのアプリケーションのユーザーを作成できません。スコープ付きAPIキーには`users`の書き込み権限が必要で、`send_verification_link`が`true`の場合は`sessions`の書き込み権限も必要です。何も書き込まれません。キーがない場合は`403`、誤ったキー、取り消されたキー、期限切れのキーの場合は`401`が返されます。
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
                No sessions write:
                  summary: スコープ付きキーがsessionsの書き込み権限なしで認証リンクを要求
                  value:
                    detail: This API key has no write access to sessions.
        '429':
          description: レート制限を超過しました。間隔を空け、`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: ユーザーの完全な詳細。UserListItemを拡張し、メタデータ、コメント、updated_atを追加します。
      allOf:
        - $ref: '#/components/schemas/UserListItem'
        - type: object
          properties:
            metadata:
              type: object
              description: このユーザーに付加したカスタムメタデータJSON。デフォルトは`{}`です。
            tags:
              type: array
              description: >-
                タグの割り当て。注意: 詳細レスポンスでは、各エントリはタグの*リンク*オブジェクト(`{uuid, tag: {...},
                added_by_email, added_by_name,
                created_at}`)であり、一覧レスポンスで使われるフラットな`{uuid, name,
                color}`形式とは異なります。
              items:
                type: object
                properties:
                  uuid:
                    type: string
                    format: uuid
                    description: タグ割り当てのUUID(タグ自体のUUIDではありません)。
                  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: PROFILE_UPDATEDエントリの変更前のフィールド値。
                  new_value:
                    type: object
                    nullable: true
                    description: PROFILE_UPDATEDエントリーの新しいフィールド値。
                  changed_fields:
                    type: array
                    items:
                      type: string
                    description: PROFILE_UPDATEDエントリによって変更されたフィールドの名前。
                  metadata:
                    type: object
                    nullable: true
                  mentioned_emails:
                    type: array
                    items:
                      type: string
                  created_at:
                    type: string
                    format: date-time
              description: このユーザーのアクティビティログとコメント（ステータスの変更、プロフィールの編集、手動メモ）。
            updated_at:
              type: string
              format: date-time
    UserListItem:
      type: object
      description: 認証済みのユーザー。
      properties:
        didit_internal_id:
          type: string
          format: uuid
          description: このユーザーに対するDiditの安定した内部UUIDです。
        vendor_data:
          type: string
          nullable: true
          description: >-
            このユーザーに対するお客様独自の識別子です（セッション作成時に渡されたもの）。ベンダー識別子が指定されなかった場合はnullになることがあります。
        display_name:
          type: string
          nullable: true
          description: お客様が設定したカスタム表示名
        full_name:
          type: string
          nullable: true
          description: 認証済みの書類から抽出された氏名
        date_of_birth:
          type: string
          format: date
          nullable: true
        effective_name:
          type: string
          nullable: true
          description: 利用可能な最適な名前：display_nameが設定されていればそれを、設定されていなければfull_nameを使用
        status:
          type: string
          enum:
            - ACTIVE
            - FLAGGED
            - BLOCKED
          description: >-
            ユーザーレコードのライフサイクルステータス（セッションのステータスではありません）。`ACTIVE`がデフォルトで、`FLAGGED`はユーザーを手動での確認対象としてマークし、`BLOCKED`はこの`vendor_data`での新規セッションを禁止します。
        portrait_image_url:
          type: string
          nullable: true
          description: ユーザーの顔写真の署名付きURL（数時間後に期限切れ）
        session_count:
          type: integer
          description: このユーザーの認証セッションの総数
        approved_count:
          type: integer
          description: 承認済みセッションの数
        declined_count:
          type: integer
          description: 却下されたセッションの数
        in_review_count:
          type: integer
          description: レビュー中のセッション数
        issuing_states:
          type: array
          items:
            type: string
          description: >-
            このユーザーの承認済み身分証明書類で確認された発行国のISO 3166-1 alpha-3コード。例: `["USA",
            "ESP"]`。該当がない場合は空の配列です。
        approved_emails:
          type: array
          items:
            type: string
          description: 'このユーザーの承認済みセッションから収集された認証済みメールアドレス。例: `["john@example.com"]`。'
        approved_phones:
          type: array
          items:
            type: string
          description: 'このユーザーの承認済みセッションから収集された認証済み電話番号。例: `["+14155551234"]`。'
        features:
          type: object
          description: >-
            このユーザーのすべてのセッションを通じた、機能ごとの集計ステータスです。取り得るキーは`ID_VERIFICATION`、`NFC`、`LIVENESS`、`FACE_MATCH`、`POA`、`QUESTIONNAIRE`、`EMAIL_VERIFICATION`、`PHONE`、`AML`、`IP_ANALYSIS`、`AGE_ESTIMATION`、`DATABASE_VALIDATION`です。取り得る値は`Approved`、`Declined`、`In
            Review`、`Not Finished`、`Resub Requested`です。
        features_list:
          type: array
          items:
            type: object
            properties:
              feature:
                type: string
              status:
                type: string
          description: '`features`と同じデータを、`{feature, status}`オブジェクトの順序付き配列で表したもの。'
        last_session_at:
          type: string
          format: date-time
          nullable: true
          description: 直近のセッションの日時
        first_session_at:
          type: string
          format: date-time
          nullable: true
          description: 最初のセッションの日時
        last_activity_at:
          type: string
          format: date-time
          nullable: true
          description: このユーザーの直近のアクティビティ(セッション、取引、ステータス変更、データ編集など)の日時。
        tags:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
          description: このユーザーに割り当てられたタグ
        created_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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