API Keys
API keys authenticate programmatic access to your Veytrix workspace. Use them when your ATS, CRM, admin panel, or automation service needs to call backend APIs securely.
How it works
API keys are managed under Developer → API Keys.
API keys
An API key is a secret token that lets an external program act as your workspace — like a password for machines instead of people. Each integration should get its own key so you can revoke one without affecting the others.
Create a key
- Go to Developer → API Keys.
- Enter a descriptive name (e.g. ATS integration) and click Create key.
- Copy the full key immediately — it's shown once and never again.
Keys look like this (only the prefix is stored after creation, so we can show it in the list):
acai_YOUR_KEYUse a key
Send it as a Bearer token in the Authorization header of your requests — exactly like an OpenAI or Gemini key. No login session is needed; the key authenticates each request as your workspace.
# Read recent calls
curl https://veytrix-api.fly.dev/api/calls \
-H "Authorization: Bearer acai_YOUR_KEY"
# Trigger a batch of screening calls from your own backend
curl -X POST https://veytrix-api.fly.dev/api/batches \
-H "Authorization: Bearer acai_…" \
-H "Content-Type: application/json" \
-d '{ "agentId": "…", "fromNumber": "+91…", "contacts": [{"name":"Asha","phone":"+9198…"}] }'Use it in your code
Yes — you can call the API from any language. An API key is just an HTTPAuthorization: Bearer header, so anything that can make an HTTPS request works: Python, Node.js, PHP, Go, Java, Ruby, or plain curl. Pick your stack below — each example reads recent calls and triggers an instant alert dial. Replace acai_YOUR_KEY and YOUR_AGENT_ID with your real values.
Read data (GET) & trigger a call (POST)
# pip install requests
import requests
BASE = "https://veytrix-api.fly.dev"
HEADERS = {"Authorization": "Bearer acai_YOUR_KEY"}
# 1) Read recent calls
resp = requests.get(f"{BASE}/api/calls", headers=HEADERS, timeout=20)
resp.raise_for_status()
print(resp.json())
# 2) Instantly dial one or more numbers
payload = {
"agentId": "YOUR_AGENT_ID",
"fromNumber": "+91XXXXXXXXXX",
"phones": [{"name": "Asha", "phone": "+919876543210"}],
}
r = requests.post(f"{BASE}/api/alert", json=payload, headers=HEADERS, timeout=20)
print(r.status_code, r.json())VEYTRIX_API_KEY), not hard-coded.What a key can access (scope)
An API key is scoped to the programmatic surface — triggering calls and reading results — and acts within your workspace only. Sensitive areas (workspace settings, provider credentials, integrations, and platform admin) are not reachable with a key and return 403; use a logged-in session for those.
| Area | Endpoints | API key |
|---|---|---|
| Agents | /api/agents | ✅ |
| Campaigns & Batches | /api/campaigns, /api/batches | ✅ |
| Calls & Recordings | /api/calls, /api/recordings | ✅ |
| Ratings | /api/ratings | ✅ |
| Dashboard & Analytics | /api/dashboard, /api/analytics | ✅ |
| Usage & Wallet | /api/wallet, /api/balances | ✅ |
| Phone Numbers | /api/numbers | ✅ |
| Settings / Credentials / Platform | /api/settings, /api/integrations, … | ⛔ 403 |
Each key’s last used time is tracked and shown in Developer → API Keys, so you can spot unused or stale keys.
Endpoints reference
The table above shows the prefixes a key may reach. Below are the exact endpoints to call — note that dashboard and analytics data live under a /overview sub-path, so GET /api/dashboard on its own returns 404. Replace {callId} with a real id.
| Method | Endpoint | Returns | Typical latency |
|---|---|---|---|
GET | /api/agents | List of agents | 15–30 ms |
GET | /api/calls | List of calls | 40–90 ms |
GET | /api/calls/{callId} | One call (detail) | 15–40 ms |
GET | /api/calls/{callId}/transcript | Call transcript | 20–50 ms |
GET | /api/ratings | List of ratings | ~100 ms |
GET | /api/ratings/stats | Rating stats | 20–40 ms |
GET | /api/dashboard/overview | Dashboard metrics | 20–60 ms |
GET | /api/dashboard/call-volume | Call-volume chart data | 20–60 ms |
GET | /api/dashboard/status-breakdown | Call status breakdown | 20–50 ms |
GET | /api/dashboard/recent-calls | Most recent calls | 20–50 ms |
GET | /api/analytics/overview | Analytics summary | 30–80 ms |
GET | /api/numbers | Phone numbers | 10–25 ms |
POST | /api/batches | Trigger a batch of calls | 60–200 ms |
POST | /api/campaigns | Create a campaign | 60–200 ms |
POST | /api/alert | Instant multi-number dial (1 call) | 40–120 ms |
/api/agents, /api/calls and /api/ratings respond at the base path, but dashboard and analytics need the /overviewsub-path. A Cannot GET response means the path is wrong, not the key.limit and pagination to keep responses fast.Instant alert dial — POST /api/alert
The fastest way to dial one or many numbers from an automation (e.g. a camera/IoT alert that must ring a set of people the instant an event fires). It does in one request what a batch does in two (create then start): it creates a call per number and queues every dial immediately, so all numbers ring near-simultaneously. There is no batch record and no draft/start lifecycle to manage.
| Field | Required | Description |
|---|---|---|
agentId | Yes | The agent that speaks on the call. |
phones | Yes | Array of { "name": "...", "phone": "+91..." } objects, or a plain array of E.164 strings. Invalid/placeholder numbers are skipped, not rejected. |
fromNumber | No | Caller ID override. Omitted → resolved from the agent’s telephony credential / org default. |
variables | No | Key/value map applied to every call (fills {name}, {role}, … in the welcome/prompt). |
Example:
curl -X POST https://veytrix-api.fly.dev/api/alert \
-H "Authorization: Bearer acai_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "YOUR_AGENT_ID",
"fromNumber": "+91XXXXXXXXXX",
"phones": [
{ "name": "Guard 1", "phone": "+919876543210" },
{ "name": "Guard 2", "phone": "+919876500000" }
]
}'Response: { "message": "...", "calls": [{ "callId", "phone" }], "dialed": N, "skipped": M }. The endpoint returns as soon as the dials are queued (typically 40–120 ms); the phones then ring over the telephony network a few seconds later.
Rate limits & quotas
Every API key is rate-limited so one integration can’t overload the platform. Limits are counted per key over IST calendar windows — a daily cap and a monthly cap.
| Window | Default | Resets |
|---|---|---|
| Daily | 5,000 requests | Midnight IST |
| Monthly | 1,00,000 requests | 1st of the month, IST |
When a key goes over either cap, requests get 429 Too Many Requestsuntil the window resets. Every response also carries standard headers so your client can self-throttle:
X-RateLimit-Limit: 5000 # the daily cap
X-RateLimit-Remaining: 4987 # requests left today
X-RateLimit-Reset: 1751221800 # epoch seconds until the daily reset
Retry-After: 1820 # (on a 429) seconds to wait429: on a 429, read Retry-After and pause that long before retrying. Spread large jobs out instead of bursting thousands of calls at once.Limits are set by your platform administrator and apply to every workspace. A specific key can be given a higher or lower override. Organization admins can’t change limits — they’re governance controls — but can always view current usage and remaining quota.
Monitor usage
Open Developer → API Usage to see how your keys are being used over a chosen period (today, last 24 hours, 7 / 30 days, or 12 months):
- Requests over time — a bar chart of successful, failed and rate-limited (429) requests.
- Per-key table — today’s and this month’s usage vs the limit, success rate, and 429 count for each key.
Outcomes are categorized by HTTP status: 2xx = success, 4xx/5xx = failed, and 429 = rate-limited. Use this to confirm an integration is healthy and to spot keys that are nearing their cap.