AutoPayPro Public API

REST endpoints for partner integrations. All responses are JSON. CORS is enabled.

Authentication

Every request must include your API key in the x-api-key header (or as Authorization: Bearer <key>).

x-api-key: app_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Two key types:
  • Admin keys — full read/write on all deals.
  • Partner keys — scoped to a single referrer_slug. Can only read/create/update their own deals.
Generate keys at /admin/api-keys. Keys are shown once at creation, then only the hash is stored — keep them safe.

Base URL

https://autopayproleads.io/api/public/v1

Endpoints

GET/api/public/v1/stats

High-level KPIs: deal counts by stage, projected monthly and annual commission, lifetime revenue & volume.

curl https://autopayproleads.io/api/public/v1/stats \
  -H "x-api-key: YOUR_KEY"
GET/api/public/v1/deals

List deals (partner keys see only their own). Optional: stage=pending|closed|completed, limit=1-500.

curl "https://autopayproleads.io/api/public/v1/deals?stage=closed&limit=50" \
  -H "x-api-key: YOUR_KEY"
POST/api/public/v1/deals

Create a new deal. Partner keys auto-set referrer_slug to the key's partner. Required: merchant_name.

curl -X POST https://autopayproleads.io/api/public/v1/deals \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_name": "Acme Auto",
    "contact_name": "Jane Doe",
    "contact_email": "jane@acme.com",
    "deal_amount": 250000,
    "category": "Auto dealer"
  }'
GET/api/public/v1/deals/{id}

Get a single deal with its uploaded statements. Contact PII is excluded.

curl https://autopayproleads.io/api/public/v1/deals/DEAL_UUID \
  -H "x-api-key: YOUR_KEY"
PATCH/api/public/v1/deals/{id}

Update a deal. Partner keys can only update their own. Allowed: pipeline_stage, deal_amount, notes, close_date, category. Admin keys can also update revenue_percentage, referrer_percentage, processing_rate_percentage, hold_status, source_group.

curl -X PATCH https://autopayproleads.io/api/public/v1/deals/DEAL_UUID \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "pipeline_stage": "completed", "close_date": "2026-06-30" }'
GET/api/public/v1/partners/{slug}

Public partner dashboard JSON — referred deals, share %, and projected partner cut.

curl https://autopayproleads.io/api/public/v1/partners/jetfuel \
  -H "x-api-key: YOUR_KEY"

Errors

  • 400 — bad request (missing/invalid body field)
  • 401 — missing or invalid API key
  • 403 — partner key trying to access a deal it doesn't own
  • 404 — resource not found
  • 500 — server error (check response body)