> ## 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 - トラベルルール無料参加

> ドメイン認証コードをメールで送信します。Didit Management APIがワークスペースの業務用アドレスにワンタイムコードを送り、メールドメインを管理していることを証明します。

ドメインコード送信APIプロンプト
プロンプトをクリップボードにコピー

<pre>
  \`Emails a single-use code to the workspace's work address to prove it controls the email domain. Throttled, and a limited number of wrong attempts is accepted per code. Also returns the TXT record for the DNS alternative.

  Endpoint:
  POST [https://verification.didit.me/v3/travel-rule/workspace/domain/code/](https://verification.didit.me/v3/travel-rule/workspace/domain/code/)

  Authentication:
  Use the x-api-key header with the API key returned when the account was created.

  Failure modes:

  * 404 - This application did not join free, so it has no free workspace.

  Guide: /transaction-monitoring/travel-rule-interoperability#email-pickup.\`
</pre>

貼り付け先


## OpenAPI

````yaml ja/openapi-25.json POST /v3/travel-rule/workspace/domain/code/
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/travel-rule/workspace/domain/code/:
    post:
      tags:
        - Travel Rule
      summary: ドメイン認証コードをメールで送信
      description: >-
        ワークスペースの業務用メールアドレスにワンタイムコードをメールで送信し、そのメールドメインを管理していることを証明します。送信回数には制限があり、コード1件あたりに許容される誤入力の回数も限られています。DNSによる代替手段用のTXTレコードも返します。
      operationId: sendTravelRuleWorkspaceDomainCode
      responses:
        '200':
          description: ドメイン、そのステータス、TXTレコードです。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWorkspaceDomainCodeResponse'
        '404':
          description: このアプリケーションは無料で参加していないため、無料のワークスペースがありません。
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            https://verification.didit.me/v3/travel-rule/workspace/domain/code/
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.travel_rule.workspace.send_domain_code()
            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.travelRule.workspace.sendDomainCode();
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.SendDomainCode(ctx)\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.travelRule().workspace().sendDomainCode();
            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->travelRule->workspace->sendDomainCode();
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.travel_rule.workspace.send_domain_code
            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.TravelRule.Workspace.SendDomainCodeAsync();

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleWorkspaceDomainCodeResponse:
      type: object
      properties:
        domain:
          type: string
        status:
          type: string
          enum:
            - unverified
            - code_sent
            - verified
        txt:
          $ref: '#/components/schemas/TravelRuleWorkspaceTxtRecord'
    TravelRuleWorkspaceTxtRecord:
      type: object
      description: DNS証明のために公開するTXTレコードです。証明が開始されるまでは空です。
      properties:
        host:
          type: string
          example: didit-tr-verify.example.com
        value:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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