API
Everything the app does is available over HTTP with an API key. Requests and answers are JSON. Counting and searching are free; credits are spent only on records you receive.
Your key
Make a key under API in your account. Send it as a bearer token on every request. A key is shown once, so keep it somewhere safe; if it leaks, revoke it and make another.
curl https://resolvely.io/api/v1/credits/ \
-H "Authorization: Bearer YOUR_KEY"Every answer is wrapped the same way: {"data": ...} when it worked, {"error": {"type", "code", "message"}} when it did not. A request that fails costs nothing.
Filters
An audience is a list of filters, in the order you want them applied. Each one is {"filter": name, "value": ...}. GET /api/v1/filters/ returns this same list.
- states: States. A list of two-letter state codes.
- zips: ZIP codes. A list of ZIP codes. Five digits is one ZIP, three digits is every ZIP that starts with them.
- exclude_states: Leave out states. A list of two-letter state codes.
- exclude_zips: Leave out ZIP codes. A list of ZIP codes. Five digits is one ZIP, three digits is every ZIP that starts with them. Can be counted but not pulled yet.
- cities: Cities. A list of names, up to 50. Can be counted but not pulled yet.
- counties: Counties. A list of names, up to 50. Can be counted but not pulled yet.
- topics: Interests. A list of {"id", "label"} from the interests endpoint, up to 25.
- recency_days: Interest shown within. A whole number, 1 to 365.
- age: Age. An object with "min", "max" or both, 18 to 120. Can be counted but not pulled yet.
- income_min: Household income at least. A whole number, 1000 to 10000000.
- credit_min: Credit score at least. A whole number, 300 to 900. Can be counted but not pulled yet.
- homeowner: Home. One of "owner", "renter". "renter" can be counted but not pulled yet.
- single_family: Single family homes. true. Can be counted but not pulled yet.
- dwelling_type: Dwelling type. A list of names, up to 50. Can be counted but not pulled yet.
- vehicle_makes: Vehicle make. A list of names, up to 50.
- vehicle_models: Vehicle model. A list of names, up to 50.
- vehicle_year: Vehicle year. An object with "min", "max" or both, 1950 to 2100.
- mobile_only: Has a mobile number. true.
- email_required: Has an email address. true.
A filter the API cannot read is refused with a 400 that says which one. It is never dropped, so you never count or pull a wider audience than you asked for.
Count an audience
POST /api/v1/count/ returns how many people match. It is free.
curl https://resolvely.io/api/v1/count/ \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"filters": [
{"filter": "states", "value": ["TX"]},
{"filter": "vehicle_makes", "value": ["Toyota"]},
{"filter": "vehicle_year", "value": {"min": 2018}}
]}'The answer carries people, households, each filter with its plain-English text, and a breakdown of what is known about the people counted.
GET /api/v1/interests/?q=solar searches the interests a topics filter takes, with how many people each one reaches.
Save an audience
- POST /api/v1/audiences/ with
nameandfilterssaves one and counts it. - GET /api/v1/audiences/ lists yours. Add
?id=for one, or?limit=and?offset=to page. - DELETE /api/v1/audiences/?id= removes one. Its pulls and files stay.
Pull a list
POST /api/v1/pulls/ orders records. Send max_records (1 to 100,000) and either audience_id or filters with a name.
curl https://resolvely.io/api/v1/pulls/ \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"audience_id": 12, "max_records": 5000}'Credits for every record asked for are held when you order, so an order can never cost more than your balance. The answer is a 202 with the pull and its status: running while the file is built (usually a few minutes), then complete, failed or canceled. When it ends the hold is released and only the records in the file are charged.
- GET /api/v1/pulls/?id= reads one pull. Ask again until its status is no longer
running. - GET /api/v1/pulls/download/?id= returns the CSV of a complete pull.
- GET /api/v1/pulls/ lists your pulls.
If any part of an audience could not be applied to the order, the order is canceled and costs nothing.
Enrich and verify records
Four endpoints take records you already have and answer one result per entry, in the order you sent them.
- POST /api/v1/enrich/: Fill in the person behind a phone number or an email. Send "phones" or "emails", up to 100 in one request. Each result carries: result, confidence, first_name, last_name, address, city, state, zip, age, gender, marital_status, homeowner, household_income, mobile_phone, landline_phone, email, vehicles.
- POST /api/v1/append-phone/: Find the phone numbers for an email address. Send "emails", up to 100 in one request. Each result carries: result, first_name, last_name, address, city, state, zip, best_phone, best_phone_type, best_phone_do_not_call, other_phones.
- POST /api/v1/verify/: Clean a phone list before you dial or text it. Send "phones", up to 1,000 in one request. Each result carries: result, reasons, line_type, carrier.
- POST /api/v1/email-check/: See which emails carry an opt-in record. Send "emails", up to 1,000 in one request. Each result carries: result, on_file, opt_in, opt_in_date, opt_in_url, consent_record, known_responder.
curl https://resolvely.io/api/v1/enrich/ \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"phones": ["(512) 555-0142", "512-555-0103"]}'Each result has input (the entry as you sent it), result and billed. Each billed result costs that product's price in credits, listed by GET /api/v1/credits/: a billed result is a match for enrich and append, a number or address that was checked for verify and email check. An entry that is not usable, repeats an earlier one or is not matched costs nothing. The answer also carries the total billed and your balance.
For a whole file, upload a CSV under Enrich in your account and download it back with these columns added.
Credits and limits
GET /api/v1/credits/ returns your balance, the part of it that is this month's plan_credits if your account is on a plan, and prices, the credits one result of each product costs. A request that would cost more than the balance answers 402 with balance and credits_needed, and nothing is charged.
A key that sends too many requests answers 429 with a Retry-After header saying when to try again.