> ## 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 para atualizar lista: editar lista de conformidade

> PATCH /v3/lists/{list_uuid}/: renomeie ou edite a descrição de uma allowlist ou lista personalizada da Didit. Listas do sistema são imutáveis.



Prompt da API de atualização de lista
        Copiar o prompt para a área de transferência



      
      

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



      
      

Colar em

Atualize o nome ou a descrição de uma lista. Qualquer outro campo no corpo é ignorado, portanto `list_type` e `entry_type` mantêm os valores com que foram criados. Listas do sistema não podem ser modificadas e retornam `400`.A resposta contém apenas `name` e `description`. Chame [Obter lista](https://docs.didit.me/pt-br/management-api/lists/get.md) para obter a lista completa.


## OpenAPI

````yaml pt-br/openapi-25.json PATCH /v3/lists/{list_uuid}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API de verificação de identidade. Autentique-se com o cabeçalho x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/lists/{list_uuid}/:
    patch:
      tags:
        - Lists
      summary: Atualizar uma lista
      description: >-
        Renomeia uma lista ou altera sua descrição. Apenas `name` e
        `description` são lidos; qualquer outro campo é ignorado, portanto
        `list_type` e `entry_type` mantêm os valores com que foram criados.
        Listas do sistema não podem ser modificadas e retornam `400`. A resposta
        contém apenas `name` e `description`: chame [Obter uma
        lista](https://docs.didit.me/pt-br/management-api/lists/get) para obter
        a lista completa. Uma chave de API com escopo precisa de `workflows:
        write`.
      operationId: update_list
      parameters:
        - name: list_uuid
          in: path
          required: true
          description: >-
            UUID da lista, conforme retornado por Listar listas ou Criar uma
            lista.
          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: >-
                    Novo nome. Deve ser diferente do nome de todas as outras
                    listas da aplicação.
                description:
                  type: string
                  description: Nova descrição. Envie uma string vazia para removê-la.
            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: A lista foi atualizada. Apenas os campos editáveis são retornados.
          content:
            application/json:
              schema:
                type: object
                required:
                  - name
                  - description
                properties:
                  name:
                    type: string
                    description: O nome da lista após a atualização.
                  description:
                    type: string
                    description: A descrição da lista após a atualização.
              examples:
                Renamed:
                  value:
                    name: Trusted office and VPN IPs
                    description: Office egress ranges
        '400':
          description: A lista é uma lista do sistema, ou o corpo é inválido.
          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: >-
            A chave de API com escopo expirou. Outras falhas de autenticação
            retornam `403`.
          content:
            application/json:
              examples:
                Expired API key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            O cabeçalho `x-api-key` está ausente (uma chave incorreta, revogada
            ou expirada recebe `401`), ou uma chave de API com escopo não tem
            `workflows: write` ou é usada a partir de um endereço IP fora da sua
            lista de permissões.
          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: >-
            Não existe nenhuma lista com este UUID na aplicação da chave de API,
            ou ela foi excluída.
          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: >-
        O limite compartilhado de escrita de 300 requisições por minuto por
        chave de API foi excedido. Respeite `Retry-After` antes de tentar
        novamente.
      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: >-
        Chave de API da sua aplicação, em Developers -> API keys no Business
        Console. A chave principal tem acesso total. Uma chave nomeada pode ter
        escopo restrito: nenhum acesso, leitura ou escrita por recurso, limitada
        a alguns fluxos ou a sessões aprovadas, a uma lista de endereços IP e a
        uma data de validade. 401 significa que a chave está errada, revogada ou
        expirada; 403 significa que nenhuma chave foi enviada, que a chave não
        tem acesso a este recurso ou ação, ou que a requisição veio de um
        endereço fora da sua lista de IPs; 404 em uma rota de sessão significa
        que a sessão está fora dos fluxos ou status da chave. Uma chave sem
        acesso a mídia recebe URLs de imagem, vídeo e PDF como null, e uma chave
        sem permissão de escrita em sessões recebe links e tokens de sessão como
        null. Consulte https://docs.didit.me/console/api-keys.

````

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