連絡先:リスト
リストの更新
リストの名前、説明、入手元、カスタムデータを変更します。送った部分だけが変わります。
POST
https://g.sendcorex.com/v1/contactscommand: update_listAPI keyにcontact:updateスコープが必要です。
引数
list_idstring必須変更するリスト。id自体は変更できません。
例:
"customers"namestring任意新しい名前。
nullで消去します。descriptionstring任意新しい説明。
nullで消去します。sourcestring任意新しい入手元。
nullで消去します。customobject任意現在のカスタムデータに統合されます。
nullで送ったキーは削除されます。例:
{ "year": null, "owner": "sales" }
クイックスタート
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/contacts',
{
commands: [
{
command: "update_list",
args: {
list_id: "customers",
name: "Customers (VIP)",
custom: {
year: null,
owner: "sales"
}
}
}
]
},
{ 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": "update_list",
"id": "0",
"type": "SUCCESS",
"took_ms": 14,
"data": {
"list_id": "customers",
"name": "Customers (VIP)",
"description": "Everyone who bought at least once",
"source": "checkout",
"status": "ready",
"custom": {
"origin": "checkout",
"owner": "sales"
},
"created_at": "2026-10-01T10:00:00.000Z",
"updated_at": "2026-10-12T15:22:41.000Z",
"stats": {
"total": 1834,
"ok": 1790,
"opened": 912,
"clicked": 233
}
}
}
]
}レスポンスの項目
(list)変更後のリスト(
stats付き)。
エラー
HTTPレベルのエラーはtype、code、messageを返します。CMDと表示されたエラーは、HTTP 200でコマンドの結果内に返ります。
- 401
INVALID_API_KEYAPI keyが存在しないか、取り消されたか、ダッシュボードで無効化されています。
- 429
RATE_LIMITED同じIP + API keyで毎秒15リクエストまたは同時15件を超えました。Retry-Afterの秒数だけ待ってください。
- CMD
MISSING_SCOPEAPI keyにこのコマンドに必要なスコープがありません。リクエスト内のほかのコマンドは実行されます。
- CMD
INVALID_ARGS必須の引数がないか不正です:メールアドレス、項目の値、enumの選択肢、whereのキー、リストのid…
- CMD
NOT_FOUND連絡先、リスト、項目、またはセグメントが存在しません。
- CMD
INTERNALサーバーエラー。詳細はサーバーのログにのみ記録されます。