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

> PATCH /v3/lists/{list_uuid}/: переименование списка Didit или обновление его описания. Системные списки изменить нельзя.



API-промпт для обновления списка
        Скопировать промпт в буфер обмена



      
      

\<pre>

\`Rename a Didit list or update its description through the Management API.

Endpoint:
PATCH https://verification.didit.me/v3/lists/{list_uuid}/

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

Goal:
\- Update the editable metadata of an allowlist or custom list: name and description.
\- list_type and entry_type cannot change: any other field in the body is ignored. To change them, create a new list.
\- System lists (is_system: true) cannot be modified.

Path parameter:
\- list_uuid: the list UUID returned by GET /v3/lists/ or POST /v3/lists/.

Request body (application/json), send either field or both:
\{
"name": "Trusted office and VPN IPs",  // at most 255 characters, unique among the application's lists
"description": "Office egress ranges and the corporate VPN"
}

Example call:
curl -X PATCH "https://verification.didit.me/v3/lists/{list_uuid}/" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Trusted office and VPN IPs"}'

Example response (200), only the editable fields:
\{
"name": "Trusted office and VPN IPs",
"description": "Office egress ranges"
}

Call GET /v3/lists/{list_uuid}/ when you need the full list after the update.

Failure modes:
\- 400: the list is a system list ({ "non_field_errors": ["System lists cannot be modified."] }), or the new name is empty, longer than 255 characters, or already used by another list of the application ({ "name": ["A list with this name already exists for this application."] }).
\- 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.
\- 404: no list with this UUID in this application, or it was deleted.
\- 429: rate limited (see /integration/rate-limiting); back off and retry.

Side effects:
\- The new name and description are visible in the console and on subsequent GET calls immediately.

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

\</pre>



      
      

Вставьте в

Измените название или описание списка. Любые другие поля в теле запроса игнорируются, поэтому `list_type` и `entry_type` сохраняют значения, с которыми список был создан. Системные списки изменить нельзя: при попытке вернётся `400`.Ответ содержит только `name` и `description`. Чтобы получить полный список, вызовите [Получить список](https://docs.didit.me/ru/management-api/lists/get.md).


## OpenAPI

````yaml ru/openapi-25.json PATCH /v3/lists/{list_uuid}/
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/lists/{list_uuid}/:
    patch:
      tags:
        - Lists
      summary: Обновить список
      description: >-
        Переименовывает список или изменяет его описание. Считываются только
        `name` и `description`; любые другие поля игнорируются, поэтому
        `list_type` и `entry_type` сохраняют значения, с которыми они были
        созданы. Системные списки нельзя изменять, возвращается `400`. Ответ
        содержит только `name` и `description`: вызовите [Получить
        список](https://docs.didit.me/ru/management-api/lists/get) для получения
        полного списка. Для API-ключа с ограниченной областью действия требуется
        `workflows: write`.
      operationId: update_list
      parameters:
        - name: list_uuid
          in: path
          required: true
          description: UUID списка, возвращённый методами List lists или Create a list.
          schema:
            type: string
            format: uuid
          example: 11111111-2222-3333-4444-555555555555
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Новое имя. Должно отличаться от имён всех остальных списков
                    приложения.
                description:
                  type: string
                  description: Новое описание. Передайте пустую строку, чтобы очистить его.
            examples:
              Rename:
                value:
                  name: Trusted office and VPN IPs
              Rename and describe:
                value:
                  name: Trusted office and VPN IPs
                  description: Office egress ranges and the corporate VPN
      responses:
        '200':
          description: Список обновлён. Возвращаются только редактируемые поля.
          content:
            application/json:
              schema:
                type: object
                required:
                  - name
                  - description
                properties:
                  name:
                    type: string
                    description: Название списка после обновления.
                  description:
                    type: string
                    description: Описание списка после обновления.
              examples:
                Renamed:
                  value:
                    name: Trusted office and VPN IPs
                    description: Office egress ranges
        '400':
          description: Список является системным, либо тело запроса недействительно.
          content:
            application/json:
              examples:
                System list:
                  value:
                    non_field_errors:
                      - System lists cannot be modified.
                Duplicate name:
                  value:
                    name:
                      - >-
                        A list with this name already exists for this
                        application.
                Blank name:
                  value:
                    name:
                      - This field may not be blank.
        '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.
        '404':
          description: >-
            Списка с таким UUID не существует в приложении этого API-ключа, или
            он был удален.
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: No List matches the given query.
        '429':
          $ref: '#/components/responses/RateLimitedWrite'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X PATCH
            'https://verification.didit.me/v3/lists/11111111-2222-3333-4444-555555555555/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name": "Trusted office and VPN IPs"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.lists.update(
                "11111111-2222-3333-4444-555555555555",
                name="Trusted office and VPN IPs",
            )
            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.lists.update("11111111-2222-3333-4444-555555555555", {
              name: "Trusted office and VPN IPs",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsUpdateParams{\n\tName: didit.String(\"Trusted office and VPN IPs\"),\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.ListsUpdateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.lists().update("11111111-2222-3333-4444-555555555555",
            ListsUpdateParams.builder()
                    .name("Trusted office and VPN IPs")
                    .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->lists->update('11111111-2222-3333-4444-555555555555', [
                'name' => 'Trusted office and VPN IPs',
            ]);

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.lists.update(
              "11111111-2222-3333-4444-555555555555",
              name: "Trusted office and VPN IPs"
            )
            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.Lists.UpdateAsync("11111111-2222-3333-4444-555555555555", new
            ListsUpdateParams

            {
                Name = "Trusted office and VPN IPs",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  responses:
    RateLimitedWrite:
      description: >-
        Превышен общий лимит на запись в 300 запросов в минуту на один API-ключ.
        Подождите время, указанное в `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-ключ вашего приложения из раздела «Разработчикам» -> «API-ключи» в
        Business Console. Основной ключ имеет полный доступ. Именованный ключ
        может иметь ограниченную область действия: без доступа, чтение или
        запись для каждого ресурса, ограничение определенными сценариями или
        одобренными сессиями, списком IP-адресов и сроком действия. 401
        означает, что ключ неверен, отозван или его срок действия истек; 403
        означает, что ключ не был передан, у ключа нет доступа к этому ресурсу
        или действию, либо запрос поступил с адреса вне его списка IP-адресов;
        404 на маршруте сессии означает, что сессия не входит в сценарии или
        статусы ключа. Ключ без доступа к медиа получает URL изображений, видео
        и PDF как null, а ключ без прав на запись сессий получает ссылки на
        сессии и токены как null. См. https://docs.didit.me/console/api-keys.

````

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