Quote API
Send what your customer entered, and get ranked carrier ads back, each with a tracked click link.
Use this API to show insurance ads and quotes inside your own app. Your server sends us what your customer entered. We return ads and, when the request has enough detail, priced quotes. Your app shows them, and clicks go through a link we give you.
Base URL: https://platform.clicklyft.com
What you get back: two lists. ads are click-through carrier ads. An ad names a carrier, and the customer sees the price on the carrier's own page after they click. quotes are priced offers from carriers: each has a carrier, a premium and a term, and the customer continues on the carrier's page to buy. Show both.
01How it works
- Your server sends us the fields in this spec, plus the end user's IP address and user agent.
- We return the ads in rank order and the quotes, cheapest first.
- Your app shows them. Each ad's and each quote's
click_urlis a link through us. - When your customer clicks, they pass through our link and land on the carrier. You make no extra call.
Make the request from your server. Never put your API key in a web page or a mobile app.
02Authentication
Send your API key on every request:
Authorization: Bearer clk_your_key_here- We give you the key once and cannot show it again. If it is lost or exposed, tell us and we will replace it.
- The key identifies your account. Never send an organization or account ID.
- A missing, wrong or revoked key returns
401with{"error":"invalid_api_key"}.
03Request
POST/direct/v1/quotes with Content-Type: application/json.
Unknown fields are rejected, at every level, so a typo cannot silently drop data.
Top-level fields
| Field | Type | Required | Valid values |
|---|---|---|---|
submission_key | string | Yes | 1 to 128 characters. Unique per submission. Send the same value to retry. |
reference_id | string | No | 1 to 128 characters. Your own order or customer ID. We return it. |
ip | string | Yes | The end user's IPv4 or IPv6 address, not your server's. |
ua | string | Yes | The end user's browser or app user agent, up to 512 characters, not your server's. |
url | string | No | The full URL of the page your customer was on. We store it as a record only. We do not read anything from it, including UTM parameters, and it is not sent to ad buyers. |
sub_1, sub_2, sub_3, sub_4, sub_5, sub_6 | string | No | Your own tracking values, up to six, each 1 to 128 characters, for example a traffic source or campaign. Send only the slots you use. We store them with the lead's session and do not interpret them. A slot you do not send stays empty: we never fill one from url or from UTM parameters. We pass them to our ad buyers to measure performance, so keep personal information out of them. |
consent | object | Yes | See below. |
data | object | Yes | See below. |
consent
| Field | Type | Required | Valid values |
|---|---|---|---|
text | string | Yes | The exact consent wording you showed, 1 to 5000 characters. |
timestamp | string | Yes | When you showed it. ISO 8601 with a time zone, for example 2026-11-20T10:00:00Z. Not in the future. |
certificate_url | string | No | A consent certificate URL, if you capture one. |
data
| Field | Type | Required | Valid values |
|---|---|---|---|
zip | string | Yes | 5 digits, for example 98101. |
vehicles | array | Yes | 1 to 4 vehicles. See below. |
state | string | No | 2 uppercase letters, for example WA. |
address | string | No | 1 to 200 characters. |
city | string | No | 1 to 80 characters. We keep it with the lead. It does not change which ads you get. |
email | string | No | A valid email address, up to 200 characters. |
phone | string | No | 10 digits, no punctuation, for example 2065550123. |
first_name | string | No | 1 to 60 characters. Send it with last_name: one without the other returns 400. |
last_name | string | No | 1 to 60 characters. Send it with first_name: one without the other returns 400. |
home_ownership | string | No | own, rent |
currently_insured | boolean | No | true, false |
current_company | string | No | aaa, allstate, direct_auto, farmers, geico, liberty_mutual, national_general, progressive, root, state_farm, travelers, the_general, usaa, other |
military_affiliation | boolean | No | true, false |
annual_mileage | integer | No | Miles driven a year, 1 to 100000. Needed to be priced a quote. See below. |
drivers | array | No | 0 or 1 driver. See below. |
Getting quotes
Ads need only zip and one vehicle. A quote is priced by a carrier, so it needs more. You get quotes when the request carries all of these:
first_name,last_name,email,phoneaddress,city,stateandzipannual_mileage- one driver in
drivers, withgenderandbirth_date - a vehicle with
year,makeandmodel(or avin), and withprimary_purposeandownedset totrue
Send what you have. If something is missing you still get ads, quotes is empty and num_quotes is 0. The response does not say which field was missing.
Quotes are available only while your account is in test mode, and they are sample prices. Until your account is live, a quote is not a real carrier price and has sample set to true. For a live account quotes is empty for now.
data.vehicles[]
| Field | Type | Required | Valid values |
|---|---|---|---|
vin | string | Yes, if you do not send year, make and model | 17 letters and digits, never I, O or Q, for example 1HGCM82633A004352. See below. |
year | integer | Yes, unless you send vin | 1980 up to next year. A number, not a string. |
make | string | Yes, unless you send vin | 1 to 50 characters, for example Toyota. |
model | string | Yes, unless you send vin | 1 to 80 characters, for example Camry. |
primary_purpose | string | No | commute, pleasure, business |
owned | boolean | No | true, false |
Sending a VIN. Send vin instead of year, make and model, and we look up the vehicle's year, make and model from it. We check the VIN's check digit first, so a mistyped VIN is refused instead of matched to the wrong car.
- If you send
year,makeandmodelas well, we use yours and do not look the VIN up. It must still be 17 letters and digits, but its check digit is not checked and the lookup cannot fail. - If you send only some of the three, the VIN fills in the rest and yours win.
- The lookup covers vehicles made from 1981 and sold in the US. For anything else, send
year,makeandmodel. - We use the VIN for the lookup only and do not keep it.
- The lookup runs only for a new submission. Retrying with the same
submission_keynever repeats it.
data.drivers[]
| Field | Type | Required | Valid values |
|---|---|---|---|
gender | string | No | male, female, other |
marital_status | string | No | married, single |
birth_date | string | No | YYYY-MM-DD |
education | string | No | some_high_school, high_school, bachelors_degree, masters_degree |
credit_rating | string | No | excellent, good, fair, poor |
license_status | string | No | active, expired |
Example
curl -X POST https://platform.clicklyft.com/direct/v1/quotes \
-H "Authorization: Bearer $CLICKLYFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"submission_key": "order-1001",
"reference_id": "order-1001",
"ip": "203.0.113.9",
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)",
"url": "https://example.com/checkout/confirmation",
"sub_1": "partner-42",
"consent": {
"text": "By clicking \"Get my quotes\", I agree to be contacted by insurance providers.",
"timestamp": "2026-11-20T10:00:00Z"
},
"data": {
"zip": "98101",
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Doe",
"vehicles": [
{ "year": 2019, "make": "Toyota", "model": "Camry", "primary_purpose": "commute" }
]
}
}'const res = await fetch("https://platform.clicklyft.com/direct/v1/quotes", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CLICKLYFT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"submission_key": "order-1001",
"reference_id": "order-1001",
"ip": "203.0.113.9",
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)",
"url": "https://example.com/checkout/confirmation",
"sub_1": "partner-42",
"consent": {
"text": "By clicking \"Get my quotes\", I agree to be contacted by insurance providers.",
"timestamp": "2026-11-20T10:00:00Z"
},
"data": {
"zip": "98101",
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Doe",
"vehicles": [
{
"year": 2019,
"make": "Toyota",
"model": "Camry",
"primary_purpose": "commute"
}
]
}
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://platform.clicklyft.com/direct/v1/quotes",
headers={"Authorization": f"Bearer {os.environ['CLICKLYFT_API_KEY']}"},
json={
"submission_key": "order-1001",
"reference_id": "order-1001",
"ip": "203.0.113.9",
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)",
"url": "https://example.com/checkout/confirmation",
"sub_1": "partner-42",
"consent": {
"text": "By clicking \"Get my quotes\", I agree to be contacted by insurance providers.",
"timestamp": "2026-11-20T10:00:00Z"
},
"data": {
"zip": "98101",
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Doe",
"vehicles": [
{
"year": 2019,
"make": "Toyota",
"model": "Camry",
"primary_purpose": "commute"
}
]
}
},
timeout=30,
)
data = res.json()04Response 200
{
"ads": [
{
"ad_id": "cm3k2x0ab0002abcd5678ijkl",
"rank": 0,
"carrier": "Example Carrier",
"headline": "Compare insurance options",
"description": "Get a personalized insurance quote.",
"display_url": "www.example.com",
"impr_html": null,
"small_image_url": "https://cdn.example.com/small.png",
"medium_image_url": null,
"large_image_url": null,
"click_url": "https://platform.clicklyft.com/direct/v1/r/cm3k2x0ab0002abcd5678ijkl.t4k9c2.Qm3x8WvR1sYb7eLz0pDk4g"
}
],
"num_ads": 1,
"quotes": [
{
"quote_id": "cm3k2x0ab0009abcd1234mnop",
"rank": 0,
"carrier": "Example Carrier",
"product": "Auto",
"premium_cents": 186000,
"currency": "USD",
"term_months": 6,
"billing_cycle": "pay_in_full",
"expires_at": "2026-12-29T06:48:52.410Z",
"sample": true,
"click_url": "https://platform.clicklyft.com/direct/v1/r/q_cm3k2x0ab0009abcd1234mnop.t4k9c2.Hs7d2KpQ1wZy3nVf8rLm5a"
}
],
"num_quotes": 1,
"request_id": "CL-3F9A1-C7E02",
"reference_id": "order-1001"
}| Field | Type | Meaning |
|---|---|---|
ads | array | The ads to show, in rank order. May be empty. |
num_ads | integer | The number of ads. |
quotes | array | The quotes to show, cheapest first. Often empty. See "Getting quotes". |
num_quotes | integer | The number of quotes. |
request_id | string | Our reference for this request. Quote it when you contact us. |
reference_id | string or null | Your reference_id, or null if you sent none. |
ads[]
| Field | Type | Meaning |
|---|---|---|
ad_id | string | Identifies this ad as shown to this customer. |
rank | integer | Position, starting at 0. Show the ads in this order. |
carrier | string or null | The carrier name. |
headline | string or null | The ad's headline. |
description | string or null | Descriptive text. It can contain HTML, so sanitize it. |
display_url | string or null | A web address to display with the ad. It is for display only, not the link. |
impr_html | string or null | Tracking markup supplied with some ads, returned as received. |
small_image_url, medium_image_url, large_image_url | string or null | Carrier images in three sizes. |
click_url | string | The link to use when the customer clicks. See below. |
quotes[]
| Field | Type | Meaning |
|---|---|---|
quote_id | string | Identifies this quote. It stays the same if you retry the request. |
rank | integer | Position, starting at 0, cheapest first. |
carrier | string | The carrier name. |
product | string or null | The carrier's product name. |
premium_cents | integer | The premium in minor units. 186000 with USD is $1,860.00. |
currency | string | The currency code, for example USD. |
term_months | integer or null | How long the policy runs. |
billing_cycle | string or null | pay_in_full or monthly. For monthly, premium_cents is the monthly amount. |
expires_at | string or null | When the quote stops being valid. We leave out quotes that have already expired. |
sample | boolean | true when the price is a sample from a test environment and not a real carrier price. Do not present a sample as a real price. |
click_url | string | The link to use when the customer continues. See below. |
Show a quote as a price offer, not as coverage, and not as a comparison of the whole market: it is one carrier's price, and the customer confirms the final terms on the carrier's page.
Handle these cases:
adsandquotescan each be empty. That is normal and still a200. Show your own fallback.- Every ad field except
ad_id,rankandclick_urlcan benull. - Ads carry no price. Quotes do.
05The click link
Use each ad's and each quote's click_url as the link, exactly as given. Do not change it or call it from your server.
- When the customer follows it, we record the click and redirect them to the carrier.
- It needs no API key.
- It stays valid for 24 hours. After that, or if it was altered, it shows a "link is no longer valid" page.
- Following it again sends the customer on again and does not count a second click.
- Requests that are not a real click, such as
HEADrequests and browser prefetches, are not counted.
06Testing
Before you send live traffic, send the same request to the test endpoint:
POST/direct/v1/test/quotes
- It uses your key, the same request body and the same validation. To go live, change only the path.
- It is answered by our own test service, not the carrier network, so it needs no carrier access.
- Nothing is saved on our side and no click is recorded, so test requests never reach reporting or revenue.
- The response has the live shape plus an
environmentfield set totest, and arequest_idthat starts withTEST-. A response from the live endpoint has noenvironmentfield. - Each ad's
click_urlgoes straight to a test page that says it was a test ad, not through our link. - Quotes work the same way when your test access includes them: sample prices from the carrier network's test environment, each
click_urlgoing straight to a test page. Nothing is saved. You get none if your test access does not include quotes or the request lacks the fields listed in "Getting quotes". - Test ads are seven recorded samples from the ad network's own test environment: the same seven every time, whatever the request says. Use them to check your integration and to see how real ads look. Their links go to a test page, and they do not show what live ads earn.
- If your test access is not set up yet, it returns
503with{"error":"test_not_configured"}.
Test accounts and the live endpoint
Your account starts in test mode and moves to live when your contract is signed. While it is in test mode, requests to the live endpoint, POST /direct/v1/quotes, run against the carriers' test environments. The lead is saved and shows in your dashboard's Test view, and its events appear in the Event Feed with environment set to test. Nothing earns real revenue. Requests to the test endpoint are saved nowhere, so they never appear in your dashboard or the Event Feed.
07Consent
Show your customer the consent wording, and send us exactly what you showed with the time you showed it. We keep both with the lead. A request without consent is rejected.
08Retries
If a request times out or fails, send it again with the same submission_key. You get the original lead back and no duplicate is created. A repeat returns the original lead even if the data differs, because the first submission is the one we keep. Use a new submission_key for each new submission.
A retry does not ask the carriers again. It returns the ads and quotes we already have for that lead. Each response gives each ad a new ad_id and click_url, and each quote a new click_url (its quote_id stays the same), so use the ones from the response you displayed. Because each response shows the ads again, each one adds offer.shown events to the Event Feed; the lead still has one lead.submitted event. The request waits for the carriers, so set a generous client timeout. We suggest 30 seconds.
09Errors
| Status | Body | Meaning |
|---|---|---|
| 400 | {"error":"invalid_request","errors":[{"field":"data.zip","message":"..."}]} | The request breaks this spec. errors names each field. Nothing was saved. The messages never include your values. |
| 400 | standard error with a message | The body is not valid JSON. |
| 401 | {"error":"invalid_api_key"} | The key is missing, wrong or revoked. |
| 400 | {"error":"invalid_request","errors":[{"field":"data.vehicles.0.vin","message":"..."}]} | A VIN's check digit is wrong, or we could not identify a vehicle from it. Nothing was saved. Fix the VIN, or send year, make and model. |
| 503 | {"error":"vin_lookup_unavailable"} | We could not look up a VIN right now. Nothing was saved. Retry with the same submission_key, or send year, make and model. |
| 503 | {"error":"test_not_configured"} | Test endpoint only: your test access is not set up yet. |
| 5xx | A fault on our side. Retry with the same submission_key. |
A slow or unavailable carrier never causes an error. You get 200 with an empty ads list.
10Go-live checklist
- The API key is on your server only.
- You send the required fields, using the valid values above.
ipanduaare the end user's, not your server's.- Ads are shown in
rankorder, each linking to itsclick_urlunchanged. consentholds the exact wording you showed and when.submission_keyis unique per submission and the same on retries.- Your page handles an empty
adslist. - You tested with
/direct/v1/test/quotes, then sent a live request and shared itsrequest_idwith us.
11Notes
- This is version 1, under
/direct/v1. We may add optional fields and new response fields without changing the version, so ignore response fields you do not recognize. - Sub slots you did not send used to be filled from the UTM parameters in
url. They no longer are: a slot you do not send stays empty, andurlis a record only. Leads stored before this change keep the values they had. - Do not log full request bodies. They contain personal information.
- We do not publish rate limits. Tell us before you run load tests.