Developers
API Reference
Everything ColdPegion can do — agents, leads, campaigns, inbox, deliverability — over plain HTTPS + JSON. The REST API, the MCP server, and the in-app Sidekick execute the same operations, so anything an AI can do over MCP, your code can do here.
Authentication
Create an API key in Dashboard → Connect to Claude / API (keys start with cp_live_ and are shown once). The same key authenticates both this REST API and the MCP connector. Pass it as a bearer token:
curl https://coldpegion.com/api/v1/overview \
-H "Authorization: Bearer $COLDPEGION_API_KEY"Keys carry read and/or write scopes — each endpoint below lists what it needs. GET /v1/me returns your key's user, org, role, and scopes. Keys can be revoked anytime; only a SHA-256 hash is stored server-side.
Rate limits & idempotency
120 requests per minute per key. Every response includes X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a 429 adds Retry-After.
Retrying a mutating call? Send an Idempotency-Key header (any unique string). Replays within 24h return the original response with Idempotency-Replayed: true.
Errors & responses
Success responses wrap the payload in data; every response carries a request_id — include it when contacting support@coldpegion.com.
// 200
{ "data": { … }, "request_id": "req_…" }
// 4xx / 5xx
{ "error": { "type": "invalid_request_error", "message": "…", "param": "…" }, "request_id": "req_…" }| Status | Type | Meaning |
|---|---|---|
| 401 | authentication_error | Missing or invalid API key |
| 403 | permission_error | Key lacks the required scope |
| 400 | invalid_request_error | Malformed body or failed validation (param says which field) |
| 404 | not_found_error | Unknown endpoint or entity |
| 429 | rate_limit_error | Rate limit exceeded — honor Retry-After |
| 500 | api_error | Something broke on our side — safe to retry with an Idempotency-Key |
Entity references are forgiving: wherever a path takes an id, the entity's exact name (case-insensitive) also works — POST /v1/agents/Fintech%20Outbound/launch.
For AIs & tooling
- /docs/api.md — this entire reference as one markdown document, ideal for LLM context.
- /api/v1/openapi.json — OpenAPI 3.1, for codegen, Postman, and agents.
- /llms.txt — a site map for AI agents.
- Prefer MCP? The same operations are exposed at
https://coldpegion.com/api/mcp— see Connect Claude (MCP).
Account
/v1/overviewscope: readGet a high-level overview of the account: counts of agents, prospects, lists, products and mailboxes, plus the daily email limit.
curl https://coldpegion.com/api/v1/overview \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/companyscope: readGet the user's company profile.
curl https://coldpegion.com/api/v1/company \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/companyscope: writeCreate or update the company profile fields.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| companyName | string | optional | — |
| industry | string | optional | — |
| description | string | optional | — |
| valuePropositions | string | optional | — |
| toneOfVoice | string | optional | — |
curl -X PATCH https://coldpegion.com/api/v1/company \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"companyName":"…","industry":"…"}'/v1/settings/daily-limitscope: writeSet the global daily email limit (safety cap across all agents).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | required | — |
curl -X PATCH https://coldpegion.com/api/v1/settings/daily-limit \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":10}'Agents
/v1/campaignsscope: writeCreate a draft campaign from a brief with its offer and audience automatically. Does not send. Choose reviewMode: COLDPEGION (default, user approves in app), MCP_CLIENT (ask user in this client before approval), or AUTO (no review). Reuse requestId on retries. Then import contacts, configure_agent with senderEmails, set_agent_sequence or prepare_emails, review as required, and launch_agent.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| requestId | string | required | — |
| brief | string | required | — |
| timezone | string | optional | — |
| reviewMode | "MCP_CLIENT" | "COLDPEGION" | "AUTO" | optional | — |
curl -X POST https://coldpegion.com/api/v1/campaigns \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"requestId":"…","brief":"…"}'/v1/agents/{agent}/contactsscope: readPage through this campaign's contacts to write individually personalized emails. Use only supplied facts. DNC contacts must not be contacted. Cursor is the last returned prospect id.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| cursor | string | optional | — |
| limit | integer | optional | — |
curl https://coldpegion.com/api/v1/agents/{agent}/contacts \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/agents/{agent}/reviewscope: readRead exact per-recipient messages, revisions, reviewEpoch and approval states. In MCP_CLIENT mode show these to the user and ask approval before approve_campaign_emails. In COLDPEGION mode send the user to reviewUrl. Pagination must be respected; never approve unseen pages.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| cursor | string | optional | — |
| limit | integer | optional | — |
curl https://coldpegion.com/api/v1/agents/{agent}/review \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/agents/{agent}/review/preparescope: writeMaterialize a small batch of exact per-person messages for review from a static/AI campaign. Built-in AI usage is charged for generated messages. For EXTERNAL campaigns write each person's message yourself with prepare_emails instead. Repeat while remaining > 0, then get_campaign_review.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
curl -X POST https://coldpegion.com/api/v1/agents/{agent}/review/prepare \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/agentsscope: readList AI agents with status and how many emails each has sent.
curl https://coldpegion.com/api/v1/agents \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/agentsscope: writeCreate an AI outreach agent, wiring up products, a target list, sender mailbox(es) and guidelines. Does NOT launch it.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | — |
| description | string | optional | — |
| listName | string | required | — |
| productNames | string[] | optional | — |
| senderEmails | string[] | optional | — |
| sequenceMode | "AI_GENERATED" | "STATIC" | "EXTERNAL" | optional | — |
| guidelines | string | optional | — |
| reviewMode | "MCP_CLIENT" | "COLDPEGION" | "AUTO" | optional | — |
curl -X POST https://coldpegion.com/api/v1/agents \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"…","listName":"…"}'/v1/agents/{agent}scope: writeUpdate an agent's sending cadence, daily limit, schedule, guidelines or sequence mode.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| guidelines | string | optional | — |
| sequenceMode | "AI_GENERATED" | "STATIC" | "EXTERNAL" | optional | — |
| dailyEmailLimit | integer | optional | — |
| minIntervalMinutes | integer | optional | — |
| maxIntervalMinutes | integer | optional | — |
| randomDelayMax | integer | optional | — |
| scheduleStartHour | integer | optional | — |
| scheduleEndHour | integer | optional | — |
| scheduleDays | string | optional | — |
| scheduleTimezone | string | optional | — |
| senderEmails | string[] | optional | — |
curl -X PATCH https://coldpegion.com/api/v1/agents/{agent} \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"guidelines":"…","sequenceMode":"AI_GENERATED"}'/v1/agents/{agent}/launchscope: writeLaunch a campaign. MCP_CLIENT requires user-confirmed approval of exact email revisions first. COLDPEGION requires approval in the app. AUTO needs no review. Normal sender, suppression and schedule checks always apply.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
curl -X POST https://coldpegion.com/api/v1/agents/{agent}/launch \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/agents/{agent}/pausescope: writePause an agent so it stops sending.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
curl -X POST https://coldpegion.com/api/v1/agents/{agent}/pause \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/agents/{agent}/clonescope: writeDuplicate an existing agent's configuration as a new DRAFT.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
curl -X POST https://coldpegion.com/api/v1/agents/{agent}/clone \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/agents/{agent}/sequencescope: writeSet an agent's static multi-step sequence (subject/body templates with {{firstName}}, {{companyName}}, {{jobTitle}} variables). Bodies accept plain text or safe HTML fragments (p, strong, em, ul/li, a). Unsafe HTML is removed at delivery. No platform LLM is used. Pause before changing content; earlier approvals are invalidated.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| steps | object[] | required | — |
curl -X PUT https://coldpegion.com/api/v1/agents/{agent}/sequence \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"steps":[{}]}'/v1/agents/{agent}/prepared-emailsscope: writeBulk-push pre-written, per-lead emails for an agent (one unique email per prospect). Bodies accept plain text or safe HTML fragments (p, strong, em, ul/li, a). The worker sanitizes HTML and sends with NO platform LLM call — AI marketing at scale, paid by your own Claude. Up to 500 items/call; paginate for more. Switches the agent to EXTERNAL mode by default.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| agent | string | required | Entity id — or its exact name (case-insensitive). |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| items | object[] | required | — |
| setExternalMode | boolean | optional | — |
curl -X POST https://coldpegion.com/api/v1/agents/{agent}/prepared-emails \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"items":[{}]}'Leads & prospects
/v1/verification/emailscope: writeVerify an address using the user's selected verifier: ZeroBounce or BillionVerify with their saved key, otherwise built-in checks. May consume their provider credits. UNKNOWN means mailbox existence was not established; never describe it as valid. Results update an owned prospect if present. No email is sent.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| string | required | — |
curl -X POST https://coldpegion.com/api/v1/verification/email \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"…"}'/v1/prospect-listsscope: readList prospect lists with their prospect counts.
curl https://coldpegion.com/api/v1/prospect-lists \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/prospect-listsscope: writeCreate a new (empty) prospect list.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | — |
curl -X POST https://coldpegion.com/api/v1/prospect-lists \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"…"}'/v1/prospectsscope: writeAdd a single prospect to a list (creates/updates the prospect).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| listName | string | required | — |
| string | required | Prospect email address | |
| firstName | string | optional | — |
| lastName | string | optional | — |
| companyName | string | optional | — |
| jobTitle | string | optional | — |
| industry | string | optional | — |
| location | string | optional | — |
| timezone | string | optional | — |
| seniority | string | optional | — |
| department | string | optional | — |
| phone | string | optional | — |
| website | string | optional | — |
curl -X POST https://coldpegion.com/api/v1/prospects \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"listName":"…","email":"…"}'/v1/prospects/importscope: writeBulk-import leads into a list (creates the list if it doesn't exist). Use this to push leads you mined from other connectors. Up to 500 per call — paginate for more.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| listName | string | required | — |
| leads | object[] | required | — |
curl -X POST https://coldpegion.com/api/v1/prospects/import \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"listName":"…","leads":[{}]}'/v1/leads/searchscope: readSearch for leads (Instantly/Apollo-style) by filters, in the shared lead database, the user's prospects, or Apollo (if configured). Optionally import the results into a list.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| jobTitles | string[] | optional | — |
| seniorities | string[] | optional | — |
| industries | string[] | optional | — |
| locations | string[] | optional | — |
| headcount | string[] | optional | — |
| keywords | string[] | optional | — |
| source | "global" | "database" | "apollo" | optional | — |
| importIntoListName | string | optional | — |
| limit | integer | optional | — |
curl -X POST https://coldpegion.com/api/v1/leads/search \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jobTitles":["…"],"seniorities":["…"]}'/v1/prospects/do-not-contactscope: writeAdd or remove a prospect from the do-not-contact (DNC) list by email. DNC prospects are skipped by all campaigns.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| string | required | Prospect email address | |
| block | boolean | optional | — |
curl -X PUT https://coldpegion.com/api/v1/prospects/do-not-contact \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"…"}'/v1/suppressionsscope: writeAdd email addresses or whole domains (e.g. 'acme.com') to the global suppression list. Suppressed addresses are NEVER emailed by any campaign, even if imported as prospects later — use for compliance opt-outs, customers, competitors.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| values | string[] | required | Emails ('a@b.com') and/or domains ('b.com' or '@b.com') |
curl -X POST https://coldpegion.com/api/v1/suppressions \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"values":["…"]}'Products
/v1/productsscope: readList the user's products with their ICP.
curl https://coldpegion.com/api/v1/products \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/productsscope: writeCreate a new product the agents can market. Optionally include an ICP description.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | — |
| description | string | optional | — |
| usps | string | optional | — |
| targetAudience | string | optional | — |
| icpPrompt | string | optional | — |
curl -X POST https://coldpegion.com/api/v1/products \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"…"}'/v1/products/{product}scope: writeUpdate an existing product by id or name.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product | string | required | Entity id — or its exact name (case-insensitive). |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | optional | — |
| description | string | optional | — |
| usps | string | optional | — |
| targetAudience | string | optional | — |
| icpPrompt | string | optional | — |
curl -X PATCH https://coldpegion.com/api/v1/products/{product} \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"…","description":"…"}'/v1/products/{product}scope: writeDelete a product. Destructive — only call with confirm:true after the user explicitly confirms.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product | string | required | Entity id — or its exact name (case-insensitive). |
curl -X DELETE https://coldpegion.com/api/v1/products/{product} \
-H "Authorization: Bearer $COLDPEGION_API_KEY"Mailboxes & deliverability
/v1/email-accountsscope: readList the mailboxes available to the user (owned, assigned, or shared by the org), with provider and daily usage.
curl https://coldpegion.com/api/v1/email-accounts \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/deliverabilityscope: readGet per-domain and per-mailbox deliverability stats (sent, reply rate, bounce rate, today's utilization) to decide which mailbox/domain to send from. Pro plan module.
curl https://coldpegion.com/api/v1/deliverability \
-H "Authorization: Bearer $COLDPEGION_API_KEY"Inbox
/v1/inbox/repliesscope: readGet the most recent inbound replies with their AI category (INTERESTED, NOT_INTERESTED, etc.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | optional | — |
curl https://coldpegion.com/api/v1/inbox/replies \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/inbox/syncscope: writePull new inbound mail over IMAP for the user's mailboxes and detect replies now.
curl -X POST https://coldpegion.com/api/v1/inbox/sync \
-H "Authorization: Bearer $COLDPEGION_API_KEY"Team
/v1/teamscope: readList organization members (with roles) and any pending join requests.
curl https://coldpegion.com/api/v1/team \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/team/invitesscope: writeInvite a teammate to the organization by email (admins only).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| string | required | Email address to invite | |
| role | "ADMIN" | "MEMBER" | optional | — |
curl -X POST https://coldpegion.com/api/v1/team/invites \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"…"}'/v1/team/join-requestsscope: writeApprove or deny a pending join request by the requester's email (admins only).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| string | required | Email address of the requester | |
| action | "approve" | "deny" | optional | — |
curl -X POST https://coldpegion.com/api/v1/team/join-requests \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"…"}'/v1/team/membersscope: writeChange an organization member's role (admins only; only an owner can grant OWNER).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| string | required | Email address of the member | |
| role | "OWNER" | "ADMIN" | "MEMBER" | required | — |
curl -X PATCH https://coldpegion.com/api/v1/team/members \
-H "Authorization: Bearer $COLDPEGION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"…","role":"OWNER"}'Help
/v1/help/topicsscope: readList all ColdPegion help guides (slug, title, description, category). Use this to discover which guide answers a how-to or product question.
curl https://coldpegion.com/api/v1/help/topics \
-H "Authorization: Bearer $COLDPEGION_API_KEY"/v1/help/guidesscope: readGet the full content of a ColdPegion help guide. Pass an exact slug (from list_help_topics) or a free-text question (e.g. 'how do I connect gmail') and the best-matching guides are returned as markdown. ALWAYS use this to answer how-to, setup, billing, deliverability, or troubleshooting questions instead of guessing.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| slugOrQuery | string | required | A guide slug, or a free-text question to search for |
curl https://coldpegion.com/api/v1/help/guides \
-H "Authorization: Bearer $COLDPEGION_API_KEY"