Skip to main content
Integrations

API Reference

REST API overview for Teammates.ai. Authentication methods, key endpoints for Raya, Adam, and Sara, rate limits, error handling, and code examples.

8 min readUpdated 2026-02-01

API Overview

The Teammates.ai REST API gives you programmatic access to manage organizations, AI teammates, jobs, candidates, interviews, campaigns, conversations, and billing. All endpoints return JSON responses and use standard HTTP methods (GET, POST, PUT, DELETE). The base URL for all API requests is https://api.teammates.ai/v1.

Authentication

Teammates.ai supports two authentication methods. Use API keys for server-to-server integrations and JWT tokens for user-context requests.

MethodHeader FormatBest ForHow to Get
API KeyAuthorization: Bearer sk_live_...Server-to-server integrations, webhooks, automation.Dashboard > Organization Settings > API Keys. Generate a new key and store it securely.
JWT TokenAuthorization: Bearer eyJ...User-context requests, Dashboard integrations.POST /v1/auth/login with email and password. Token expires after 24 hours; refresh with /v1/auth/refresh.

Note:Never expose API keys in client-side code or public repositories. Use environment variables on your server.

Key Endpoints

The API is organized around resources. Here are the most commonly used endpoints grouped by domain.

DomainEndpointMethodsDescription
Organizations/v1/organizationsGET, PUTRetrieve and update organization settings.
Employees/v1/employeesGET, POST, PUT, DELETEManage AI teammates (Raya, Adam, Sara instances).
Agents/v1/employees/:id/agentsGET, POST, PUTConfigure channel agents (chat, email, phone) for each AI teammate.
Data Sources/v1/data-sourcesGET, POST, PUT, DELETEManage knowledge base content (files, URLs, FAQs).
Jobs (Sara)/v1/jobsGET, POST, PUT, DELETECreate and manage job listings for Sara interviews.
Candidates (Sara)/v1/candidatesGET, POST, PUTAdd candidates and retrieve their interview status.
Interviews (Sara)/v1/interviewsGET, POSTCreate interviews and retrieve results, scores, and reports.
Campaigns (Adam)/v1/campaignsGET, POST, PUTCreate and manage outbound sales campaigns.
Conversations (Raya)/v1/conversationsGET, POSTRetrieve support conversations, messages, and resolution status.
Usage & Billing/v1/usageGETCheck credit balance, usage history, and billing status.

Rate Limits

API rate limits prevent abuse and ensure consistent performance for all users.

Limit TypeLimitResponse When Exceeded
Per-minute60 requests/minute per API keyHTTP 429 Too Many Requests
Per-day10,000 requests/day per API keyHTTP 429 Too Many Requests
Batch endpoints100 items per batch requestHTTP 400 Bad Request

Note:If you need higher rate limits, contact support. Use webhooks instead of polling for real-time data. Batch requests wherever possible to reduce call volume.

Code Example: Create an Interview

Here is how to create a new interview for Sara using curl:

```bash curl -X POST https://api.teammates.ai/v1/interviews \ -H "Authorization: Bearer sk_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "job_id": "job_abc123", "candidate": { "name": "Jane Smith", "email": "jane@example.com" }, "deadline": "2026-03-01T23:59:59Z", "language": "en" }' ```

Sara creates the interview, generates questions from the job description, and sends the candidate an invitation email with a unique interview link.

Error Handling

The API returns standard HTTP status codes. Error responses include a JSON body with an error code, message, and details field for debugging.

Status CodeMeaningCommon Cause
200 OKRequest succeeded.Normal response.
201 CreatedResource created.Successful POST request.
400 Bad RequestInvalid request body or parameters.Missing required field, invalid JSON, or incorrect data type.
401 UnauthorizedAuthentication failed.Missing, expired, or invalid API key or JWT token.
403 ForbiddenInsufficient permissions.API key does not have access to the requested resource.
404 Not FoundResource not found.Invalid ID or deleted resource.
429 Too Many RequestsRate limit exceeded.Wait and retry. Check Retry-After header for delay.
500 Internal Server ErrorServer-side error.Contact support with the request ID from the response headers.

API Versioning

All endpoints are versioned under /v1. When breaking changes are introduced, a new version (e.g., /v2) is released. The previous version remains available for at least 12 months after a new version launches. Teammates.ai announces version deprecations via email and in-Dashboard notifications at least 90 days before end-of-life.

Frequently Asked Questions

Is the API available on the Free plan?
API access is available on all paid plans (Pro, Business, Scale, Enterprise). The Free plan does not include API key generation. Upgrade to Pro ($25/month) to access the API.
Can I use the API to create interviews for Sara programmatically?
Yes. POST to /v1/interviews with a job_id, candidate details, and optional deadline. Sara generates questions automatically from the job description and sends the candidate an invitation. Use GET /v1/interviews/:id to retrieve results after completion.
How do I handle API errors in my integration?
Check the HTTP status code first. For 4xx errors, fix the request (check authentication, required fields, permissions). For 429 errors, wait the duration in the Retry-After header before retrying. For 5xx errors, retry with exponential backoff. If 5xx errors persist, contact support with the X-Request-Id from the response headers.

Related Articles

Still need help?

Contact our team
API Reference | Help Center | Teammates.ai