# Delivering to Your Own API

Source: https://docs.premiumqualifiedleads.com/webhooks-delivery-testing/delivering-to-your-own-api

If you already have a lead intake API, we post to it in your format. This is usually the least work for your team.

#### What we need from you

- Your API documentation: endpoint, required fields and accepted values (states, industries, credit bands, entity types).
- How you authenticate: an API key header, a Bearer token or Basic auth, and a test key.
- Whether you have a sandbox or test flag. If not, tell us how you want test leads marked.
- How you accept documents: as URLs in the payload, as a separate upload endpoint, or as base64.
- What you reply for success, for a duplicate and for a rejection.
- Whether you need our outbound IP addresses for an allowlist.

#### What we do

- Map our fields and picklist values to yours.
- Send your lead ID field the same value on every send, so a stage 2 update updates the same record. Most buyers use our `lead_record_id` for this.
- Read your reply. Success creates the delivery. A duplicate reply means the lead isn't charged to you. A rejection is logged with your reason.
- Retry on a 5xx, timeout or network error, never on a 4xx.

#### Testing

1. We send one or more marked test leads and share the results with you.
2. You confirm the records, field values and documents look right.
3. We go live at a small daily volume.

#### Duplicate replies we recognise

Any of these mark the lead as a duplicate you already had:

- `{"duplicate": true}` or `{"status": "duplicate"}`
- `{"success": false, "message": "Lead already exists"}`
- A plain-text reply of `duplicate`

If your system replies differently, tell us during setup.
