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

> Добавляйте текстовые заметки с необязательными упоминаниями участников в хронологию проверки транзакции через API Didit из ваших систем.



Создание примечания к транзакции: промпт API
        Скопировать промпт в буфер обмена



      
      

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



      
      

Вставьте в

Примечание содержит контекст, а не решение: оно никогда не меняет `status`, `score` или оповещения транзакции. Проверяющие видят его в разделе **Примечания** на [странице сведений о транзакции](https://docs.didit.me/ru/transaction-monitoring/console.md#детали-транзакции) в Console, а в `activities` транзакции появляется запись `TRANSACTION_NOTE_ADDED`, которую можно прочитать с помощью [Получить транзакцию](https://docs.didit.me/ru/management-api/transactions/get.md).Поскольку примечание создано с помощью API-ключа, оно не содержит автора: `actor_email` и `actor_name` равны `null`. Если нужно показать, кто его написал, укажите это в тексте примечания. Полную хронологию можно получить с помощью [Получить список примечаний к транзакции](https://docs.didit.me/ru/management-api/transactions/list-notes.md).


## OpenAPI

````yaml ru/openapi-25.json POST /v3/transactions/{transaction_id}/notes/
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/transactions/{transaction_id}/notes/:
    post:
      tags:
        - Transactions
      summary: Создать заметку к транзакции
      description: >-
        Добавьте заметку в виде обычного текста в таймлайн проверки
        отслеживаемой транзакции, где её увидят проверяющие в Console. Заметка
        служит контекстом, а не решением: `status`, `score` и оповещения
        транзакции не меняются, webhook не отправляется, и плата не взимается. В
        `activities` транзакции добавляется запись `TRANSACTION_NOTE_ADDED`.


        У заметок, созданных с помощью API-ключа, нет автора: поля `actor_email`
        и `actor_name` содержат `null`, поэтому при необходимости укажите автора
        в тексте. Каждый адрес в `mentioned_emails` должен принадлежать
        участнику вашей организации, иначе весь запрос завершится ошибкой `400`;
        упоминания сохраняются в нижнем регистре и без дубликатов, и этот
        endpoint не отправляет уведомления упомянутым участникам.


        Каждый вызов создает новую заметку, поэтому повторная попытка запроса,
        завершившегося по таймауту, может добавить её дважды: запросите список
        заметок перед повтором. В API нет endpoint для редактирования или
        удаления заметок. API-ключу с ограниченными правами требуется разрешение
        `transactions: write`; ключ с ограничениями по определенным сценариям
        или одобренным сессиям не может вызывать этот endpoint.
      operationId: create_transaction_note
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: >-
            UUID транзакции Didit: значение `uuid`, возвращаемое методами `POST
            /v3/transactions/` и `GET /v3/transactions/`. Собственный `txn_id`
            не принимается.
          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: >-
                    Обычная текстовая заметка. Пробелы в начале и в конце
                    удаляются, а пустая заметка отклоняется. Без ограничений по
                    длине.
                mentioned_emails:
                  type: array
                  items:
                    type: string
                    format: email
                  default: []
                  description: >-
                    Электронные адреса участников вашей организации для
                    упоминания. Каждый должен быть действующим адресом участника
                    организации.
            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: Заметка создана.
          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: >-
            Некорректное тело запроса: параметр `note` отсутствует, равен null
            или пуст, указан недействительный адрес в `mentioned_emails` (ошибки
            сопоставляются по позиции в списке) либо упомянутый адрес не
            является участником вашей организации. Ничего не создано.
          content:
            application/json:
              schema:
                type: object
                description: Ошибки полей с ключами по названию поля.
                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: >-
            Срок действия API-ключа истёк. Истечь может только ключ, созданный
            со сроком действия; после этой даты каждый запрос с ним возвращает
            `401`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            Запрос запрещён. При отсутствии ключа возвращается стандартное
            сообщение; при неверном, отозванном или истёкшем ключе возвращается
            `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: >-
            Транзакция с этим UUID не существует в приложении (никогда не
            создавалась, удалена или принадлежит другому приложению). Значение
            `transaction_id`, не являющееся UUID, не доходит до API: вместо
            этого возвращается HTML-страница `404`, а не это JSON-тело.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Not found:
                  value:
                    detail: No Transaction matches the given query.
        '429':
          description: >-
            Более 300 запросов на запись в минуту с этим API-ключом. Подождите
            указанное в `Retry-After` количество секунд, затем повторите
            попытку.
          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: Количество секунд до сброса текущего минутного окна.
              schema:
                type: integer
                example: 23
            X-RateLimit-Limit:
              description: Количество разрешённых запросов в минуту в рамках этого бюджета.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Количество оставшихся запросов в текущем окне.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Unix-время, когда окно сбрасывается.
              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: Одна заметка в хронологии проверки отслеживаемой транзакции.
      required:
        - uuid
        - note
        - actor_email
        - actor_name
        - metadata
        - created_at
      properties:
        uuid:
          type: string
          format: uuid
          description: Идентификатор заметки.
        note:
          type: string
          description: Текст обычной заметки.
        actor_email:
          type: string
          format: email
          nullable: true
          description: >-
            Электронная почта пользователя Console, оставившего заметку или
            изменившего статус. `null` для заметок, созданных с помощью
            API-ключа, и заметок, добавляемых Didit автоматически.
        actor_name:
          type: string
          nullable: true
          description: >-
            Отображаемое имя пользователя Console (его email, если имя не
            указано). `Rule Engine` для заметок, которые Didit добавляет
            автоматически. `null` для заметок, созданных с помощью API-ключа.
        metadata:
          type: object
          description: >-
            Различает типы заметок. Заметки, добавленные через API или консоль,
            содержат `mentioned_emails`. Изменение статуса, сделанное в консоли,
            содержит `type: status_change` с `previous_status`, `new_status`,
            `reason_code` и `reason_label`. Заметки, добавленные Didit, содержат
            `source`: `rule_action` (с `rule_uuid`) для действия правила
            `add_note` или `remediation_session` для проблемы при создании
            сессии верификации по действию пользователя.
          properties:
            mentioned_emails:
              type: array
              items:
                type: string
                format: email
              description: >-
                Упомянутые участники организации в нижнем регистре с удалением
                дубликатов. Пусто, если никто не был упомянут.
            type:
              type: string
              enum:
                - status_change
              description: >-
                Присутствует в заметках, фиксирующих изменение статуса,
                сделанное в Консоли.
            previous_status:
              type: string
              enum:
                - APPROVED
                - IN_REVIEW
                - DECLINED
                - AWAITING_USER
              description: Статус до изменения.
            new_status:
              type: string
              enum:
                - APPROVED
                - IN_REVIEW
                - DECLINED
                - AWAITING_USER
              description: Статус после изменения.
            reason_code:
              type: string
              nullable: true
              description: Код причины, указанный при изменении.
            reason_label:
              type: string
              nullable: true
              description: Метка причины, указанная при изменении.
            source:
              type: string
              enum:
                - rule_action
                - remediation_session
              description: Присутствует в заметках, которые Didit добавляет автоматически.
            rule_uuid:
              type: string
              format: uuid
              description: >-
                Правило, чьё действие `add_note` создало заметку (с `source:
                rule_action`).
        created_at:
          type: string
          format: date-time
          description: Время сохранения заметки.
  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.