> ## 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 criar nota de transação

> Adicione via API da Didit uma nota em texto simples, com menções opcionais a membros, à linha do tempo de revisão de uma transação monitorada.



Prompt da API para criar nota de transação
        Copiar o prompt para a área de transferência



      
      

\<pre>

\`Add a note to a Didit monitored transaction through the Management API.

Endpoint:
POST https://verification.didit.me/v3/transactions/{transaction_id}/notes/

Authentication:
Use the x-api-key header with my Didit API key. A scoped key needs transactions: write. Keys limited to specific workflows or to approved sessions cannot call this endpoint.

Goal:
\- Record context from my own systems (a support call, a manual check, an outcome from my case tool) on the transaction's review timeline, where Console reviewers see it.

Path parameter:
\- transaction_id: the Didit transaction uuid, not my own txn_id.

Request body (application/json):
\{
"note": "Customer confirmed the withdrawal by phone.",
"mentioned_emails": ["analyst@example.com"]
}
\- note: required. Plain text, no length limit. Leading and trailing whitespace is trimmed and a blank note is rejected.
\- mentioned_emails: optional list of emails of members of my organization to mention.

Behavior:
\- Returns 201 with the created note. actor_email and actor_name are null because the note comes from an API key, not a person.
\- Every mentioned email must belong to a member of my organization; one unknown address fails the whole request with 400. Mentions are stored lower-cased and de-duplicated in metadata.mentioned_emails. This endpoint does not notify the mentioned members.
\- Each call creates a new note. Retrying a request that timed out can add the same note twice, so check GET /v3/transactions/{transaction_id}/notes/ before retrying.
\- There is no API endpoint to edit or remove a note.

Example call:
curl -X POST "https://verification.didit.me/v3/transactions/{transaction_id}/notes/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"note": "Customer confirmed the withdrawal by phone.", "mentioned_emails": ["analyst@example.com"]}'

What to read from the response:
\- uuid: the note id.
\- created_at: when the note was stored.
\- metadata.mentioned_emails: the normalized mention list (empty when nobody was mentioned).

Failure modes:
\- 400: note missing ({"note": ["This field is required."]}) or blank, an invalid email in mentioned_emails, or a mentioned address outside my organization ({"mentioned_emails": ["Mentioned users must belong to this organization and have access to this application."]}).
\- 401: the API key has expired.
\- 403: missing API key (a wrong, revoked or expired key gets 401), a scoped key without transactions: write ({"detail": "This API key has no write access to transactions."}), a key with workflow or status limits, or a request from outside the key's IP allowlist.
\- 404: no transaction with this uuid in my application ({"detail": "No Transaction matches the given query."}).
\- 429: more than 300 write requests per minute with this key; wait Retry-After seconds and retry.

Side effects: creates the note and adds a TRANSACTION_NOTE_ADDED entry to the transaction's activities. The transaction's status, score and alerts do not change, no webhook is sent, and nothing is billed.

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

\</pre>



      
      

Colar em

Uma nota é contexto, não uma decisão: ela nunca altera o `status`, o `score` nem os alertas da transação. Os revisores a veem em **Notas** no [detalhe da transação](https://docs.didit.me/pt-br/transaction-monitoring/console.md#detalhes-da-transação) no Console, e as `activities` da transação ganham uma entrada `TRANSACTION_NOTE_ADDED`, que você pode ler com [Obter transação](https://docs.didit.me/pt-br/management-api/transactions/get.md).Como a nota vem de uma chave de API, ela não tem autor: `actor_email` e `actor_name` são `null`. Se você precisar mostrar quem a escreveu, inclua essa informação no texto da nota. Leia a linha do tempo completa com [Listar notas da transação](https://docs.didit.me/pt-br/management-api/transactions/list-notes.md).


## OpenAPI

````yaml pt-br/openapi-25.json POST /v3/transactions/{transaction_id}/notes/
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/transactions/{transaction_id}/notes/:
    post:
      tags:
        - Transactions
      summary: Criar nota de transação
      description: >-
        Adiciona uma nota em texto simples à linha do tempo de revisão de uma
        transação monitorada, onde os revisores do Console a veem. Uma nota é
        contexto, não uma decisão: o `status`, o `score` e os alertas da
        transação não mudam, nenhum webhook é enviado e nada é cobrado. As
        `activities` da transação ganham uma entrada `TRANSACTION_NOTE_ADDED`.


        Notas criadas com uma chave de API não têm autor: `actor_email` e
        `actor_name` são `null`, então inclua o autor no texto se precisar. Todo
        endereço em `mentioned_emails` deve pertencer a um membro da sua
        organização; caso contrário, a requisição inteira falha com `400`. As
        menções são armazenadas em letras minúsculas e sem duplicatas, e este
        endpoint não notifica os membros mencionados.


        Cada chamada cria uma nova nota, então tentar novamente uma requisição
        que expirou pode adicioná-la duas vezes: liste as notas antes de tentar
        novamente. Não há endpoint de API para editar ou remover uma nota. Uma
        chave de API com escopo precisa de `transactions: write`; uma chave
        limitada a alguns fluxos ou a sessões aprovadas não pode chamar este
        endpoint.
      operationId: create_transaction_note
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: >-
            UUID da transação na Didit: o `uuid` retornado por `POST
            /v3/transactions/` e `GET /v3/transactions/`. O seu próprio `txn_id`
            não é aceito.
          schema:
            type: string
            format: uuid
          example: abcdef12-3456-7890-abcd-ef1234567890
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - note
              properties:
                note:
                  type: string
                  minLength: 1
                  description: >-
                    Nota em texto simples. Espaços em branco no início e no fim
                    são removidos, e uma nota vazia é rejeitada. Sem limite de
                    tamanho.
                mentioned_emails:
                  type: array
                  items:
                    type: string
                    format: email
                  default: []
                  description: >-
                    E-mails dos membros da sua organização a mencionar. Cada um
                    deve ser um e-mail válido de um membro da organização.
            examples:
              Note with a mention:
                value:
                  note: Customer confirmed the withdrawal by phone.
                  mentioned_emails:
                    - analyst@example.com
              Plain note:
                value:
                  note: Source of funds document requested by email.
      responses:
        '201':
          description: A nota foi criada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionNote'
              examples:
                Created:
                  value:
                    uuid: c1111111-2222-4333-8444-555555555555
                    note: Customer confirmed the withdrawal by phone.
                    actor_email: null
                    actor_name: null
                    metadata:
                      mentioned_emails:
                        - analyst@example.com
                    created_at: '2026-10-16T10:05:12.481203Z'
        '400':
          description: >-
            O corpo é inválido: `note` ausente, null ou em branco, um endereço
            inválido em `mentioned_emails` (erros indexados pela posição na
            lista) ou um endereço mencionado que não é membro da sua
            organização. Nada é criado.
          content:
            application/json:
              schema:
                type: object
                description: Erros de campo indexados pelo nome do campo.
                additionalProperties: {}
              examples:
                Missing note:
                  value:
                    note:
                      - This field is required.
                Blank note:
                  value:
                    note:
                      - This field may not be blank.
                Invalid email:
                  value:
                    mentioned_emails:
                      '0':
                        - Enter a valid email address.
                Not an organization member:
                  value:
                    mentioned_emails:
                      - >-
                        Mentioned users must belong to this organization and
                        have access to this application.
        '401':
          description: >-
            A chave de API expirou. Somente uma chave criada com data de
            validade pode expirar; após essa data, toda requisição feita com ela
            responde `401`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            A requisição não é permitida. Uma chave ausente recebe a mensagem
            genérica; uma chave incorreta, revogada ou expirada recebe `401`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Missing or invalid key:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without transactions write:
                  value:
                    detail: This API key has no write access to transactions.
                Key limited to workflows or approved sessions:
                  value:
                    detail: >-
                      This API key only reaches sessions inside its workflow or
                      status limits, so it can't use this endpoint.
                Outside the key's IP list:
                  value:
                    detail: This API key can't be used from this IP address.
        '404':
          description: >-
            Não existe nenhuma transação com este UUID na aplicação (nunca
            criada, excluída ou pertencente a outra aplicação). Um
            `transaction_id` que não seja um UUID não chega à API: ele retorna
            uma página HTML `404` em vez deste corpo JSON.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Not found:
                  value:
                    detail: No Transaction matches the given query.
        '429':
          description: >-
            Mais de 300 requisições de escrita por minuto com esta chave de API.
            Aguarde o número de segundos indicado em `Retry-After` e tente
            novamente.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Throttled:
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      requests per minute.
          headers:
            Retry-After:
              description: Segundos até a janela atual de um minuto ser reiniciada.
              schema:
                type: integer
                example: 23
            X-RateLimit-Limit:
              description: Requisições permitidas por minuto nesta cota.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requisições restantes na janela atual.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Horário Unix em que a janela é reiniciada.
              schema:
                type: integer
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/transactions/abcdef12-3456-7890-abcd-ef1234567890/notes/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"note": "Customer confirmed the withdrawal by phone.", "mentioned_emails": ["analyst@example.com"]}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.notes.create(
                "abcdef12-3456-7890-abcd-ef1234567890",
                note="Customer confirmed the withdrawal by phone.",
                mentioned_emails=["analyst@example.com"],
            )
            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.transactions.notes.create("abcdef12-3456-7890-abcd-ef1234567890",
            {
              note: "Customer confirmed the withdrawal by phone.",
              mentioned_emails: ["analyst@example.com"],
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Notes.Create(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\", didit.TransactionsNotesCreateParams{\n\tNote:            \"Customer confirmed the withdrawal by phone.\",\n\tMentionedEmails: didit.Some([]string{\"analyst@example.com\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.util.List;

            import me.didit.Didit;

            import me.didit.types.TransactionsNotesCreateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().notes().create("abcdef12-3456-7890-abcd-ef1234567890",
            TransactionsNotesCreateParams.builder()
                    .note("Customer confirmed the withdrawal by phone.")
                    .mentionedEmails(List.of("analyst@example.com"))
                    .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->transactions->notes->create('abcdef12-3456-7890-abcd-ef1234567890',
            [
                'note' => 'Customer confirmed the withdrawal by phone.',
                'mentioned_emails' => ['analyst@example.com'],
            ]);

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

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

            result = didit.transactions.notes.create(
              "abcdef12-3456-7890-abcd-ef1234567890",
              note: "Customer confirmed the withdrawal by phone.",
              mentioned_emails: ["analyst@example.com"]
            )
            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.Transactions.Notes.CreateAsync("abcdef12-3456-7890-abcd-ef1234567890",
            new TransactionsNotesCreateParams

            {
                Note = "Customer confirmed the withdrawal by phone.",
                MentionedEmails = new string[] { "analyst@example.com" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TransactionNote:
      type: object
      description: Uma nota na linha do tempo de revisão de uma transação monitorada.
      required:
        - uuid
        - note
        - actor_email
        - actor_name
        - metadata
        - created_at
      properties:
        uuid:
          type: string
          format: uuid
          description: Identificador da nota.
        note:
          type: string
          description: Corpo da nota em texto simples.
        actor_email:
          type: string
          format: email
          nullable: true
          description: >-
            E-mail do usuário do Console que escreveu a nota ou alterou o
            status. `null` para notas criadas com uma chave de API e para notas
            que a Didit adiciona automaticamente.
        actor_name:
          type: string
          nullable: true
          description: >-
            Nome de exibição do usuário do Console (o e-mail dele quando não tem
            nome). `Rule Engine` nas notas que a Didit adiciona automaticamente.
            `null` para notas criadas com uma chave de API.
        metadata:
          type: object
          description: >-
            Distingue os tipos de nota. Notas escritas pela API ou pelo Console
            trazem `mentioned_emails`. Uma mudança de status feita no Console
            traz `type: status_change` com `previous_status`, `new_status`,
            `reason_code` e `reason_label`. Notas adicionadas pela Didit trazem
            `source`: `rule_action` (com `rule_uuid`) para a ação `add_note` de
            uma regra, ou `remediation_session` para um problema ao criar a
            sessão de verificação de ação do usuário.
          properties:
            mentioned_emails:
              type: array
              items:
                type: string
                format: email
              description: >-
                Membros da organização mencionados, em minúsculas e sem
                duplicatas. Vazio quando ninguém foi mencionado.
            type:
              type: string
              enum:
                - status_change
              description: >-
                Presente em notas que registram uma mudança de status feita no
                Console.
            previous_status:
              type: string
              enum:
                - APPROVED
                - IN_REVIEW
                - DECLINED
                - AWAITING_USER
              description: Status antes da alteração.
            new_status:
              type: string
              enum:
                - APPROVED
                - IN_REVIEW
                - DECLINED
                - AWAITING_USER
              description: Status após a alteração.
            reason_code:
              type: string
              nullable: true
              description: Código do motivo informado com a alteração.
            reason_label:
              type: string
              nullable: true
              description: Rótulo do motivo informado com a alteração.
            source:
              type: string
              enum:
                - rule_action
                - remediation_session
              description: Presente em notas que a Didit adiciona automaticamente.
            rule_uuid:
              type: string
              format: uuid
              description: >-
                Regra cuja ação `add_note` escreveu a nota (com `source:
                rule_action`).
        created_at:
          type: string
          format: date-time
          description: Quando a nota foi armazenada.
  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.