> ## 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 की POST /v3/blocklist/add/ से सत्र का चेहरा, दस्तावेज़, फ़ोन नंबर या ईमेल ब्लॉकलिस्ट करें, ताकि मिलते-जुलते नए सत्र अस्वीकृत हों।



ब्लॉकलिस्ट में जोड़ें API प्रॉम्प्ट
        प्रॉम्प्ट को क्लिपबोर्ड पर कॉपी करें



      
      

\<pre>

\`Blocklist the face, document, phone number or email address of one of my Didit verification sessions through the Management API.

Endpoint:
POST https://verification.didit.me/v3/blocklist/add/

Authentication:
Use the x-api-key header with my Didit API key. A scoped API key needs workflows: write.

Goal:
\- After reviewing a fraudulent session, block what it collected so the same person is declined next time.

Request body (application/json):
\{
"session_id": "33333333-4444-5555-6666-777777777777", // required: a verification session of my application
"blocklist_face": true,       // optional, default false
"blocklist_document": true,   // optional, default false
"blocklist_phone": false,     // optional, default false
"blocklist_email": false      // optional, default false
}
At least one blocklist_* flag must be true.

Behavior:
\- Didit uses the session's most recent record of each selected type.
\- Each selected record is flagged as blocklisted and gets an entry, linked to the session, in the matching system blocklist (added_by "api").
\- From then on, new sessions with a matching face, document number, phone number or email address are declined.
\- The session itself and sessions that already finished are not changed.
\- Safe to repeat: an item already listed keeps its single entry, and its blocklisted_at is refreshed.
\- All or nothing: Didit checks every selected item first. If one is missing, nothing is blocklisted.
\- A document needs its issuing state, document type, document number and full name.

Example call:
curl -X POST "https://verification.didit.me/v3/blocklist/add/" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"session_id": "33333333-4444-5555-6666-777777777777", "blocklist_face": true, "blocklist_document": true}'

Example response (200):
\{ "message": "Successfully updated blocklist." }

Failure modes:
\- 400: session_id is missing ({ "session_id": ["This field is required."] }) or not a UUID ({ "session_id": ["Must be a valid UUID."] }); the session is not a verification session of this application ({ "non_field_errors": ["Session not found"] }; business verification sessions are not accepted); no flag is true ({ "non_field_errors": ["Must specify at least one item to blocklist"] }); the session has no record of a selected type ({ "non_field_errors": ["Session does not have a face record"] }); or the document lacks a required field.
\- 401: the API key has expired.
\- 403: missing x-api-key (a wrong, revoked or expired key gets 401) ({ "detail": "You do not have permission to perform this action." }), or a scoped key without workflows: write.
\- 429: rate limited (see /integration/rate-limiting); back off and retry.

Side effects:
\- Writes entries to the system face, document, phone and email blocklists and blocks matching new sessions.

To block a value without a session, or an IP address, device fingerprint, user or business, use POST /v3/lists/{list_uuid}/entries/ on the matching system blocklist instead.

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

यहाँ पेस्ट करें

एक सत्यापन सत्र द्वारा एकत्र किए गए डेटा को ब्लॉकलिस्ट करें: उसका चेहरा, पहचान दस्तावेज़, फ़ोन नंबर या ईमेल पता। Didit चयनित प्रत्येक रिकॉर्ड को ब्लॉकलिस्ट के रूप में चिह्नित करता है और उसे सत्र से संबद्ध संबंधित सिस्टम ब्लॉकलिस्ट में जोड़ देता है। इसके बाद मिलते-जुलते चेहरे, दस्तावेज़ संख्या, फ़ोन नंबर या ईमेल पते वाले नए सत्र अस्वीकृत कर दिए जाते हैं।> [!NOTE]
>
> यह कॉल ऑल-ऑर-नथिंग के सिद्धांत पर काम करती है: यदि सत्र में चयनित प्रकार का कोई रिकॉर्ड नहीं है, या दस्तावेज़ में जारीकर्ता राज्य, दस्तावेज़ प्रकार, दस्तावेज़ संख्या या पूरा नाम नहीं है, तो यह `400` लौटाती है और कुछ भी ब्लॉकलिस्ट नहीं होता। जो आइटम पहले से ब्लॉकलिस्ट है, उसके लिए कॉल दोहराना सुरक्षित है।जाँचने के लिए कि क्या अवरुद्ध है, [ब्लॉकलिस्ट किए गए आइटम सूचीबद्ध करें](https://docs.didit.me/hi/management-api/blocklist/list.md) का उपयोग करें। ब्लॉक हटाने के लिए, [ब्लॉकलिस्ट से हटाएँ](https://docs.didit.me/hi/management-api/blocklist/remove.md) का उपयोग करें। IP पता, डिवाइस फ़िंगरप्रिंट, उपयोगकर्ता, व्यवसाय या बिना सत्र वाले किसी मान को ब्लॉक करने के लिए, संबंधित सिस्टम ब्लॉकलिस्ट में [प्रविष्टि बनाएँ](https://docs.didit.me/hi/management-api/lists/create-entry.md) से प्रविष्टि जोड़ें। ब्लॉकलिस्ट कैसे लागू की जाती हैं, यह जानने के लिए [उपयोगकर्ता ब्लॉकलिस्ट](https://docs.didit.me/hi/entities/users/blocklist.md) देखें।


## OpenAPI

````yaml hi/openapi-25.json POST /v3/blocklist/add/
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/blocklist/add/:
    post:
      tags:
        - Blocklist
      summary: ब्लॉकलिस्ट में सत्र आइटम जोड़ें
      description: >-
        एप्लिकेशन के एक व्यक्ति सत्यापन सत्र के चेहरे, पहचान दस्तावेज़, फ़ोन
        नंबर या ईमेल पते को ब्लॉकलिस्ट करता है। प्रत्येक चयनित प्रकार के लिए,
        Didit सत्र का सबसे हालिया रिकॉर्ड लेता है, इसे ब्लॉकलिस्टेड के रूप में
        चिह्नित करता है और सत्र से जुड़ी एक प्रविष्टि को संबंधित सिस्टम
        ब्लॉकलिस्ट (`added_by: "api"`) में जोड़ता है, ताकि मेल खाने वाले चेहरे,
        दस्तावेज़ संख्या, फ़ोन नंबर या ईमेल पते वाले नए सत्र अस्वीकृत हो जाएं।
        प्रत्येक चयनित आइटम की पहले जांच की जाती है, इसलिए यदि कोई गायब है तो
        कुछ भी ब्लॉकलिस्ट नहीं किया जाता है; पहले से सूचीबद्ध आइटम के लिए कॉल
        दोहराने से उसकी एकल प्रविष्टि बनी रहती है और `blocklisted_at` रीफ़्रेश
        हो जाता है। सत्र स्वयं और जो सत्र पहले ही समाप्त हो चुके हैं, वे नहीं
        बदलते हैं। सीमित दायरे वाली API कुंजी के लिए `workflows: write` की
        आवश्यकता होती है।
      operationId: add_to_blocklist
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - session_id
              description: कम से कम एक `blocklist_*` फ़्लैग `true` होना चाहिए।
              properties:
                session_id:
                  type: string
                  format: uuid
                  description: >-
                    आपके एप्लिकेशन का एक व्यक्ति सत्यापन सत्र। हटाए गए सत्र
                    अस्वीकार कर दिए जाते हैं।
                blocklist_face:
                  type: boolean
                  default: false
                  description: सत्र के चेहरे को ब्लॉकलिस्ट करें।
                blocklist_document:
                  type: boolean
                  default: false
                  description: >-
                    सत्र के पहचान दस्तावेज़ को ब्लॉकलिस्ट करें। दस्तावेज़ के लिए
                    उसके जारीकर्ता राज्य, दस्तावेज़ प्रकार, दस्तावेज़ संख्या और
                    पूरे नाम की आवश्यकता होती है।
                blocklist_phone:
                  type: boolean
                  default: false
                  description: सत्र के फ़ोन नंबर को ब्लॉकलिस्ट करें।
                blocklist_email:
                  type: boolean
                  default: false
                  description: सत्र के ईमेल पते को ब्लॉकलिस्ट करें।
            examples:
              Face and document:
                value:
                  session_id: 33333333-4444-5555-6666-777777777777
                  blocklist_face: true
                  blocklist_document: true
              Phone only:
                value:
                  session_id: 33333333-4444-5555-6666-777777777777
                  blocklist_phone: true
      responses:
        '200':
          description: चयनित आइटम ब्लॉकलिस्ट कर दिए गए थे।
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
                    description: हमेशा `Successfully updated blocklist.`
              examples:
                Blocklisted:
                  value:
                    message: Successfully updated blocklist.
        '400':
          description: >-
            बॉडी अमान्य है, सत्र इस एप्लिकेशन का सत्यापन सत्र नहीं है, या इसमें
            चयनित प्रकार का कोई रिकॉर्ड नहीं है। कुछ भी ब्लॉकलिस्ट नहीं किया गया
            था।
          content:
            application/json:
              examples:
                Unknown session:
                  value:
                    non_field_errors:
                      - Session not found
                No item selected:
                  value:
                    non_field_errors:
                      - Must specify at least one item to blocklist
                No face record:
                  value:
                    non_field_errors:
                      - Session does not have a face record
                Incomplete document:
                  value:
                    non_field_errors:
                      - >-
                        To blocklist a document, the document must have an
                        issuing state, document type, document number and full
                        name
                Invalid session id:
                  value:
                    session_id:
                      - Must be a valid UUID.
                Missing session id:
                  value:
                    session_id:
                      - This field is required.
        '401':
          description: >-
            स्कोप्ड API कुंजी की समय-सीमा समाप्त हो गई है। अन्य प्रमाणीकरण
            विफलताओं पर `403` मिलता है।
          content:
            application/json:
              examples:
                Expired API key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            `x-api-key` हेडर अनुपस्थित है (गलत, निरस्त या समय-सीमा समाप्त कुंजी
            को `401` मिलता है), या किसी स्कोप्ड API कुंजी में `workflows: write`
            की कमी है या इसका उपयोग इसकी अनुमति सूची से बाहर के किसी IP पते से
            किया गया है।
          content:
            application/json:
              examples:
                Missing or invalid API key:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without workflows access:
                  value:
                    detail: This API key has no write access to workflows.
        '429':
          $ref: '#/components/responses/RateLimitedWrite'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST 'https://verification.didit.me/v3/blocklist/add/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "session_id": "33333333-4444-5555-6666-777777777777",
                "blocklist_face": true,
                "blocklist_document": true
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.blocklist.add(
                session_id="33333333-4444-5555-6666-777777777777",
                blocklist_face=True,
                blocklist_document=True,
            )
            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.blocklist.add({
              session_id: "33333333-4444-5555-6666-777777777777",
              blocklist_face: true,
              blocklist_document: true,
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Blocklist.Add(ctx, didit.BlocklistAddParams{\n\tSessionID:         \"33333333-4444-5555-6666-777777777777\",\n\tBlocklistFace:     didit.Bool(true),\n\tBlocklistDocument: didit.Bool(true),\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.BlocklistAddParams;

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

            var result = client.blocklist().add(BlocklistAddParams.builder()
                    .sessionId("33333333-4444-5555-6666-777777777777")
                    .blocklistFace(true)
                    .blocklistDocument(true)
                    .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->blocklist->add([
                'session_id' => '33333333-4444-5555-6666-777777777777',
                'blocklist_face' => true,
                'blocklist_document' => true,
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.blocklist.add(
              session_id: "33333333-4444-5555-6666-777777777777",
              blocklist_face: true,
              blocklist_document: true
            )
            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.Blocklist.AddAsync(new BlocklistAddParams
            {
                SessionId = "33333333-4444-5555-6666-777777777777",
                BlocklistFace = true,
                BlocklistDocument = true,
            });
            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  responses:
    RateLimitedWrite:
      description: >-
        प्रति API कुंजी प्रति मिनट 300 अनुरोधों की साझा लिखने की सीमा पार हो गई।
        पुनः प्रयास करने से पहले `Retry-After` का पालन करें।
      content:
        application/json:
          schema:
            type: object
            required:
              - detail
            properties:
              detail:
                type: string
          example:
            detail: >-
              Write request rate limit exceeded. You can make up to 300 requests
              per minute.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        आपकी एप्लिकेशन की API कुंजी, Business Console में Developers -> API keys
        से। प्राथमिक कुंजी के पास पूर्ण एक्सेस होता है। एक नामित कुंजी को स्कोप
        किया जा सकता है: प्रति संसाधन none, read या write, कुछ वर्कफ़्लो या
        स्वीकृत सत्रों तक सीमित, IP पतों की सूची तक सीमित, और समाप्ति तिथि तक
        सीमित। 401 का अर्थ है कि कुंजी गलत है, निरस्त कर दी गई है या उसकी
        समय-सीमा समाप्त हो गई है; 403 का अर्थ है कि कोई कुंजी नहीं भेजी गई थी,
        कुंजी के पास इस संसाधन या कार्रवाई का एक्सेस नहीं है, या अनुरोध उसकी IP
        सूची से बाहर के पते से आया था; सत्र रूट पर 404 का अर्थ है कि सत्र कुंजी
        के वर्कफ़्लो या स्थितियों से बाहर है। मीडिया एक्सेस के बिना एक कुंजी को
        छवि, वीडियो और PDF URL null के रूप में प्राप्त होते हैं, और सत्र write
        के बिना एक कुंजी को सत्र लिंक और token null के रूप में प्राप्त होते हैं।
        देखें https://docs.didit.me/console/api-keys।

````

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