# Buyer API Reference

Source: https://docs.premiumqualifiedleads.com/buyer-api/buyer-api-reference

Endpoints for approved buyers. Unless noted, send `Authorization: Bearer <token>` (see "API Authentication and Error Handling"). Some endpoints are switched on per account.

#### Authentication

| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/auth/buyer | Exchange your buyer API key for a token. |
| POST | /api/v1/auth/buyer/email | Portal sign-in with email and password. |

#### Leads

| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/buyer/leads | Paginated deliveries. Filters: page, pageSize, status, from, to. |
| GET | /api/v1/buyer/leads/:deliveryId | One delivery with its lead fields and outcome options. |
| GET | /api/v1/buyer/leads/:deliveryId/timeline | Lifecycle events and delivery attempts for one lead. |
| GET | /api/v1/buyer/leads/:deliveryId/conversation | Messages exchanged with the applicant. |
| GET | /api/v1/buyer/export | CSV of your delivered leads, including consent fields. |
| GET | /api/v1/buyer/stats?days=30 | Delivery, revenue and pacing stats. |
| GET | /api/v1/buyer/analytics?days=30 | Performance by source and campaign. |

#### Outcomes and quality

| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/buyer/leads/:deliveryId/outcome | Report what happened with a lead. |
| GET | /api/v1/buyer/return-policy | Your reporting window and the return reasons available to you. |
| POST | /api/v1/buyer/returns | Older returns endpoint; same rules as outcome. |
| GET | /api/v1/buyer/returns/history | Your past return requests. |
| POST | /api/v1/buyer/disputes | File a billing dispute. |
| GET | /api/v1/buyer/disputes/history | Your past disputes. |

#### Billing and conversions

| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/buyer/billing | Balance, invoices and ledger. |
| GET | /api/v1/buyer/statement?month=YYYY-MM | Monthly statement. |
| GET | /api/v1/buyer/invoices/:id/pdf | Download an invoice as PDF. |
| POST | /api/v1/buyer/conversions | Report a funded or closed deal. |

#### Controls and account

| Method | Path | Purpose |
|---|---|---|
| PATCH | /api/v1/buyer/pause | Pause or resume one or all of your offers. |
| PATCH | /api/v1/buyer/caps | Lower a daily cap. Increases go through your account manager. |
| GET / PATCH | /api/v1/buyer/account | View or edit notification email, CC emails, webhook URL, phone, SMS number and Google Sheets settings. |
| POST | /api/v1/buyer/test-delivery | Preview or send a test payload (`{"target": "preview"}` or `{"target": "webhook"}`). |
| GET | /api/v1/buyer/delivery-logs?limit=100 | Recent delivery attempts and your endpoint's replies. |
| GET | /api/v1/buyer/audit-log?limit=100 | Changes made on your account. |

#### CRM callbacks (partner API key)

These use your partner API key in the `x-api-key` header instead of a token.

| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/partners/:partnerKey/leads/:leadId/rep | Name the rep assigned to a lead. |
| GET | /api/v1/partners/:partnerKey/leads/:leadId/conversation | Pull the message history for a lead. |
| POST | /api/v1/partners/:partnerKey/events | Send a status update from your CRM. |

See "Assigned Rep, Conversations, and Status Updates".
