Docs← Back to site
API reference · v1

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

  1. Your server sends us the fields in this spec, plus the end user's IP address and user agent.
  2. We return the ads in rank order and the quotes, cheapest first.
  3. Your app shows them. Each ad's and each quote's click_url is a link through us.
  4. 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:

Text
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 401 with {"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

FieldTypeRequiredValid values
submission_keystringYes1 to 128 characters. Unique per submission. Send the same value to retry.
reference_idstringNo1 to 128 characters. Your own order or customer ID. We return it.
ipstringYesThe end user's IPv4 or IPv6 address, not your server's.
uastringYesThe end user's browser or app user agent, up to 512 characters, not your server's.
urlstringNoThe 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_6stringNoYour 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.
consentobjectYesSee below.
dataobjectYesSee below.
FieldTypeRequiredValid values
textstringYesThe exact consent wording you showed, 1 to 5000 characters.
timestampstringYesWhen you showed it. ISO 8601 with a time zone, for example 2026-11-20T10:00:00Z. Not in the future.
certificate_urlstringNoA consent certificate URL, if you capture one.

data

FieldTypeRequiredValid values
zipstringYes5 digits, for example 98101.
vehiclesarrayYes1 to 4 vehicles. See below.
statestringNo2 uppercase letters, for example WA.
addressstringNo1 to 200 characters.
citystringNo1 to 80 characters. We keep it with the lead. It does not change which ads you get.
emailstringNoA valid email address, up to 200 characters.
phonestringNo10 digits, no punctuation, for example 2065550123.
first_namestringNo1 to 60 characters. Send it with last_name: one without the other returns 400.
last_namestringNo1 to 60 characters. Send it with first_name: one without the other returns 400.
home_ownershipstringNoown, rent
currently_insuredbooleanNotrue, false
current_companystringNoaaa, allstate, direct_auto, farmers, geico, liberty_mutual, national_general, progressive, root, state_farm, travelers, the_general, usaa, other
military_affiliationbooleanNotrue, false
annual_mileageintegerNoMiles driven a year, 1 to 100000. Needed to be priced a quote. See below.
driversarrayNo0 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, phone
  • address, city, state and zip
  • annual_mileage
  • one driver in drivers, with gender and birth_date
  • a vehicle with year, make and model (or a vin), and with primary_purpose and owned set to true

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[]

FieldTypeRequiredValid values
vinstringYes, if you do not send year, make and model17 letters and digits, never I, O or Q, for example 1HGCM82633A004352. See below.
yearintegerYes, unless you send vin1980 up to next year. A number, not a string.
makestringYes, unless you send vin1 to 50 characters, for example Toyota.
modelstringYes, unless you send vin1 to 80 characters, for example Camry.
primary_purposestringNocommute, pleasure, business
ownedbooleanNotrue, 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, make and model as 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, make and model.
  • 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_key never repeats it.

data.drivers[]

FieldTypeRequiredValid values
genderstringNomale, female, other
marital_statusstringNomarried, single
birth_datestringNoYYYY-MM-DD
educationstringNosome_high_school, high_school, bachelors_degree, masters_degree
credit_ratingstringNoexcellent, good, fair, poor
license_statusstringNoactive, 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" }
      ]
    }
  }'

04Response 200

JSON
{
  "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"
}
FieldTypeMeaning
adsarrayThe ads to show, in rank order. May be empty.
num_adsintegerThe number of ads.
quotesarrayThe quotes to show, cheapest first. Often empty. See "Getting quotes".
num_quotesintegerThe number of quotes.
request_idstringOur reference for this request. Quote it when you contact us.
reference_idstring or nullYour reference_id, or null if you sent none.

ads[]

FieldTypeMeaning
ad_idstringIdentifies this ad as shown to this customer.
rankintegerPosition, starting at 0. Show the ads in this order.
carrierstring or nullThe carrier name.
headlinestring or nullThe ad's headline.
descriptionstring or nullDescriptive text. It can contain HTML, so sanitize it.
display_urlstring or nullA web address to display with the ad. It is for display only, not the link.
impr_htmlstring or nullTracking markup supplied with some ads, returned as received.
small_image_url, medium_image_url, large_image_urlstring or nullCarrier images in three sizes.
click_urlstringThe link to use when the customer clicks. See below.

quotes[]

FieldTypeMeaning
quote_idstringIdentifies this quote. It stays the same if you retry the request.
rankintegerPosition, starting at 0, cheapest first.
carrierstringThe carrier name.
productstring or nullThe carrier's product name.
premium_centsintegerThe premium in minor units. 186000 with USD is $1,860.00.
currencystringThe currency code, for example USD.
term_monthsinteger or nullHow long the policy runs.
billing_cyclestring or nullpay_in_full or monthly. For monthly, premium_cents is the monthly amount.
expires_atstring or nullWhen the quote stops being valid. We leave out quotes that have already expired.
samplebooleantrue 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_urlstringThe 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:

  • ads and quotes can each be empty. That is normal and still a 200. Show your own fallback.
  • Every ad field except ad_id, rank and click_url can be null.
  • Ads carry no price. Quotes do.

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 HEAD requests 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 environment field set to test, and a request_id that starts with TEST-. A response from the live endpoint has no environment field.
  • Each ad's click_url goes 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_url going 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 503 with {"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.

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

StatusBodyMeaning
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.
400standard error with a messageThe 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.
5xxA 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.
  • ip and ua are the end user's, not your server's.
  • Ads are shown in rank order, each linking to its click_url unchanged.
  • consent holds the exact wording you showed and when.
  • submission_key is unique per submission and the same on retries.
  • Your page handles an empty ads list.
  • You tested with /direct/v1/test/quotes, then sent a live request and shared its request_id with 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, and url is 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.
Copied