Skip to main content

Agents

Initiate a Call
POST /api/agents/call
Initiates a phone call from an agent to a contact. Request Headers:
Content-Type: application/json
x-api-key: your-api-key
x-organization-id: your-organization-id
Request Body:
{
  "agentId": "uuid-of-the-agent",
  "phoneNumber": "+1XXXXXXXXXX",
  "notes": "Optional notes for context in this call"
}
Required Parameters:
  • agentId: The UUID of the agent that will make the call
  • phoneNumber: Phone number in the format +1XXXXXXXXXX
Optional Parameters:
  • notes: Additional context for the call
Example Response:
{
  "message": "Call initiated successfully",
  "callId": "b7f2d8e1-6c3a-4d5b-9e8f-1a2b3c4d5e6f",
  "agentName": "Sales Assistant",
  "contactName": "John Doe",
  "phoneNumber": "+15551234567"
}
The contact must have a valid phone number in their profile. The call is initiated immediately upon successful request processing.

Contacts

List All Contacts
GET /api/contacts
Retrieves all contacts for your organization. Get a Specific Contact
GET /api/contacts/:id
Retrieves a specific contact by ID. Get a Contact by CRM ID
GET /api/contacts/crm/lookup
Retrieves a contact by CRM ID and source. Query Parameters:
  • crm_id: The ID of the contact in the CRM system
  • crm_source: The source CRM system (e.g., “salesforce”, “hubspot”)
Create a Contact
POST /api/contacts
Creates a new contact. The contact will be associated with the authenticated user. Request Body:
{
  "first_name": "Jane",
  "last_name": "Smith",
  "email": "jane@example.com",
  "phone": "+1987654321",
  "company": "New Corp",
  "crm_id": "CRM456",
  "crm_source": "hubspot"
}
first_name is required unless crm_id and crm_source are provided. All other fields are optional. Update a Contact
PATCH /api/contacts/:id
Updates specific fields of a contact. Only include the fields you want to update. Delete a Contact
DELETE /api/contacts/:id
Permanently deletes a contact. CRM Webhook
POST /api/webhook/crm
Receives contact data from external CRM systems and creates or updates contacts accordingly. Request Body:
{
  "source": "salesforce",
  "data": {
    "crm_id": "CRM123",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "phone": "+1234567890",
    "company": "Example Corp"
  }
}
The webhook supports various field naming conventions from different CRM systems, including first_name/firstName/name, last_name/lastName, email/emailAddress, phone/phoneNumber, and company/companyName/organization.