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.
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.
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.
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.
{
"name": ["can't be blank"]
}
200
201
400
401
403
404
422
429
5xx
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.
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.