CP Platform APIドキュメント
外部開発者向けの公開REST API。 Base URL: https://api.cp-platform.com/v1
はじめに
- 1Developer Consoleでアプリを登録し、APIキーを発行してください。
- 2すべてのリクエストに
X-API-Key: cp_live_xxxヘッダーを含めてください。 - 3ユーザーに代わって呼び出すエンドポイントでは、
Authorization: Bearer <user_jwt>も一緒に送ってください。
Rate Limits
Content
60 req/min
Auth/Pay
60–120 req/min
Notify
30 req/min
エンドポイントリファレンス
Content API
プロンプト、ガイド、チュートリアルコンテンツの取得。特別な権限は不要(有効なAPIキーがあればOK)。
GET
/content— コンテンツ一覧?type=prompt|guide|tutorial|reference &tag=xxx &limit=20 &offset=0
curl https://api.cp-platform.com/v1/content \
-H "X-API-Key: cp_live_your_key"GET
/content/{slug}— コンテンツ単件(body含む)curl https://api.cp-platform.com/v1/content/getting-started \
-H "X-API-Key: cp_live_your_key"Auth Proxy
必要な権限: auth.verify
GET
/auth/userinfo— JWTトークンのユーザー情報取得curl https://api.cp-platform.com/v1/auth/userinfo \
-H "X-API-Key: cp_live_your_key" \
-H "Authorization: Bearer <user_jwt>"Pay Proxy
必要な権限: pay.subscriptions.read
GET
/pay/subscriptions— ユーザーのサブスクリプション一覧curl https://api.cp-platform.com/v1/pay/subscriptions \
-H "X-API-Key: cp_live_your_key" \
-H "Authorization: Bearer <user_jwt>"Notify Proxy
必要な権限: notify.email.send | notify.sms.send | notify.kakao.send
POST
/notify/send/email— メール送信curl -X POST https://api.cp-platform.com/v1/notify/send/email \
-H "X-API-Key: cp_live_your_key" \
-H "Authorization: Bearer <user_jwt>" \
-H "Content-Type: application/json" \
-d '{"to":"user@example.com","subject":"Hello","body":"<p>Hi</p>"}'POST
/notify/send/sms— SMS送信curl -X POST https://api.cp-platform.com/v1/notify/send/sms \
-H "X-API-Key: cp_live_your_key" \
-H "Authorization: Bearer <user_jwt>" \
-H "Content-Type: application/json" \
-d '{"to":"010-0000-0000","message":"こんにちは"}'POST
/notify/send/kakao— カカオ通知トーク送信(承認済みテンプレート)curl -X POST https://api.cp-platform.com/v1/notify/send/kakao \
-H "X-API-Key: cp_live_your_key" \
-H "Authorization: Bearer <user_jwt>" \
-H "Content-Type: application/json" \
-d '{"to":"010-0000-0000","template_code":"WELCOME","variables":{}}'Swagger UIで直接テストしてスキーマを確認できます
Swagger UIを開く →