Authentication
Every API request uses an API key in the x-api-key header. Create, rotate, and revoke keys through your tenant administrator in Vieu’s settings.
GET /api/v2/persons/lists HTTP/1.1
Host: api.vieu.com
x-api-key: YOUR_API_KEY
Get an API key
A tenant administrator creates keys in Vieu under Settings → API keys. Each key carries the scopes that decide which endpoints it can call. Rate limits apply across your tenant.
Tenant context
New tenant-scoped keys carry their tenant context. You normally do not send a tenant ID. If a key already has a tenant, the server ignores the query-string tenant value.
Legacy keys without tenant context must provide a valid tenantId query parameter for tenant-scoped routes:
- cURL
- JavaScript
- Python
curl 'https://api.vieu.com/api/v2/persons/lists?tenantId=YOUR_TENANT_ID' \
--header "x-api-key: $VIEU_API_KEY"
const url = new URL('https://api.vieu.com/api/v2/persons/lists');
url.searchParams.set('tenantId', 'YOUR_TENANT_ID');
const response = await fetch(url, {
headers: { 'x-api-key': process.env.VIEU_API_KEY },
});
const body = await response.json();
if (!response.ok) throw new Error(JSON.stringify(body));
console.log(body);
import os
import requests
response = requests.get(
"https://api.vieu.com/api/v2/persons/lists",
params={"tenantId": "YOUR_TENANT_ID"},
headers={"x-api-key": os.environ["VIEU_API_KEY"]},
timeout=15,
)
response.raise_for_status()
print(response.json())
Keep identifiers in the query string, never in resource path segments or an unrelated request body.
Keep keys on your server
Use environment variables or a secret store. Do not embed production keys into a shipped website, put them in URLs, or commit them. Code examples on this site use the VIEU_API_KEY environment variable.
The inline example has an explicit live mode for local evaluation. It holds your key only in memory and sends it directly to the base URL you enter. Refreshing or leaving the page clears it; snippets always use a placeholder.
Diagnose authentication failures
- 401: check the header, key expiry, and whether the key was revoked.
- 403: verify that your key grants the endpoint’s required scope.
- 404: check the resource ID and tenant ownership. A resource in another tenant is not exposed.