> ## 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のベンダーユーザーをブロック、フラグ付け、有効化できます。ステータスは今後のKYCセッションと取引スクリーニングに反映されます。呼び出しごとの従量課金でユーザーを管理できます。



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



      
      

\<pre>

\`Goal: Flip ONLY the lifecycle status of a Didit User entity. Use the full PATCH /v3/users/{vendor_data}/ when you also need to touch other fields.

Endpoint: PATCH https://verification.didit.me/v3/users/{vendor_data}/update-status/
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:
\- status (enum, REQUIRED) — "ACTIVE" | "FLAGGED" | "BLOCKED" (VendorUserStatusChoices, NOT the session enum).
\- 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 the status actually changes. Webhooks do not carry it.

Status semantics:
\- ACTIVE  → normal. New sessions allowed for this vendor_data.
\- FLAGGED → still accepted, highlighted in Console for manual review; filterable with ?status=FLAGGED.
\- BLOCKED → terminal. Adds vendor_data to the system blocklist. Subsequent session creations for the same identifier are rejected with a blocklist hit. Flipping back to ACTIVE/FLAGGED removes the blocklist entry automatically.

curl:
curl -X PATCH 'https://verification.didit.me/v3/users/user-abc-123/update-status/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"status": "BLOCKED", "reason": "Chargeback fraud pattern confirmed"}'

Response 200: full updated UserDetailItem (same shape as GET /v3/users/{vendor_data}/). See /reference/data-models.

Side effects:
\- Toggles the system blocklist entry when entering/leaving BLOCKED.
\- Writes one STATUS_CHANGED entry to the user's comments activity log (actor = API key identity), with reason as its comment.
\- Idempotent — re-sending the same status is a no-op (no extra audit row, no extra blocklist toggle).

Failure modes:
\- 400 — validation:
\{ "status": "This field is required." }
\{ "status": "Invalid status. Valid options are: ACTIVE, FLAGGED, BLOCKED" }
\{ "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 (or deleted). { "detail": "Not found." }
\- 429 — rate-limited.

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`、`FLAGGED`、`BLOCKED`の間で変更します。状態遷移の全体像は[エンティティのライフサイクル](https://docs.didit.me/ja/entities/lifecycle.md)を参照してください。## 使用する場面- 不正やコンプライアンス違反を確認した後に**ユーザーをブロック**する。
- 完全にブロックせず、手動レビューの結果が出るまで**ユーザーにフラグを付ける**。
- 是正措置が完了した後にユーザーの**ブロックを解除**する。
- **外部シグナルを反映する**。たとえば、自社の不正検知エンジンがユーザーにしきい値を超えるスコアを付けた場合に、このエンドポイントでそのユーザーのステータスを`FLAGGED`に変更します。## 注意事項- 有効な値は`ACTIVE`、`FLAGGED`、`BLOCKED`です。無効な値を指定すると400が返されます。
- ステータスを変更した理由を記録するには、任意の`reason`(最大1000文字)を渡します。
  Diditはこれを、そのユーザーのアクティビティにおけるステータス変更エントリーのコメントとして保持します。ユーザーの`comments[].comment`およびBusiness Consoleの**Activity**に記録されます。
  記録されるのは、ステータスが実際に変更された場合のみです。
- `BLOCKED`のユーザーについては、新規セッションはすべて自動的に却下され、新規取引もすべて自動的に却下されます。
- `previous_status`と`status`を含む`user.status.updated` Webhookを送信します。
  このWebhookには`reason`は含まれません。## 適用| ステータス | 新規セッションへの影響 | 新規取引への影響 |
| - | - | - |
| `ACTIVE` | 通常のフロー | 通常のフロー |
| `FLAGGED` | 許可されるが`IN_REVIEW`に振り分けられる | 許可される。ルールによっては自動的にエスカレーションされる場合がある |
| `BLOCKED` | 自動的に却下 | 自動的に却下 |## 権限プライマリシークレットとフルアクセスの[APIキー](https://docs.didit.me/ja/console/api-keys.md)は、常にこのエンドポイントを呼び出せます。
カスタムアクセスのキーには、**People**(`users`)の書き込み権限が必要です。
一部のワークフローまたは承認済みセッションに限定されたキーは、このエンドポイントにアクセスできません。Consoleの[役割と権限](https://docs.didit.me/ja/console/roles-permissions.md)は、チームメンバーがConsoleで実行できる操作を決定します。
これらはAPIキーによるリクエストでは評価されません。## 関連項目- [エンティティのライフサイクル](https://docs.didit.me/ja/entities/lifecycle.md)
- [ユーザーブロックリスト](https://docs.didit.me/ja/entities/users/blocklist.md)
- [エンティティのWebhook](https://docs.didit.me/ja/entities/webhooks.md)


## OpenAPI

````yaml ja/openapi-25.json PATCH /v3/users/{vendor_data}/update-status/
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}/update-status/:
    patch:
      tags:
        - Users
      summary: ユーザーステータスを更新
      description: >-
        ユーザーのライフサイクル`status`のみを切り替えます：`ACTIVE`、`FLAGGED`、`BLOCKED`のいずれかです（セッションのステータスではありません）。`BLOCKED`にすると`vendor_data`がシステムのブロックリストに追加され、`BLOCKED`から別のステータスに変更するとそのエントリーは削除されます。各変更はユーザーの`STATUS_CHANGED`アクティビティとして記録され、任意の`reason`はその`comment`になります。現在と同じステータスを送信しても何も変更されず、`reason`も記録されません。`user.status.updated`のWebhookには`reason`は含まれません。
      operationId: update_user_status
      parameters:
        - name: vendor_data
          in: path
          required: true
          schema:
            type: string
          description: ユーザーに対するお客様独自の識別子です。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/EntityStatusUpdateRequest'
                - type: object
                  properties:
                    reason:
                      type: string
                      nullable: true
                      maxLength: 1000
                      description: >-
                        ステータスが変更された理由。ユーザーのアクティビティ（`comments[].comment`、およびBusiness
                        Consoleの**Activity**）にあるステータス変更エントリに記録されます。記録されるのは、ステータスが実際に変わった場合のみです。Webhookには含まれません。
            examples:
              Activate:
                summary: ユーザーを再有効化する
                value:
                  status: ACTIVE
              Flag:
                summary: ユーザーにレビュー用のフラグを付ける
                value:
                  status: FLAGGED
              Block:
                summary: ユーザーをブロックします（システムのブロックリストに追加）
                value:
                  status: BLOCKED
              Block with reason:
                summary: ユーザーをブロックし、その理由を記録します
                value:
                  status: BLOCKED
                  reason: Chargeback fraud pattern confirmed
      responses:
        '200':
          description: ユーザーステータスが更新されました。ユーザーの完全なレコードが返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDetailItem'
              examples:
                Blocked:
                  value:
                    didit_internal_id: f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418
                    vendor_data: user-abc-123
                    display_name: null
                    full_name: John Michael Doe
                    date_of_birth: '1990-05-15'
                    effective_name: John Michael Doe
                    status: BLOCKED
                    metadata:
                      tier: premium
                      source: website
                    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:
                      - uuid: c1111111-2222-4333-8444-555555555555
                        comment_type: STATUS_CHANGED
                        comment: Chargeback fraud pattern confirmed
                        actor_email: null
                        actor_name: null
                        previous_status: ACTIVE
                        new_status: BLOCKED
                        previous_value: null
                        new_value: null
                        changed_fields: []
                        metadata: null
                        mentioned_emails: []
                        created_at: '2025-06-15T10:30:00Z'
                    created_at: '2025-06-01T08:00:00Z'
                    updated_at: '2025-06-15T10:30:00Z'
        '400':
          description: '`status`がないか無効です。または、`reason`が1000文字を超えています。'
          content:
            application/json:
              examples:
                Missing status:
                  value:
                    status:
                      - This field is required.
                Bad status:
                  value:
                    status:
                      - >-
                        Invalid status. Valid options are: ACTIVE, FLAGGED,
                        BLOCKED
                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/update-status/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"status": "BLOCKED"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.users.update_status(
                "user-123",
                status="ACTIVE",
            )
            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.updateStatus("user-123", {
              status: "ACTIVE",
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.UpdateStatus(ctx, \"user-123\", didit.UsersUpdateStatusParams{\n\tStatus: \"ACTIVE\",\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.EntityStatusUpdateRequest;

            import me.didit.types.UsersUpdateStatusParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result = client.users().updateStatus("user-123",
            UsersUpdateStatusParams.builder()
                    .status(EntityStatusUpdateRequest.Status.of("ACTIVE"))
                    .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->updateStatus('user-123', [
                'status' => 'ACTIVE',
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.users.update_status(
              "user-123",
              status: "ACTIVE"
            )
            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.UpdateStatusAsync("user-123", new
            UsersUpdateStatusParams

            {
                Status = "ACTIVE",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    EntityStatusUpdateRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - ACTIVE
            - FLAGGED
            - BLOCKED
          description: 新しいライフサイクルステータス。`BLOCKED`を指定すると、`vendor_data`もシステムのブロックリストに追加されます。
    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.