メールの受信:連絡先とフォローアップ

Get Contact

この人があなたのメールボックスでどんな存在か:会話、信頼、メモ、配信停止、フォローアップ、該当するルール、送信元のプロバイダー。

POSThttps://g.sendcorex.com/v1command: get_contact

件数は送受信それぞれ直近50通を対象にします。capped: trueはさらにあることを意味します。

引数

  • emailstring必須

    連絡先のアドレス。

クイックスタート

import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1',
  {
    commands: [
      {
        command: "get_contact",
        args: {
          email: "ana@client.com"
        }
      }
    ]
  },
  { headers: { Authorization: process.env.SENDCOREX_TOKEN } },
);

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

レスポンス

{
  "type": "SUCCESS",
  "results": [
    {
      "command": "get_contact",
      "id": "0",
      "type": "SUCCESS",
      "data": {
        "email": "ana@client.com",
        "name": "Ana Costa",
        "domain": "client.com",
        "provider": "microsoft_365",
        "free_email": false,
        "received": 18,
        "sent": 11,
        "conversations": 9,
        "capped": false,
        "first_at": "2026-03-02T02:10:00Z",
        "last_at": "2026-10-24T03:10:00Z",
        "recent": [
          {
            "thread_id": "thr_9a1c4e72",
            "subject": "Proposal",
            "date": "2026-10-24T03:10:00Z",
            "from_them": true,
            "unread": false
          }
        ],
        "trust": "trusted",
        "note": "VIP, prefers WhatsApp",
        "followups": [
          {
            "thread_id": "thr_9a1c4e72",
            "message_uid": "Vj0xQUJDMTIz",
            "status": "pending",
            "remind_at": "2026-10-29T01:00:00Z",
            "sent_at": "2026-10-26T01:00:00Z",
            "subject": "Proposal",
            "to_email": "ana@client.com",
            "created_at": "2026-10-26T01:00:00Z"
          }
        ],
        "matching_rules": [
          {
            "id": "Vj0xUlVMRTAx",
            "name": "Clients always in Inbox"
          }
        ]
      }
    }
  ]
}

レスポンスの項目

  • provider

    最後のメールの送信元(配信時に検証、Create Rule参照)。ない場合はドメインからの推定。

  • trust

    trusted、untrusted、default。

  • unsubscribed

    その人のリストから配信停止した場合に表示されます。

エラー

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

  • 401TOKEN_EXPIRED

    access tokenの有効期限が切れました。Refresh Tokenを呼んでリクエストを繰り返してください。

  • 401INVALID_TOKEN

    トークンの形式が不正、不明、または取り消されています。

  • 429RATE_LIMITED

    同じIP + メールボックスで毎秒15リクエストまたは同時15件を超えました。Retry-Afterの秒数だけ待ってください。

  • CMDINVALID_ARGS

    必須の引数がないか不正です。

  • CMDINTERNAL

    サーバーエラー。詳細はサーバーのログにのみ記録されます。