API Reference
REST API. JSON in / JSON out. Bearer token auth. The same engine that powers the dashboard, exposed for your CRM, lead form, or automation tool.
Authentication
Generate API keys at Settings → API access (Pro plan required). Pass them as a Bearer token:
Authorization: Bearer ap_live_xxxxxxxxxxxxxxxxxxxxxxxx
The key is shown onceat creation. Store it in your secret manager — we don’t keep a copy. Revoke any compromised key immediately from the same page.
All requests must use HTTPS. Base URL:
https://agencypitch.io/api/v1
Rate limits + reliability
Soft limit: 60 requests/minute per key. Hard limit enforced server-side. We respond with 429 when you exceed it. Generation endpoints (POST /proposals) are counted as 1 request even though they take 30–60s of model time.
Endpoints that take long (proposal generation) accept up to 90s. Set generous client-side timeouts.
POST /v1/proposals
Generate a complete proposal end-to-end (AI + persist).
curl -X POST https://agencypitch.io/api/v1/proposals \
-H "Authorization: Bearer ap_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"templateId": "seo-monthly-retainer",
"clientName": "Acme Corporation",
"clientWebsite": "https://acme.com",
"clientIndustry": "SaaS",
"customNotes": "They want to grow organic 40% in 6 months."
}'Response
{
"id": "abc123def456",
"publicId": "8x7Hf2KqAbc1",
"status": "draft",
"clientName": "Acme Corporation",
"templateUsed": "seo-monthly-retainer",
"publicUrl": "https://agencypitch.io/p/8x7Hf2KqAbc1",
"editUrl": "https://agencypitch.io/proposals/abc123def456"
}GET /v1/proposals
List your proposals. Query params: ?status= (draft, sent, viewed, accepted, rejected), ?limit= (1–100, default 50).
curl https://agencypitch.io/api/v1/proposals?status=sent&limit=20 \ -H "Authorization: Bearer ap_live_xxx"
GET /v1/proposals/:id
Fetch a single proposal with all sections + pricing + view stats.
curl https://agencypitch.io/api/v1/proposals/abc123def456 \ -H "Authorization: Bearer ap_live_xxx"
PATCH /v1/proposals/:id
Update clientName, clientEmail, or status. Setting status to "sent" / "accepted" / "rejected" stamps the corresponding timestamp.
curl -X PATCH https://agencypitch.io/api/v1/proposals/abc123 \
-H "Authorization: Bearer ap_live_xxx" \
-H "Content-Type: application/json" \
-d '{ "status": "sent" }'DELETE /v1/proposals/:id
Permanently delete a proposal. There is no undo.
curl -X DELETE https://agencypitch.io/api/v1/proposals/abc123 \ -H "Authorization: Bearer ap_live_xxx"
GET /v1/templates
List all available templates. Use the returned id as templateId when creating a proposal.
curl https://agencypitch.io/api/v1/templates \ -H "Authorization: Bearer ap_live_xxx"
Error responses
All errors return JSON with an error field.
| Status | Meaning |
|---|---|
400 | Invalid input. Check the field listed in error. |
401 | Missing, malformed, or revoked API key. |
402 | Plan doesn’t include API access. Upgrade to Pro. |
404 | Resource not found or doesn’t belong to your agency. |
429 | Rate limit exceeded. |
500 | Server error. Email support. |
Webhooks
Coming Q3 2026. Will fire on: proposal.viewed, proposal.accepted, proposal.rejected. Email support@agencypitch.io to be notified when they ship.