---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://docs.sendcorex.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://docs.sendcorex.com/llms.txt"
---

Source: https://docs.sendcorex.com/ja/api-reference/domains/setup/send-dns-instructions

ドメイン：設定のヘルプ

# DNS手順の送信

ドメインのDNSレコードを、DNSを管理する人（ITチーム、代理店、フリーランス）にメールで送ります。

POST `https://g.sendcorex.com/v1/domain` command: send_dns_instructions

API keyに`domain:read`スコープが必要です。

アカウントごとに毎分5回まで。超えるとコマンドは`RATE_LIMITED`を返します。

DKIMのアップグレード中は、現在のレコードではなく新しいレコード（まだ不足しているもの）がメールに載ります。

## 引数

- `domain` string 必須
ドメイン名。
例： `"acme.com"`
- `email` string 必須
手順を受け取る人。255文字まで。
例： `"it@acme.com"`

## クイックスタート

```
import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1/domain',
  {
    commands: [
      {
        command: "send_dns_instructions",
        args: {
          domain: "acme.com",
          email: "it@acme.com"
        }
      }
    ]
  },
  { headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);

const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);
```

## レスポンス

```
{
  "type": "SUCCESS",
  "results": [
    {
      "command": "send_dns_instructions",
      "id": "0",
      "type": "SUCCESS",
      "took_ms": 910,
      "data": {
        "domain": "acme.com",
        "sent_to": "it@acme.com"
      }
    }
  ]
}
```

### レスポンスの項目

- `domain`
ドメイン。
- `sent_to`
メールの送信先アドレス。

## メールの内容

- `レコード`
SPF、DKIM、Return-Path、DMARC。名前と値はそのままコピーできます。
- `送信者`
あなたのアカウント名。誰からの依頼かわかるようにします。

## エラー

HTTPレベルのエラーは`type`、`code`、`message`を返します。CMDと表示されたエラーは、HTTP 200でコマンドの結果内に返ります。

- 401`INVALID_API_KEY`
API keyが存在しないか、取り消されたか、ダッシュボードで無効化されています。
- 429`RATE_LIMITED`
同じIP + API keyで毎秒15リクエストまたは同時15件を超えました。Retry-Afterの秒数だけ待ってください。
- CMD`MISSING_SCOPE`
API keyにこのコマンドに必要なスコープがありません。
- CMD`INVALID_ARGS`
引数が不正です：`domain`がないか形式が不正、`key_size`が1024/2048以外、`email`が不正、説明が255文字超…
- CMD`DOMAIN_NOT_FOUND`
ドメインがアカウントにありません。
- CMD`SEND_FAILED`
手順のメールを送れませんでした。もう一度お試しください。
- CMD`USER_NOT_FOUND`
API keyのアカウントはもう存在しません。
- CMD`RATE_LIMITED`
直近1分間にアカウントがこのコマンドを呼びすぎました。1分待ってください。
- CMD`INTERNAL`
サーバーエラー。詳細はサーバーのログにのみ記録されます。
