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_…" }
StatusTypeMeaning
401authentication_errorMissing or invalid API key
403permission_errorKey lacks the required scope
400invalid_request_errorMalformed body or failed validation (param says which field)
404not_found_errorUnknown endpoint or entity
429rate_limit_errorRate limit exceeded — honor Retry-After
500api_errorSomething 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

Account

GET/v1/overviewscope: read

Get 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"
GET/v1/companyscope: read

Get the user's company profile.

curl https://coldpegion.com/api/v1/company \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
PATCH/v1/companyscope: write

Create or update the company profile fields.

Body parameters

NameTypeRequiredDescription
companyNamestringoptional—
industrystringoptional—
descriptionstringoptional—
valuePropositionsstringoptional—
toneOfVoicestringoptional—
curl -X PATCH https://coldpegion.com/api/v1/company \
  -H "Authorization: Bearer $COLDPEGION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"companyName":"…","industry":"…"}'
PATCH/v1/settings/daily-limitscope: write

Set the global daily email limit (safety cap across all agents).

Body parameters

NameTypeRequiredDescription
limitintegerrequired—
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

POST/v1/campaignsscope: write

Create 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

NameTypeRequiredDescription
requestIdstringrequired—
briefstringrequired—
timezonestringoptional—
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":"…"}'
GET/v1/agents/{agent}/contactsscope: read

Page 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

NameTypeRequiredDescription
agentstringrequiredEntity id — or its exact name (case-insensitive).

Query parameters

NameTypeRequiredDescription
cursorstringoptional—
limitintegeroptional—
curl https://coldpegion.com/api/v1/agents/{agent}/contacts \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
GET/v1/agents/{agent}/reviewscope: read

Read 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

NameTypeRequiredDescription
agentstringrequiredEntity id — or its exact name (case-insensitive).

Query parameters

NameTypeRequiredDescription
cursorstringoptional—
limitintegeroptional—
curl https://coldpegion.com/api/v1/agents/{agent}/review \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
POST/v1/agents/{agent}/review/preparescope: write

Materialize 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

NameTypeRequiredDescription
agentstringrequiredEntity 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"
GET/v1/agentsscope: read

List AI agents with status and how many emails each has sent.

curl https://coldpegion.com/api/v1/agents \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
POST/v1/agentsscope: write

Create an AI outreach agent, wiring up products, a target list, sender mailbox(es) and guidelines. Does NOT launch it.

Body parameters

NameTypeRequiredDescription
namestringrequired—
descriptionstringoptional—
listNamestringrequired—
productNamesstring[]optional—
senderEmailsstring[]optional—
sequenceMode"AI_GENERATED" | "STATIC" | "EXTERNAL"optional—
guidelinesstringoptional—
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":"…"}'
PATCH/v1/agents/{agent}scope: write

Update an agent's sending cadence, daily limit, schedule, guidelines or sequence mode.

Path parameters

NameTypeRequiredDescription
agentstringrequiredEntity id — or its exact name (case-insensitive).

Body parameters

NameTypeRequiredDescription
guidelinesstringoptional—
sequenceMode"AI_GENERATED" | "STATIC" | "EXTERNAL"optional—
dailyEmailLimitintegeroptional—
minIntervalMinutesintegeroptional—
maxIntervalMinutesintegeroptional—
randomDelayMaxintegeroptional—
scheduleStartHourintegeroptional—
scheduleEndHourintegeroptional—
scheduleDaysstringoptional—
scheduleTimezonestringoptional—
senderEmailsstring[]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"}'
POST/v1/agents/{agent}/launchscope: write

Launch 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

NameTypeRequiredDescription
agentstringrequiredEntity id — or its exact name (case-insensitive).
curl -X POST https://coldpegion.com/api/v1/agents/{agent}/launch \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
POST/v1/agents/{agent}/pausescope: write

Pause an agent so it stops sending.

Path parameters

NameTypeRequiredDescription
agentstringrequiredEntity id — or its exact name (case-insensitive).
curl -X POST https://coldpegion.com/api/v1/agents/{agent}/pause \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
POST/v1/agents/{agent}/clonescope: write

Duplicate an existing agent's configuration as a new DRAFT.

Path parameters

NameTypeRequiredDescription
agentstringrequiredEntity id — or its exact name (case-insensitive).
curl -X POST https://coldpegion.com/api/v1/agents/{agent}/clone \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
PUT/v1/agents/{agent}/sequencescope: write

Set 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

NameTypeRequiredDescription
agentstringrequiredEntity id — or its exact name (case-insensitive).

Body parameters

NameTypeRequiredDescription
stepsobject[]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":[{}]}'
POST/v1/agents/{agent}/prepared-emailsscope: write

Bulk-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

NameTypeRequiredDescription
agentstringrequiredEntity id — or its exact name (case-insensitive).

Body parameters

NameTypeRequiredDescription
itemsobject[]required—
setExternalModebooleanoptional—
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":[{}]}'
POST/v1/authoring/campaign-contentscope: write

Use AI to write campaign guidelines and/or a multi-step email sequence, then optionally save them onto an agent.

Body parameters

NameTypeRequiredDescription
what"guidelines" | "sequence" | "both"optional—
productNamesstring[]optional—
campaignGoalstringoptional—
applyToAgentstringoptional—
curl -X POST https://coldpegion.com/api/v1/authoring/campaign-content \
  -H "Authorization: Bearer $COLDPEGION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"what":"guidelines","productNames":["…"]}'

Leads & prospects

POST/v1/verification/emailscope: write

Verify 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

NameTypeRequiredDescription
emailstringrequired—
curl -X POST https://coldpegion.com/api/v1/verification/email \
  -H "Authorization: Bearer $COLDPEGION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"…"}'
GET/v1/prospect-listsscope: read

List prospect lists with their prospect counts.

curl https://coldpegion.com/api/v1/prospect-lists \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
POST/v1/prospect-listsscope: write

Create a new (empty) prospect list.

Body parameters

NameTypeRequiredDescription
namestringrequired—
curl -X POST https://coldpegion.com/api/v1/prospect-lists \
  -H "Authorization: Bearer $COLDPEGION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'
POST/v1/prospectsscope: write

Add a single prospect to a list (creates/updates the prospect).

Body parameters

NameTypeRequiredDescription
listNamestringrequired—
emailstringrequiredProspect email address
firstNamestringoptional—
lastNamestringoptional—
companyNamestringoptional—
jobTitlestringoptional—
industrystringoptional—
locationstringoptional—
timezonestringoptional—
senioritystringoptional—
departmentstringoptional—
phonestringoptional—
websitestringoptional—
curl -X POST https://coldpegion.com/api/v1/prospects \
  -H "Authorization: Bearer $COLDPEGION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"listName":"…","email":"…"}'
POST/v1/prospects/importscope: write

Bulk-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

NameTypeRequiredDescription
listNamestringrequired—
leadsobject[]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":[{}]}'
POST/v1/leads/searchscope: read

Search 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

NameTypeRequiredDescription
jobTitlesstring[]optional—
senioritiesstring[]optional—
industriesstring[]optional—
locationsstring[]optional—
headcountstring[]optional—
keywordsstring[]optional—
source"global" | "database" | "apollo"optional—
importIntoListNamestringoptional—
limitintegeroptional—
curl -X POST https://coldpegion.com/api/v1/leads/search \
  -H "Authorization: Bearer $COLDPEGION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jobTitles":["…"],"seniorities":["…"]}'
PUT/v1/prospects/do-not-contactscope: write

Add or remove a prospect from the do-not-contact (DNC) list by email. DNC prospects are skipped by all campaigns.

Body parameters

NameTypeRequiredDescription
emailstringrequiredProspect email address
blockbooleanoptional—
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":"…"}'
POST/v1/suppressionsscope: write

Add 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

NameTypeRequiredDescription
valuesstring[]requiredEmails ('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

GET/v1/productsscope: read

List the user's products with their ICP.

curl https://coldpegion.com/api/v1/products \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
POST/v1/productsscope: write

Create a new product the agents can market. Optionally include an ICP description.

Body parameters

NameTypeRequiredDescription
namestringrequired—
descriptionstringoptional—
uspsstringoptional—
targetAudiencestringoptional—
icpPromptstringoptional—
curl -X POST https://coldpegion.com/api/v1/products \
  -H "Authorization: Bearer $COLDPEGION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'
PATCH/v1/products/{product}scope: write

Update an existing product by id or name.

Path parameters

NameTypeRequiredDescription
productstringrequiredEntity id — or its exact name (case-insensitive).

Body parameters

NameTypeRequiredDescription
namestringoptional—
descriptionstringoptional—
uspsstringoptional—
targetAudiencestringoptional—
icpPromptstringoptional—
curl -X PATCH https://coldpegion.com/api/v1/products/{product} \
  -H "Authorization: Bearer $COLDPEGION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…","description":"…"}'
DELETE/v1/products/{product}scope: write

Delete a product. Destructive — only call with confirm:true after the user explicitly confirms.

Path parameters

NameTypeRequiredDescription
productstringrequiredEntity 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

GET/v1/email-accountsscope: read

List 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"
GET/v1/deliverabilityscope: read

Get 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

GET/v1/inbox/repliesscope: read

Get the most recent inbound replies with their AI category (INTERESTED, NOT_INTERESTED, etc.).

Query parameters

NameTypeRequiredDescription
limitintegeroptional—
curl https://coldpegion.com/api/v1/inbox/replies \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
POST/v1/inbox/syncscope: write

Pull 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

GET/v1/teamscope: read

List organization members (with roles) and any pending join requests.

curl https://coldpegion.com/api/v1/team \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"
POST/v1/team/invitesscope: write

Invite a teammate to the organization by email (admins only).

Body parameters

NameTypeRequiredDescription
emailstringrequiredEmail 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":"…"}'
POST/v1/team/join-requestsscope: write

Approve or deny a pending join request by the requester's email (admins only).

Body parameters

NameTypeRequiredDescription
emailstringrequiredEmail 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":"…"}'
PATCH/v1/team/membersscope: write

Change an organization member's role (admins only; only an owner can grant OWNER).

Body parameters

NameTypeRequiredDescription
emailstringrequiredEmail 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

GET/v1/help/topicsscope: read

List 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"
GET/v1/help/guidesscope: read

Get 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

NameTypeRequiredDescription
slugOrQuerystringrequiredA guide slug, or a free-text question to search for
curl https://coldpegion.com/api/v1/help/guides \
  -H "Authorization: Bearer $COLDPEGION_API_KEY"