Skip to main content
The TalkPilot API uses API key authentication. Every request (except /v1/health) must include a valid API key.

Passing your API key

Include the key in the X-API-Key header:
API keys always start with the prefix tp_live_ followed by 32 hexadecimal characters.

Permissions

Each API key has granular permissions that control which resources it can access: When a request requires a permission the key doesn’t have, the API returns 403 Forbidden:

Agent scoping

API keys can optionally be restricted to specific agents via allowed_agent_ids. When set:
  • List endpoints only return agents in the allowed list
  • Resource endpoints (tools, employees, calls, etc.) only work for allowed agents
  • Accessing a non-allowed agent returns 404 Not Found (not 403, to avoid leaking agent IDs)
This is useful for integrations that should only access a subset of your agents — e.g., giving a CRM integration access to one specific agent’s employee data.

Creating and managing keys

API keys are managed in the TalkPilot Dashboard under Settings > API:
  1. Create — Set name, permissions, optional agent restrictions, rate limits, and expiration
  2. Activate/Deactivate — Toggle a key without deleting it
  3. Delete — Permanently revoke a key
  4. Monitor — See when a key was last used
Keys are hashed (SHA-256) before storage — the full key is only shown once at creation time. If you lose a key, create a new one.

Key expiration

API keys can have an optional expiration date. Expired keys return 401 Unauthorized:

Security best practices

  • Never expose keys in client-side code — API keys are for server-to-server communication only
  • Use the minimum required permissions — Only grant permissions the integration actually needs
  • Scope to specific agents when possible — Limit blast radius if a key is compromised
  • Set expiration dates for temporary integrations
  • Rotate keys regularly — Create a new key, update your integration, then delete the old one
  • Monitor usage — Check the “Last used” timestamp to detect unused or suspicious keys

Error responses