API Reference
Welcome to the Routeswit API. Our API is built on REST principles, providing a structured way to integrate lead routing, sales representative management, and activity tracking into your existing workflows.
API Playground
Test your integration in real-time. Use your secret API key to execute live requests against our production environment.
Authentication
The Routeswit API uses API keys for authentication. You can generate and revoke these keys within yourOrganization Settings.
Security Enforcement
All requests must be made via HTTPS. Insecure HTTP requests will be blocked. Additionally, use restricted keys for limited-scope integrations when possible.
Response Codes
We use standard HTTP status codes to communicate the result of your API requests.
| Status | Code | Description |
|---|---|---|
| 200 OK | - | The request was successful. |
| 401 | UNAUTHORIZED | Invalid or missing API key. |
| 404 | NOT_FOUND | The requested resource does not exist. |
| 422 | VALIDATION_ERROR | The request body was invalid or contained errors. |
| 500 | SERVER_ERROR | Internal server error. Our team has been notified. |
Leads
The Leads resource is the core of Routeswit. Use this endpoint to ingest incoming leads and distribute them to the appropriate representative based on your defined rules.
/leadsRepresentatives
Manage your sales team's availability and routing capacity.
/repsList all representatives associated with your organization.
[
{
"id": "rep_123",
"name": "Alex Rivera",
"email": "alex@company.com",
"status": "AVAILABLE"
},
...
]/repsRulesets
Define your business logic. Rulesets consist of conditions and actions that determine which representative receives a lead.
/rulesContacts & Activities
Maintain a persistent history of every lead and their engagement over time.
/contactsUpsert contact details to keep records synchronized.
/contacts/[id]/activitiesLog a Call or Meeting
{
"type": "CALL",
"notes": "Discussed expansion to 50 seats.",
"outcome": "POSITIVE"
}Intelligence
Gain insights into your routing performance and set up automated SLA monitors.