Skip to main content

Reference

Overview

The VIA API is a small, conventional REST surface over the audience data platform. Read this once before diving into the reference.

A REST API over JSON

Every endpoint accepts and returns JSON, uses predictable resource-oriented URLs, and reports outcomes with standard HTTP status codes. The base URL is https://app.via.tools/api/v1. All requests must be made over HTTPS. Plain HTTP requests fail at the load balancer.

Anatomy
https://app.via.tools/api/v1/audiences
                  ─┬─  ─┬─       ─┬───────
                   │    │         └─ resource
                   │    └─ version
                   └─ base host

API tokens via header

Authenticate every request with your account's API token in the X-Api-Token header. View and rotate the token from your account's API settings. Treat tokens like passwords. Never commit them to source control, embed them in client-side code, or share them in screenshots.

A token belongs to the account, not to a person. It can read and act on everything the API exposes for that account, including lists and audiences in folders that some team members cannot open. Folder permissions do not apply to API requests, so anyone holding the token can see every list name in the account. Only account administrators can view or rotate the token, from a signed-in VIA session. The token works only on API endpoints. It does not sign in to VIA's web pages and cannot rotate itself. Lists and other records it creates show the API token as their creator, not a team member, and stay visible to the account's users.

Authenticated request
curl https://app.via.tools/api/v1/audiences \\
  -H "X-Api-Token: $VIA_API_TOKEN"

A request without a valid token returns 401 Unauthorized. Tokens are case-sensitive and must match exactly. A token for a deactivated account also returns 401. A valid token returns 403 Forbidden when API access is not enabled for its account.

JSON in, JSON out

Send JSON bodies with Content-Type: application/json. Responses are always JSON with UTF-8 encoding. Field names use snake_case; timestamps are ISO 8601 in UTC; ids are short numeric primary keys.

Sample request
POST /api/v1/audiences HTTP/1.1
Host: app.via.tools
X-Api-Token: ••••
Content-Type: application/json

{
  "name": "Homeowners in TX, 35-65",
  "data_source_id": 4,
  "filters": [
    { "field": "state",   "values": ["TX"] },
    { "field": "est_age", "values": ["35-65"] }
  ]
}

Status codes and error bodies

The HTTP status code tells you the category; the response body tells you the specifics. Malformed requests return 400. Requests that parse correctly but contain invalid values generally return 422 with field errors.

Error body
{
  "name": ["can't be blank"]
}
200
OK
Request succeeded.
201
Created
New resource created.
400
Bad Request
The request could not be parsed. The response body explains what was wrong.
401
Unauthorized
Missing or invalid X-Api-Token header, or the account is deactivated.
403
Forbidden
The token is valid but API access is not enabled for its account.
404
Not Found
The resource does not exist or is not visible to this account.
422
Unprocessable Content
The request contains invalid or missing values. The response body identifies them.
429
Too Many Requests
The account is over its per-minute rate limit. Wait the number of seconds in the Retry-After header.
5xx
Server Error
Something went wrong on our side. Safe to retry with exponential backoff.

Per-account rate limits

Requests are limited per account per minute. /data/count and /data/query share one limit, and all other endpoints share another. Responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (Unix time when the window resets). Past the limit, the API returns 429 Too Many Requests with a Retry-After header giving the seconds to wait.

Rate limited
HTTP/1.1 429 Too Many Requests
Retry-After: 42
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1790000000

{ "error": "Rate limit exceeded. Try again in 42 seconds." }

One major version at a time

The version is part of the URL path (/api/v1/). Breaking changes go into a new major version with at least six months of overlap. Additive changes (new optional fields, new endpoints) ship into the current version without notice, so write clients that ignore unknown fields gracefully.

Recent changes

September 2026
Requests are rate limited per account per minute, with /data/count and /data/query on a separate limit. Over the limit returns 429 with a Retry-After header.
September 2026
coordinate_radius uses only the first value in a filter. Send one filter per circle with a shared named condition to match several circles. Polygons may have at most 10,000 vertices.
August 2026
Top-level Audience Builder filter sets are now segments in the builder and API. Audiences accept and return a segments array, filters use segment_id, and segment_match_type controls AND, OR, and AND NOT joins. OR filter clusters inside a segment are called groups.
July 2026
Filters accept the rooftop_radius and map_area fields. Both take an object value rather than a string: a center with a radius, or a drawn circle or polygon.
July 2026
Filters now return subcategory_number, so reading a filter and writing it back no longer drops it.
July 2026
POST /audiences/:id/clone is implemented. It was documented but had no handler.
July 2026
GET /data_sources/:id is scoped to the data sources your account has been granted, matching the index endpoint. Fetching any other data source now returns 404.