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

> Diditのベンダーユーザーで変更可能なフィールド（表示名、メタデータ、タグ）を更新します。検証済みの本人情報フィールドは変更できません。API呼び出しごとの従量課金でユーザーを管理できます。



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



      
      

\<pre>

\`Goal: Partial-update a Didit User entity by vendor_data.

Endpoint: PATCH https://verification.didit.me/v3/users/{vendor_data}/
Auth header: x-api-key: <DIDIT_API_KEY>
Content-Type: application/json

Path param:
\- vendor_data (string, REQUIRED) — free-form string, NOT a UUID. URL-encode.

Request body (PARTIAL — only included fields are touched; auto-derived counters and session history are left alone):
\- full_name (string, max 512, nullable)
\- display_name (string, nullable)
\- date_of_birth (string YYYY-MM-DD, nullable)
\- status (enum) — "ACTIVE" | "FLAGGED" | "BLOCKED" (VendorUserStatusChoices). Setting "BLOCKED" auto-adds vendor_data to the system blocklist; flipping away removes it.
\- metadata (object, nullable) — REPLACES existing metadata wholesale; merge client-side if you only want to add keys.
\- approved_emails (object<string, boolean>)
\- approved_phones (object<string, boolean>)
\- issuing_states (object<ISO3, int>)
\- reason (string, optional, max 1000): why the status changed. Recorded as the comment of the STATUS_CHANGED entry in the user's activity (comments[].comment), only when this update actually changes status. Webhooks do not carry it.

curl:
curl -X PATCH 'https://verification.didit.me/v3/users/user-abc-123/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"display_name": "Jane S.", "status": "FLAGGED", "reason": "Address does not match the billing country"}'

Response 200: full updated UserDetailItem (same shape as GET). See /reference/data-models.

Side effects:
\- Writes to the user's comments activity log (actor derived from the API key): a STATUS_CHANGED entry with reason when status changes, and a PROFILE_UPDATED entry when display_name, full_name, date_of_birth or metadata change.
\- last_activity_at bumped to now().
\- Concurrent updates: last-write-wins per field.
\- Re-sending an unchanged body is safe (no extra audit row).

Failure modes:
\- 400 — validation. Examples:
\{ "status": ["Invalid status. Valid options are: ACTIVE, FLAGGED, BLOCKED"] }
\{ "metadata": ["Metadata must be a JSON object."] }
date_of_birth must be YYYY-MM-DD.
\{ "reason": ["Ensure this field has no more than 1000 characters."] }
\- 401 — missing/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 API key without users write. { "detail": "This API key has no write access to people." }
\- 404 — vendor_data not found. { "detail": "Not found." }
\- 429 — rate-limited.

Notes:
\- vendor_data in the URL itself cannot be changed via this endpoint — create new + delete old to rekey.
\- For status-only flips, prefer the dedicated PATCH /v3/users/{vendor_data}/update-status/.
\- Overriding fields populated by a verified session is allowed but flagged in the audit log.

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

\</pre>



      
      

貼り付け先

## 概要[ユーザーエンティティ](https://docs.didit.me/ja/entities/users/overview.md)の変更可能なフィールドを更新します。検証済みのユーザー認証（KYC）セッションから反映されるフィールド(`full_name`、`date_of_birth`、`portrait_image`、集計カウンター、`features`)は読み取り専用です。## 使用する場面- **独自のメタデータを更新する**: ユーザーのレベルを変更する、タグを変更する、社内用のメモを記録する。
- **名前を変更する**: コンソールの社内向け表示用に、よりわかりやすい`display_name`を設定する。
- **検証済みデータを上書きする**(注意が必要): 手動での上書きは可能ですが、監査証跡に記録されます。## 注意事項- URL内の`vendor_data`はこのエンドポイントでは変更できません。キーを変更する必要がある場合は、新しいユーザーを作成し、古いユーザーを削除してください。
- `changed_fields`配列を含む`user.data.updated`Webhookを送信するため、受信側は効率的に同期できます。
- ここでの`status`の変更は、[ユーザーステータスの更新](https://docs.didit.me/ja/management-api/users/update-status.md)と同様に動作します。
  変更はそのユーザーのアクティビティに記録され、任意の`reason`(最大1000文字)がコメントとして残ります。また、`BLOCKED`にすると`vendor_data`がシステムのブロックリストに追加されます。
  `user.status.updated`Webhookには`reason`は含まれません。
- 検証済みセッションが現在管理しているフィールドにPATCHリクエストを送信した場合、上書きは受け付けられますが、[監査ログ](https://docs.didit.me/ja/console/audit-logs.md)にフラグが付けられます。## 権限プライマリシークレットとフルアクセスの[APIキー](https://docs.didit.me/ja/console/api-keys.md)は、常にこのエンドポイントを呼び出せます。
カスタムアクセスのキーには、**People**(`users`)の書き込み権限が必要です。
一部のワークフローまたは承認済みセッションに限定されたキーは、このエンドポイントにアクセスできません。コンソールの[役割と権限](https://docs.didit.me/ja/console/roles-permissions.md)は、チームメンバーがコンソールで行える操作を決めるものです。
APIキーによるリクエストでは評価されません。## 関連項目- [ユーザー操作](https://docs.didit.me/ja/entities/users/operations.md)
- [データモデル](https://docs.didit.me/ja/entities/users/data-model.md)
- [ステータスの更新](https://docs.didit.me/ja/management-api/users/update-status.md)


## OpenAPI

````yaml ja/openapi-25.json PATCH /v3/users/{vendor_data}/
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/{vendor_data}/:
    patch:
      tags:
        - Users
      summary: ユーザーを更新
      description: >-
        ユーザーを部分更新します。対象は`display_name`、`full_name`、`date_of_birth`、`status`、`metadata`、`approved_emails`/`approved_phones`/`issuing_states`です。`metadata`は全体が置き換えられます。ここで`status`を変更すると[ユーザーステータスの更新](#patch-/v3/users/-vendor_data-/update-status/)と同様に動作します。任意の`reason`とともに`STATUS_CHANGED`アクティビティが記録され、`BLOCKED`にすると`vendor_data`がシステムのブロックリストに追加されます(`BLOCKED`から変更するとそのエントリーは削除されます)。`display_name`、`full_name`、`date_of_birth`、`metadata`の変更は`PROFILE_UPDATED`アクティビティとして記録されます。
      operationId: update_user
      parameters:
        - name: vendor_data
          in: path
          required: true
          schema:
            type: string
          description: ユーザーに対するお客様独自の識別子です（自由形式の文字列で、UUIDではありません）。
          example: user-abc-123
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                full_name:
                  type: string
                  nullable: true
                  maxLength: 512
                  description: ユーザーの氏名
                display_name:
                  type: string
                  nullable: true
                  description: このユーザーのカスタム表示名
                date_of_birth:
                  type: string
                  format: date
                  nullable: true
                  description: YYYY-MM-DD形式の生年月日
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - FLAGGED
                    - BLOCKED
                  description: >-
                    ユーザーのライフサイクルステータス。変更は`STATUS_CHANGED`アクティビティとして記録されます。`BLOCKED`にすると`vendor_data`がシステムのブロックリストに追加されます（`BLOCKED`から変更するとそのエントリは削除されます）。
                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: このユーザーの認証済み電話番号。保存されているリストを完全に置き換えます。
                issuing_states:
                  type: array
                  items:
                    type: string
                  description: '発行国 (ISO 3166-1 alpha-3)。例: `["USA"]`。保存されているリストを完全に置き換えます。'
                reason:
                  type: string
                  nullable: true
                  maxLength: 1000
                  description: >-
                    ステータスが変更された理由。ユーザーのアクティビティ（`comments[].comment`、およびBusiness
                    Consoleの**Activity**）にあるステータス変更エントリに記録されます。記録されるのは、ステータスが実際に変わった場合のみです。Webhookには含まれません。
            examples:
              Rename:
                summary: 表示名を設定
                value:
                  display_name: Jane S.
              Override status:
                summary: ユーザーにレビュー用のフラグを付ける
                value:
                  status: FLAGGED
              Add metadata:
                summary: メタデータJSONを置き換え
                value:
                  metadata:
                    tier: premium
                    risk_level: low
              Fix extracted DOB:
                summary: 抽出されたプロフィールフィールドを修正
                value:
                  full_name: Jane Elizabeth Smith
                  date_of_birth: '1985-11-22'
              Flag with reason:
                summary: ユーザーにフラグを付け、理由を記録する
                value:
                  status: FLAGGED
                  reason: Address does not match the billing country
      responses:
        '200':
          description: ユーザーが更新されました。更新後のユーザーの完全なレコード（Get Userと同じ形式）が返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDetailItem'
              examples:
                Updated:
                  value:
                    didit_internal_id: f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418
                    vendor_data: user-abc-123
                    display_name: Jane S.
                    full_name: Jane Elizabeth Smith
                    date_of_birth: '1985-11-22'
                    effective_name: Jane S.
                    status: FLAGGED
                    metadata:
                      tier: premium
                    portrait_image_url: https://<media-host>/...
                    session_count: 3
                    approved_count: 2
                    declined_count: 0
                    in_review_count: 1
                    issuing_states:
                      - USA
                    approved_emails:
                      - john@example.com
                    approved_phones:
                      - '+14155551234'
                    features:
                      ID_VERIFICATION: Approved
                      LIVENESS: Approved
                      FACE_MATCH: Approved
                      AML: Approved
                    features_list:
                      - feature: ID_VERIFICATION
                        status: Approved
                      - feature: LIVENESS
                        status: Approved
                      - feature: FACE_MATCH
                        status: Approved
                      - feature: AML
                        status: Approved
                    last_session_at: '2025-06-15T10:30:00Z'
                    last_activity_at: '2025-06-15T10:30:00Z'
                    first_session_at: '2025-06-01T08:00:00Z'
                    tags:
                      - uuid: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
                        tag:
                          uuid: e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b
                          name: VIP
                          color: '#2567FF'
                          description: null
                          source: custom
                          created_at: '2025-05-01T09:00:00Z'
                          updated_at: '2025-05-01T09:00:00Z'
                        added_by_email: analyst@acme.com
                        added_by_name: Jane Analyst
                        created_at: '2025-06-02T11:00:00Z'
                    comments: []
                    created_at: '2025-06-01T08:00:00Z'
                    updated_at: '2025-06-15T10:30:00Z'
        '400':
          description: 無効なリクエストボディ。主な原因は、不明な`status`、または`YYYY-MM-DD`形式でない`date_of_birth`です。
          content:
            application/json:
              examples:
                Bad status:
                  value:
                    status:
                      - '"INVALID" is not a valid choice.'
                Bad date_of_birth:
                  value:
                    date_of_birth:
                      - >-
                        Date has wrong format. Use one of these formats instead:
                        YYYY-MM-DD.
                Reason too long:
                  value:
                    reason:
                      - Ensure this field has no more than 1000 characters.
        '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: >-
            このキーではこのアプリケーションのユーザーを更新できません。キーがない場合は`403`を返し、誤った、失効した、または期限切れのキーの場合は`401`を返します。
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: 指定された`vendor_data`のユーザーがこのアプリケーションに存在しません。
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Not found.
        '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 PATCH 'https://verification.didit.me/v3/users/user-abc-123/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"display_name": "Jane S.", "status": "FLAGGED"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.users.update(
                "user-abc-123",
                display_name="Jane S.",
            )
            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.update("user-abc-123", {
              display_name: "Jane S.",
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.Update(ctx, \"user-abc-123\", didit.UsersUpdateParams{\n\tDisplayName: didit.String(\"Jane S.\"),\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.UsersUpdateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result = client.users().update("user-abc-123",
            UsersUpdateParams.builder()
                    .displayName("Jane S.")
                    .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->update('user-abc-123', [
                'display_name' => 'Jane S.',
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.users.update(
              "user-abc-123",
              display_name: "Jane S."
            )
            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.UpdateAsync("user-abc-123", new
            UsersUpdateParams

            {
                DisplayName = "Jane S.",
            });

            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.