빠른 시작(AI 에이전트용)
화면에서 하는 모든 일은 REST API·CLI·MCP 로도 할 수 있어요. 셋은 같은 API 키를 쓰고, Claude Code 같은 AI 에이전트가 Send를 툴로 부를 수 있어요. 요금은 보낸 통 수만(통당 ₩2), 연락처는 무제한이에요.
1. API 키
설정 → API 키에서 만들어요. 키는 만들 때 한 번만 보여요. 환경변수로 넘기거나 CLI에 저장해요.
export SEND_API_KEY=sd_live_…\nnpx send.ad login --key $SEND_API_KEY # ~/.sendad/config.json에 저장\nnpx send.ad whoami
2. 발신자 정보·브랜드 프로필
첫 발송 전에 회사명·주소·연락처(법규 푸터)가 있어야 해요. 브랜드 프로필(톤·제품·링크)은 AI가 쓰는 재료예요.
curl
curl -X PUT https://send.ad/api/v1/workspace -H "Authorization: Bearer $SEND_API_KEY" -H "content-type: application/json" \\\n -d '{"company_name":"주식회사 한빛","address":"서울 강남구 …","phone":"02-000-0000","brand_profile":{"tone":"친근한 존댓말","products":[{"name":"한빛 선물세트","url":"https://hanbit.kr/gift","price":"₩59,000"}]}}'3. 연락처 넣기
curl
npx send.ad contacts import ./mailchimp-export.csv --list 고객\n# 또는\ncurl -X POST https://send.ad/api/v1/contacts/bulk -H "Authorization: Bearer $SEND_API_KEY" -H "content-type: application/json" \\\n -d '{"contacts":[{"email":"kim@example.com","first_name":"민수","tags":["VIP"]}],"list_ids":["<list-uuid>"]}'4. 브리프 한 줄로 캠페인
curl
npx send.ad ai "추석 선물세트 20% 할인, 9/25까지, 무료배송" --list 고객\n# → 제목 3안 · 미리보기 주소 · 예상 비용. --send를 붙이면 바로 발송, --at로 예약.
Node.js
const r = await fetch('https://send.ad/api/v1/ai/campaign', { method: 'POST', headers: { authorization: \`Bearer \${process.env.SEND_API_KEY}\`, 'content-type': 'application/json' },\n body: JSON.stringify({ brief: '추석 선물세트 20% 할인, 9/25까지', list_names: ['고객'], send: false }) })\nconst { campaign, preview_url, estimate } = await r.json()\n// 확인 뒤 발송\nawait fetch(\`https://send.ad/api/v1/campaigns/\${campaign.id}/send\`, { method: 'POST', headers: { authorization: \`Bearer \${process.env.SEND_API_KEY}\` } })Python
import os, requests\nH = {"Authorization": f"Bearer {os.environ['SEND_API_KEY']}"}\nr = requests.post("https://send.ad/api/v1/ai/campaign", headers=H, json={"brief": "추석 선물세트 20% 할인, 9/25까지", "list_names": ["고객"], "send": False}).json()\nprint(r["preview_url"], r["estimate"])\nrequests.post(f"https://send.ad/api/v1/campaigns/{r['campaign']['id']}/send", headers=H)5. 결과
npx send.ad campaigns report <id> curl https://send.ad/api/v1/campaigns/<id>/report -H "Authorization: Bearer $SEND_API_KEY"
OpenAPI 명세: /api/v1/openapi.json · AI가 읽는 요약: /llms.txt · 에이전트 스킬: /skill.md