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

> Didit Management API로 Travel Rule 거래의 상대방 VASP에 메시지 또는 문서 요청을 보내고, 선택적으로 첨부 파일을 포함할 수 있습니다.



Travel Rule 메시지 전송 API 프롬프트
        프롬프트를 클립보드에 복사



      
      

\<pre>

\`Send a message or a document request to the counterparty VASP of a Travel Rule transfer, so a disputed transfer is resolved inside Didit.

Endpoint:
POST 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.

Request body (JSON, or multipart/form-data when attaching files):
\- kind - MESSAGE (default) or DOCUMENT_REQUEST.
\- body - up to 5000 characters. A MESSAGE needs a body or a file.
\- requested_documents - up to 10 names. A DOCUMENT_REQUEST needs at least one; a MESSAGE must not have any.
\- reply_to - uuid of an earlier message of the same transfer. A reply carrying a document fulfils the request it answers.
\- files - multipart only, up to 5 files of 10 MB each.

Example call:
curl -X POST "https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"kind": "DOCUMENT_REQUEST", "body": "Please confirm the beneficiary date of birth.", "requested_documents": ["Proof of address"]}'

Behavior:
\- Works on INTERNAL transfers (the other Didit customer sees it on its side) and EMAIL transfers (the counterparty is emailed and answers in the pickup portal).
\- A transfer holds up to 100 messages.

Failure modes:
\- 400 - invalid body, file rejected, 100 messages reached, or reply_to is not a message of this transfer.
\- 404 - unknown transaction, or no Travel Rule transfer on it.
\- 409 - no message can reach the counterparty; detail gives the reason: a network rail (TRP, GTR, TRUST, VerifyVASP, Sygna) carries no messages, no counterparty yet, an INTERNAL transfer whose data did not match the wallet holder, an INTERNAL transfer whose recipient has not proved control of the wallet yet, an EMAIL transfer whose counterparty no longer has a compliance email address, or an EMAIL transfer whose pickup link expired or whose transfer is closed.

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

\</pre>



      
      

붙여넣을 곳



## OpenAPI

````yaml ko/openapi-25.json POST /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/:
    post:
      tags:
        - Travel Rule
      summary: Travel Rule 메시지 또는 문서 요청 전송
      description: >-
        거래 상대방 VASP에 메시지 또는 문서 요청을 전송합니다. INTERNAL 전송(상대방 Didit 고객이 해당 페어의 자기
        측에서 확인) 및 EMAIL 전송(거래 상대방에게 이메일이 발송되고 픽업 포털에서 답변)에서 작동합니다. TRP, GTR,
        TRUST, VerifyVASP 또는 Sygna를 통한 전송에는 해당 프로토콜 자체에 메시지 기능이 없으므로 메시지가 포함되지
        않습니다. 제한: 전송당 메시지 100개, 본문당 5000자, 요청 문서 10개, 각 10 MB 파일 5개.
      operationId: createTravelRuleMessage
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: 해당 이체를 소유한 Didit 고유 거래 UUID입니다.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TravelRuleMessageCreateRequest'
            example:
              kind: DOCUMENT_REQUEST
              body: Please confirm the date of birth of the beneficiary.
              requested_documents:
                - Proof of address
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TravelRuleMessageCreateRequest'
      responses:
        '201':
          description: 저장된 메시지입니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleMessage'
        '400':
          description: >-
            유효하지 않은 본문, 허용되지 않는 파일 형식 또는 크기, 전송 건당 100개를 초과하는 메시지, 또는 해당 전송의
            메시지가 아닌 `reply_to`입니다.
          content:
            application/json:
              schema:
                type: object
              example:
                requested_documents:
                  - Name at least one document the counterparty should send.
        '404':
          description: 알 수 없는 거래 또는 token이거나, 해당 거래에 Travel Rule 전송 내역이 없습니다.
        '409':
          description: >-
            거래 상대방에게 메시지가 도달할 수 없습니다. `detail`에 이유가 표시됩니다. 전송이 네트워크 레일(TRP, GTR,
            TRUST, VerifyVASP 또는 Sygna)을 통해 실행 중이거나, 거래 상대방이 아직 없거나, INTERNAL
            전송의 데이터가 지갑 소유자와 일치하지 않아 수취인에게 도달하지 못했거나, EMAIL 전송의 수령 링크가 만료되었거나
            전송이 종료되었습니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/
            \
              -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
              -d '{"kind": "DOCUMENT_REQUEST", "body": "Please confirm the date of birth of the beneficiary.", "requested_documents": ["Proof of address"]}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.travel_rule.create_message(
                "11111111-2222-3333-4444-555555555555",
                kind="DOCUMENT_REQUEST",
                body="Please confirm the date of birth of the beneficiary.",
                requested_documents=["Proof of address"],
            )
            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.createMessage("11111111-2222-3333-4444-555555555555",
            {
              kind: "DOCUMENT_REQUEST",
              body: "Please confirm the date of birth of the beneficiary.",
              requested_documents: ["Proof of address"],
            });

            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.CreateMessage(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleMessageCreateRequest{\n\tKind:               didit.Some(didit.TravelRuleMessageCreateRequestKind(\"DOCUMENT_REQUEST\")),\n\tBody:               didit.String(\"Please confirm the date of birth of the beneficiary.\"),\n\tRequestedDocuments: didit.Some([]string{\"Proof of address\"}),\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.TravelRuleMessageCreateRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().travelRule().createMessage("11111111-2222-3333-4444-555555555555",
            TravelRuleMessageCreateRequest.builder()
                    .kind(TravelRuleMessageCreateRequest.Kind.of("DOCUMENT_REQUEST"))
                    .body("Please confirm the date of birth of the beneficiary.")
                    .requestedDocuments(List.of("Proof of address"))
                    .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->travelRule->createMessage('11111111-2222-3333-4444-555555555555',
            [
                'kind' => 'DOCUMENT_REQUEST',
                'body' => 'Please confirm the date of birth of the beneficiary.',
                'requested_documents' => ['Proof of address'],
            ]);

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

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

            result = didit.transactions.travel_rule.create_message(
              "11111111-2222-3333-4444-555555555555",
              kind: "DOCUMENT_REQUEST",
              body: "Please confirm the date of birth of the beneficiary.",
              requested_documents: ["Proof of address"]
            )
            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.TravelRule.CreateMessageAsync("11111111-2222-3333-4444-555555555555",
            new TravelRuleMessageCreateRequest

            {
                Kind = new TravelRuleMessageCreateRequestKind("DOCUMENT_REQUEST"),
                Body = "Please confirm the date of birth of the beneficiary.",
                RequestedDocuments = new string[] { "Proof of address" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleMessageCreateRequest:
      type: object
      description: JSON으로 전송하거나 첨부 파일이 `files`에 포함된 multipart/form-data로 전송하십시오.
      properties:
        kind:
          type: string
          enum:
            - MESSAGE
            - DOCUMENT_REQUEST
          default: MESSAGE
        body:
          type: string
          maxLength: 5000
          description: 파일이 첨부되지 않은 경우 MESSAGE에 필수입니다.
        requested_documents:
          type: array
          items:
            type: string
            maxLength: 255
          maxItems: 10
          description: DOCUMENT_REQUEST에 필수(최소 1개)이며, 해당 경우에만 허용됩니다.
        reply_to:
          type: string
          format: uuid
          nullable: true
          description: 동일한 이체의 메시지입니다. 문서가 포함된 회신은 응답 대상 문서 요청을 충족합니다.
        files:
          type: array
          items:
            type: string
            format: binary
          maxItems: 5
          description: Multipart 전용입니다. 각 10MB 이하의 파일 최대 5개까지 가능합니다.
    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: 자체 측에서 누가 작성했는지 나타냅니다. 콘솔 사용자의 이메일, 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: >-
        Business Console의 Developers -> API keys에서 발급받은 귀하 애플리케이션의 API 키입니다. 기본
        키는 전체 접근 권한을 갖습니다. 이름이 지정된 키는 리소스별 none, read, write 범위로 권한을 제한할 수 있으며
        특정 워크플로나 승인된 세션, IP 주소 목록, 만료일 등으로 제한할 수도 있습니다. 401은 키가 잘못되었거나 폐기되었거나
        만료되었음을 의미합니다. 403은 키가 전송되지 않았거나, 키에 해당 리소스나 작업에 대한 접근 권한이 없거나, 요청이 허용된
        IP 목록 외부 주소에서 발생했음을 의미합니다. 세션 경로에서의 404는 해당 세션이 키의 허용 워크플로 또는 상태 범위를
        벗어났음을 의미합니다. 미디어 접근 권한이 없는 키는 이미지, 비디오, PDF URL을 null로 수신하며, 세션 write
        권한이 없는 키는 세션 링크와 token을 null로 수신합니다.
        https://docs.didit.me/console/api-keys 를 참고하십시오.

````

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