Skip to navigation

Quickstart

Get your first sandbox quote with curl.
View as Markdown

This guide runs one personal auto quote in the sandbox. Sandbox prices are synthetic, so they aren’t carrier prices.

Before you start

Create a sandbox key on the Developer sandbox page of the portal. It starts with trv_sandbox_. Put it in an environment variable for the examples below:

export TRUVO_API_KEY="trv_sandbox_..."

Every request goes to https://api.truvo.com/v1/ with the key as a bearer token. See Keys and environments.

1

Check what your key can do

curl https://api.truvo.com/v1/capabilities \
-H "Authorization: Bearer $TRUVO_API_KEY" \
-H "Truvo-Version: 2026-09-26"

The response gives the line, the environment, a JSON Schema of the facts the line requires, and the action types your key can use.

A sandbox key gets the same states as a live key. The request below uses a Texas address, which every line covers.

The response also gives Truvo’s quote disclosure in quote_disclosure. Before you ask for quotes, show the person its text as written and ask whether they agree.

2

Start a quote request

Send the facts for one line. This personal auto request has one driver and one vehicle, and every value in it is synthetic. In the sandbox, it returns one quote; see What the sandbox returns.

curl -X POST https://api.truvo.com/v1/quote-requests \
-H "Authorization: Bearer $TRUVO_API_KEY" \
-H "Truvo-Version: 2026-09-26" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"line": "personal_auto",
"quote_disclosure_version": "2026-10-06.1",
"quote_disclosure_accepted": true,
"application": {
"applicant": {
"first_name": "Test",
"last_name": "Applicant One",
"email": "alex@example.com",
"phone": "512-555-0123"
},
"garaging_address": {
"line1": "100 Example Way",
"line2": null,
"city": "Austin",
"state": "TX",
"postal_code": "78701"
},
"drivers": [
{
"first_name": "Test",
"last_name": "Applicant One",
"date_of_birth": "1990-04-12",
"gender": "female"
}
],
"vehicles": [
{
"vin": "SYNTHVIN000000001",
"year": 2019,
"make": "Toyota",
"model": "Camry",
"ownership": "owned",
"use": "pleasure",
"annual_mileage": 8000,
"comprehensive_deductible_minor": 100000,
"collision_deductible_minor": 100000
}
],
"protection": {
"bodily_injury_per_person_minor": 10000000,
"bodily_injury_per_accident_minor": 30000000,
"property_damage_minor": 5000000
}
}
}'

In this body:

  • quote_disclosure_version is the version from quote_disclosure in the first step, and quote_disclosure_accepted is true once the person agrees. Their yes covers the quote and contact by phone, text, and email, and for auto it lets carriers check credit. Truvo runs no credit check. See The quote disclosure.
  • Every request needs the person’s email and a US phone number.
  • For auto, driver 1 is the named insured, and the API takes the applicant’s date of birth from driver 1.
  • Money values are integer amounts in US cents: 10000000 is $100,000.00.

The API answers 202 with a quote request whose status is in_progress. Save its id, which starts with qreq_.

3

Wait for the result

Quotes arrive one at a time. Prefer: wait=20 holds the read open for up to 20 seconds, and the read answers as soon as the request changes. Set since_version to the version from the 202 answer, so a change you haven’t seen yet answers at once.

curl "https://api.truvo.com/v1/quote-requests/qreq_...?since_version=1" \
-H "Authorization: Bearer $TRUVO_API_KEY" \
-H "Truvo-Version: 2026-09-26" \
-H "Prefer: wait=20"

If the status is still in_progress, read it again with the new version in since_version. A request in progress already lists the quotes so far. Once it’s completed, the quotes list gives the ID and the version of each quote. Get quote results has a loop that does this, and compares it with webhooks and quick polling.

4

Read a quote

curl https://api.truvo.com/v1/quotes/qt_... \
-H "Authorization: Bearer $TRUVO_API_KEY" \
-H "Truvo-Version: 2026-09-26"

A quote gives its status, the price, the coverage, the availability, the next actions, and the evidence. In the sandbox, the evidence label is mock, and the coverage conditions include Sandbox premium. Not a carrier price.

Next steps