Veytrix AI

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

1Your app makes a request and attaches the API key as a Bearer token
2Veytrix checks the key is valid and belongs to your workspace
3If valid, Veytrix runs the action and returns JSON; if not, it returns 401

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

  1. Go to Developer → API Keys.
  2. Enter a descriptive name (e.g. ATS integration) and click Create key.
  3. 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_KEY

Use 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())
Keep the key on your server / backend only — never put it in browser JavaScript, a mobile app, or a public repo, since anyone who sees it can act as your workspace. Store it in an environment variable (e.g. 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.

AreaEndpointsAPI 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.

MethodEndpointReturnsTypical latency
GET/api/agentsList of agents15–30 ms
GET/api/callsList of calls40–90 ms
GET/api/calls/{callId}One call (detail)15–40 ms
GET/api/calls/{callId}/transcriptCall transcript20–50 ms
GET/api/ratingsList of ratings~100 ms
GET/api/ratings/statsRating stats20–40 ms
GET/api/dashboard/overviewDashboard metrics20–60 ms
GET/api/dashboard/call-volumeCall-volume chart data20–60 ms
GET/api/dashboard/status-breakdownCall status breakdown20–50 ms
GET/api/dashboard/recent-callsMost recent calls20–50 ms
GET/api/analytics/overviewAnalytics summary30–80 ms
GET/api/numbersPhone numbers10–25 ms
POST/api/batchesTrigger a batch of calls60–200 ms
POST/api/campaignsCreate a campaign60–200 ms
POST/api/alertInstant 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.
Typical latency is server processing time measured on the Mumbai (BOM) region — time from request received to response sent, excluding your network round-trip to the server. Most reads return in under 100 ms; larger list payloads (ratings, calls) grow with the number of rows returned, so use 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.

FieldRequiredDescription
agentIdYesThe agent that speaks on the call.
phonesYesArray of { "name": "...", "phone": "+91..." } objects, or a plain array of E.164 strings. Invalid/placeholder numbers are skipped, not rejected.
fromNumberNoCaller ID override. Omitted → resolved from the agent’s telephony credential / org default.
variablesNoKey/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.

WindowDefaultResets
Daily5,000 requestsMidnight IST
Monthly1,00,000 requests1st 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 wait
Build for 429: 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.

Treat keys like passwords. Never commit them to git or expose them in frontend code. If a key leaks, revoke it from Developer and create a new one. Revocation is immediate.
VeytrixAI System Status