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

# Список сообщений Travel Rule API

> Получите сообщения и запросы документов, которыми обмениваются с VASP-контрагентом по переводу Travel Rule, через Didit API.

Промпт для API списка сообщений Travel Rule
Скопировать промпт в буфер обмена

<pre>
  \`Read the messages and document requests exchanged with the counterparty VASP about one Travel Rule transfer.

  Endpoint:
  GET [https://verification.didit.me/v3/transactions/\{transaction\_id}/travel-rule/messages/](https://verification.didit.me/v3/transactions/\{transaction_id}/travel-rule/messages/)

  Authentication:
  Use the x-api-key header with my Didit API key. {transaction_id} is the Didit transaction uuid on my application.

  What to read from the response:

  * A plain array, oldest first. Each message has id, kind (MESSAGE or DOCUMENT\_REQUEST), direction (OUTBOUND is what my side sent), author, body, requested\_documents, reply\_to, fulfilled\_at (set once a reply carries a document), attachment and created\_at.
  * attachment.files\[].file\_url is a time-limited download URL.

  Failure modes:

  * 404 - unknown transaction, or no Travel Rule transfer on it.

  Send one with POST on the same path. No webhook fires when the counterparty writes, so read this endpoint.

  Full guide: /transaction-monitoring/travel-rule#messages-and-document-requests.\`
</pre>

Вставьте в


## OpenAPI

````yaml ru/openapi-25.json GET /v3/transactions/{transaction_id}/travel-rule/messages/
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}/travel-rule/messages/:
    get:
      tags:
        - Travel Rule
      summary: Получить список сообщений Travel Rule
      description: >-
        Сообщения и запросы документов, которыми обменялись с VASP-контрагентом
        по поводу этого перевода.
      operationId: listTravelRuleMessages
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: Стабильный UUID транзакции Didit, которой принадлежит перевод.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Сообщения, начиная со старых.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TravelRuleMessage'
        '404':
          description: >-
            Неизвестная транзакция или token, либо по транзакции отсутствует
            перевод Travel Rule.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.travel_rule.list_messages(
                "11111111-2222-3333-4444-555555555555",
            )
            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.travelRule.listMessages("11111111-2222-3333-4444-555555555555");

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.ListMessages(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().travelRule().listMessages("11111111-2222-3333-4444-555555555555");

            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->travelRule->listMessages('11111111-2222-3333-4444-555555555555');

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


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            didit.transactions.travel_rule.list_messages("11111111-2222-3333-4444-555555555555").each
            do |item|
              puts item.to_h
            end
        - 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.TravelRule.ListMessagesAsync("11111111-2222-3333-4444-555555555555");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - MESSAGE
            - DOCUMENT_REQUEST
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
          description: >-
            `OUTBOUND` означает то, что отправила сторона читателя. На портале
            получения направление указано со стороны контрагента.
        author:
          type: string
          description: >-
            Кто создал запись со своей стороны: email пользователя консоли,
            метка API-ключа или название другого VASP.
        body:
          type: string
        requested_documents:
          type: array
          items:
            type: string
          description: Что запрашивает DOCUMENT_REQUEST со слов автора запроса.
        reply_to:
          type: string
          format: uuid
          nullable: true
        fulfilled_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Устанавливается для DOCUMENT_REQUEST, как только ответ на него
            содержит документ.
        attachment:
          $ref: '#/components/schemas/TravelRuleMessageAttachment'
        created_at:
          type: string
          format: date-time
    TravelRuleMessageAttachment:
      type: object
      nullable: true
      description: >-
        Документ, прикреплённый к сообщению, хранящийся как любой другой
        документ транзакции.
      properties:
        uuid:
          type: string
          format: uuid
        label:
          type: string
          nullable: true
        note:
          type: string
          nullable: true
        uploaded_by:
          type: string
          nullable: true
          description: >-
            Кто прикрепил файл. На портале получения для отправленного вами
            файла отображается название вашего VASP, но ни в коем случае не
            пользователь или API-ключ, стоящие за ним.
        created_at:
          type: string
          format: date-time
        files:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              file_url:
                type: string
                nullable: true
                description: URL для скачивания с ограниченным сроком действия.
              original_filename:
                type: string
              file_size:
                type: integer
  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.