API Reference

Complete documentation for Fusion Calling APIs. Integrate calendar events and lead management into your applications.

📅 External Calendar API

Manage calendar events programmatically with full CRUD operations

External Calendar API Reference

Intermediate

The Fusion Calling External Calendar API allows you to programmatically manage calendar events using API key authentication. This RESTful API provides full CRUD (Create, Read, Update, Delete) operations for calendar events.

Overview

Base URL:https://app.fusioncalling.com/api/calendar/external/v1
API Version:v1

Information

All API requests require authentication using an API key. See the Authentication section below for details.

Authentication

All API requests require authentication using an API key. The API key must be included in the Authorization header using the Bearer token format.

Getting Your API Key

  1. Log in to your Fusion Calling account
  2. Navigate to Settings → API Keys
  3. Generate a new API key or use an existing one
  4. Copy the API key (it's only shown once when created)

Using Your API Key

Include the API key in the Authorization header of every request:

Authorization: Bearer your-api-key-here

Example:

curl -X GET "https://app.fusioncalling.com/api/calendar/external/v1/events" \
  -H "Authorization: Bearer bf207bcf-c0de-4067-bd28-45728bd305aa"
bash

Endpoints

GET/api/calendar/external/v1/events

Retrieve a list of events, optionally filtered by date range.

Authentication

Required

Query Parameters

ParameterTypeRequiredDescription
fromstringNoFilter events from this date (inclusive). Supports flexible datetime formats.
tostringNoFilter events until this date (inclusive). Supports flexible datetime formats.

Request Example

curl -X GET "https://app.fusioncalling.com/api/calendar/external/v1/events?from=2025-12-01T00:00:00&to=2025-12-31T23:59:59" \
  -H "Authorization: Bearer your-api-key-here"

Response Example

1{
2  "success": true,
3  "data": [
4    {
5      "id": "550e8400-e29b-41d4-a716-446655440000",
6      "account_id": "account-uuid-here",
7      "user_id": "user-uuid-here",
8      "title": "Team Meeting",
9      "description": "Weekly team sync",
10      "start_time": "2025-12-15T14:30:00.000Z",
11      "end_time": "2025-12-15T16:00:00.000Z",
12      "all_day": false,
13      "source": "local",
14      "created_at": "2025-12-10T10:00:00.000Z",
15      "updated_at": "2025-12-10T10:00:00.000Z"
16    }
17  ]
18}

Response Codes

200Success
401Invalid or missing API key
400Invalid date format in query parameters
500Server error
GET/api/calendar/external/v1/events/{id}

Retrieve a single event by its ID.

Authentication

Required

Path Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesThe unique identifier of the event

Request Example

curl -X GET "https://app.fusioncalling.com/api/calendar/external/v1/events/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer your-api-key-here"

Response Example

1{
2  "success": true,
3  "data": {
4    "id": "550e8400-e29b-41d4-a716-446655440000",
5    "account_id": "account-uuid-here",
6    "user_id": "user-uuid-here",
7    "title": "Team Meeting",
8    "description": "Weekly team sync",
9    "start_time": "2025-12-15T14:30:00.000Z",
10    "end_time": "2025-12-15T16:00:00.000Z",
11    "all_day": false,
12    "source": "local",
13    "created_at": "2025-12-10T10:00:00.000Z",
14    "updated_at": "2025-12-10T10:00:00.000Z"
15  }
16}

Response Codes

200Success
401Invalid or missing API key
404Event not found or doesn't belong to your account
500Server error
POST/api/calendar/external/v1/events

Create a new calendar event.

Authentication

Required

Request Body

FieldTypeRequiredDescription
titlestringYesEvent title (1-255 characters)
descriptionstringNoEvent description (max 500 characters)
start_timestringYesEvent start time (flexible datetime format)
end_timestringYesEvent end time (flexible datetime format)
all_daybooleanNoWhether the event is all-day (default: false)

Request Example

1curl -X POST "https://app.fusioncalling.com/api/calendar/external/v1/events" \
2  -H "Authorization: Bearer your-api-key-here" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "title": "Client Meeting",
6    "description": "Discuss project requirements",
7    "start_time": "2025-12-20T14:30:00",
8    "end_time": "2025-12-20T16:00:00",
9    "all_day": false
10  }'

Response Example

1{
2  "success": true,
3  "data": {
4    "id": "770e8400-e29b-41d4-a716-446655440002",
5    "account_id": "account-uuid-here",
6    "user_id": "user-uuid-here",
7    "title": "Client Meeting",
8    "description": "Discuss project requirements",
9    "start_time": "2025-12-20T14:30:00.000Z",
10    "end_time": "2025-12-20T16:00:00.000Z",
11    "all_day": false,
12    "source": "local",
13    "created_at": "2025-12-11T10:00:00.000Z",
14    "updated_at": "2025-12-11T10:00:00.000Z"
15  }
16}

Response Codes

201Event created successfully
400Validation error (see error details)
401Invalid or missing API key
500Server error

Validation Errors

1{
2  "success": false,
3  "error": "Validation failed",
4  "details": {
5    "start_time": ["Invalid datetime format..."],
6    "end_time": ["Invalid datetime format..."],
7    "title": ["Title is required"]
8  }
9}
PATCH/api/calendar/external/v1/events/{id}

Update an existing event. All fields are optional - only provided fields will be updated.

Authentication

Required

Path Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesThe unique identifier of the event

Request Body

FieldTypeRequiredDescription
titlestringNoEvent title (1-255 characters)
descriptionstringNoEvent description (max 500 characters). Use null to clear.
start_timestringNoEvent start time (flexible datetime format)
end_timestringNoEvent end time (flexible datetime format)
all_daybooleanNoWhether the event is all-day

Request Example

1curl -X PATCH "https://app.fusioncalling.com/api/calendar/external/v1/events/550e8400-e29b-41d4-a716-446655440000" \
2  -H "Authorization: Bearer your-api-key-here" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "title": "Updated Meeting Title",
6    "description": "Updated description",
7    "start_time": "2025-12-15T15:00:00",
8    "end_time": "2025-12-15T17:00:00"
9  }'

Response Example

1{
2  "success": true,
3  "data": {
4    "id": "550e8400-e29b-41d4-a716-446655440000",
5    "account_id": "account-uuid-here",
6    "user_id": "user-uuid-here",
7    "title": "Updated Meeting Title",
8    "description": "Updated description",
9    "start_time": "2025-12-15T15:00:00.000Z",
10    "end_time": "2025-12-15T17:00:00.000Z",
11    "all_day": false,
12    "source": "local",
13    "created_at": "2025-12-10T10:00:00.000Z",
14    "updated_at": "2025-12-11T11:30:00.000Z"
15  }
16}

Response Codes

200Event updated successfully
400Validation error or end_time <= start_time
401Invalid or missing API key
404Event not found or doesn't belong to your account
500Server error
DELETE/api/calendar/external/v1/events/{id}

Delete an event by its ID.

Authentication

Required

Path Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesThe unique identifier of the event

Request Example

curl -X DELETE "https://app.fusioncalling.com/api/calendar/external/v1/events/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer your-api-key-here"

Response Example

{
  "success": true,
  "message": "Event deleted successfully"
}

Response Codes

200Event deleted successfully
401Invalid or missing API key
404Event not found or doesn't belong to your account
500Server error

Rate Limiting

The External Calendar API implements rate limiting to protect the service from abuse and ensure fair usage.

Rate Limit Details

  • Limit: 12 requests per minute per API key
  • Window: Sliding window (last 60 seconds)
  • Scope: Per API key (each key has independent limits)

Rate Limit Headers

All API responses include rate limit headers:

  • X-RateLimit-Limit: Maximum number of requests allowed (12)
  • X-RateLimit-Remaining: Number of requests remaining in the current window
  • X-RateLimit-Reset: Unix timestamp when the rate limit resets
  • Retry-After: Number of seconds to wait before retrying (only on 429 responses)

👥 External Leads API

Automatically send leads from your favorite tools to Fusion Call

External Leads API Reference

Beginner

Automatically send leads from your favorite tools to Fusion Call. This API allows you to integrate external systems like GoHighLevel, n8n, custom CRMs, and web forms to automatically create leads in your Fusion Call account.

Overview

Base URL:https://your-domain.com/api/leads/external/v1
API Version:v1
Rate Limit:100 requests/minute

Information

All API requests require authentication using an API key. Each batch request can contain up to 100 leads.

Quick Start

Get started in 3 simple steps:

  1. Copy your API key from Fusion Call Settings → API Keys
  2. Send a POST request to our API endpoint
  3. Your leads appear automatically in Fusion Call!

Test Your API Key

Use this quick test to verify your API key works:

1curl -X POST https://your-domain.com/api/leads/external/v1/leads \
2  -H "Authorization: Bearer YOUR_API_KEY" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "name": "Test Lead",
6    "phone": "+1234567890"
7  }'

If successful, you'll see:

{
  "success": true,
  "message": "Leads created successfully",
  "created": 1
}

Authentication

All API requests require authentication using an API key in the Authorization header using the Bearer token format.

Getting Your API Key

  1. Log in to your Fusion Call account
  2. Go to Settings → API Keys
  3. Click "Generate New API Key"
  4. Copy your API key (it looks like: pk_live_1234567890abcdef...)

Warning

Keep your API key secret! Never share it publicly or include it in client-side code (like JavaScript on websites).

Endpoints

POST/api/leads/external/v1/leads

Create a single lead in your Fusion Call account.

Authentication

Required

Request Body

FieldTypeRequiredDescription
namestringYesLead's full name (2-100 characters)
phonestringYesPhone number (10-15 digits, can include +, -, spaces, ())
emailstringNoValid email address
companystringNoCompany name (up to 100 characters)
tagsarrayNoArray of strings to categorize leads (max 20 tags)
custom_fieldsobjectNoKey-value pairs for additional custom data (max 20 fields)

Request Example

1curl -X POST "https://your-domain.com/api/leads/external/v1/leads" \
2  -H "Authorization: Bearer your-api-key-here" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "name": "John Doe",
6    "phone": "+1 234 567 8900",
7    "email": "john@example.com",
8    "company": "Acme Corporation",
9    "tags": ["vip", "website-lead"],
10    "custom_fields": {
11      "source": "Google Ads",
12      "campaign": "Summer Sale 2026",
13      "budget": 5000
14    }
15  }'

Response Example

1{
2  "success": true,
3  "message": "Leads created successfully",
4  "created": 1,
5  "leads": [
6    {
7      "id": "uuid-1234-5678-9012",
8      "name": "John Doe",
9      "phone": "+12345678900",
10      "email": "john@example.com",
11      "company": "Acme Corporation",
12      "status": "pending"
13    }
14  ]
15}

Response Codes

200Lead created successfully
400Validation error (see error details)
401Invalid or missing API key
409Duplicate lead (same phone for same account)
429Rate limit exceeded
500Server error

Validation Errors

1{
2  "success": false,
3  "error": "Validation failed",
4  "details": {
5    "phone": ["Phone number is required"],
6    "email": ["Invalid email format"]
7  }
8}
POST/api/leads/external/v1/leads

Create multiple leads in one request (up to 100 leads).

Authentication

Required

Request Body

FieldTypeRequiredDescription
leadsarrayYesArray of lead objects (max 100). Each lead must have name and phone.

Request Example

1curl -X POST "https://your-domain.com/api/leads/external/v1/leads" \
2  -H "Authorization: Bearer your-api-key-here" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "leads": [
6      {
7        "name": "John Doe",
8        "phone": "+1 234 567 8900",
9        "email": "john@example.com"
10      },
11      {
12        "name": "Jane Smith",
13        "phone": "+1 234 567 8901",
14        "email": "jane@example.com",
15        "company": "Smith Industries"
16      },
17      {
18        "name": "Bob Johnson",
19        "phone": "+1 234 567 8902"
20      }
21    ]
22  }'

Response Example

1{
2  "success": true,
3  "message": "Leads created successfully",
4  "created": 3,
5  "leads": [
6    {
7      "id": "uuid-1234-5678-9012",
8      "name": "John Doe",
9      "phone": "+12345678900",
10      "email": "john@example.com",
11      "status": "pending"
12    },
13    {
14      "id": "uuid-2345-6789-0123",
15      "name": "Jane Smith",
16      "phone": "+12345678901",
17      "company": "Smith Industries",
18      "status": "pending"
19    },
20    {
21      "id": "uuid-3456-7890-1234",
22      "name": "Bob Johnson",
23      "phone": "+12345678902",
24      "status": "pending"
25    }
26  ]
27}

Response Codes

200Leads created successfully
400Validation error or too many leads (>100)
401Invalid or missing API key
429Rate limit exceeded
500Server error

Data Models

Lead Object

1interface Lead {
2  name: string;           // Required: 2-100 characters
3  phone: string;          // Required: 10-15 digits
4  email?: string;         // Optional: Valid email format
5  company?: string;       // Optional: Up to 100 characters
6  tags?: string[];        // Optional: Max 20 tags
7  custom_fields?: {       // Optional: Max 20 fields
8    [key: string]: any;
9  };
10}

Phone Number Format

Phone numbers must be 10-15 digits and can include:

  • Digits (0-9)
  • Plus sign (+) for country code
  • Spaces, hyphens (-), and parentheses ()

Valid examples:

  • +1234567890
  • +1 234-567-8900
  • (234) 567-8900
  • +44 20 1234 5678

Rate Limiting

  • Limit: 100 requests per minute per API key
  • Batch Requests: Each batch request counts as 1 request (even if it contains 100 leads)
  • Exceeded Limit: Returns 429 status code with Retry-After header

Rate Limit Error Response

{
  "error": "Rate limit exceeded",
  "message": "Too many requests. Limit: 100 requests per minute.",
  "retryAfter": 45
}

Platform Integrations

GoHighLevel Integration

Automatically send leads from GoHighLevel to Fusion Call using webhooks.

Setup Steps:

  1. In GoHighLevel, go to Settings → Automation → Webhooks
  2. Click "Add Webhook"
  3. Set URL to: https://your-domain.com/api/leads/external/v1/leads
  4. Method: POST
  5. Add header: Authorization: Bearer YOUR_API_KEY

Webhook Payload:

1{
2  "name": "{{contact.name}}",
3  "phone": "{{contact.phone}}",
4  "email": "{{contact.email}}",
5  "company": "{{contact.company}}",
6  "tags": ["gohighlevel"],
7  "custom_fields": {
8    "source": "GoHighLevel",
9    "contact_id": "{{contact.id}}"
10  }
11}

n8n Integration

Use n8n to connect any system to Fusion Call with visual workflows.

HTTP Request Node Configuration:

  • Method: POST
  • URL: https://your-domain.com/api/leads/external/v1/leads
  • Authentication: Generic Credential Type
  • Header: Authorization = Bearer YOUR_API_KEY
  • Body Content Type: JSON

Web Form Integration

Connect your website forms to Fusion Call using server-side processing.

Warning

Never expose your API key in client-side JavaScript! Always use server-side processing.

PHP Example:

1<?php
2$apiKey = 'YOUR_API_KEY';
3$endpoint = 'https://your-domain.com/api/leads/external/v1/leads';
4
5$data = [
6    'name' => $_POST['name'],
7    'phone' => $_POST['phone'],
8    'email' => $_POST['email'],
9    'tags' => ['website-form']
10];
11
12$ch = curl_init($endpoint);
13curl_setopt($ch, CURLOPT_POST, true);
14curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
15curl_setopt($ch, CURLOPT_HTTPHEADER, [
16    'Authorization: Bearer ' . $apiKey,
17    'Content-Type: application/json'
18]);
19curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
20
21$response = curl_exec($ch);
22$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
23curl_close($ch);
24
25if ($httpCode === 200) {
26    echo "Lead created successfully!";
27} else {
28    echo "Error: " . $response;
29}
30?>

Code Examples

1const axios = require('axios');
2
3const apiKey = 'YOUR_API_KEY';
4const endpoint = 'https://your-domain.com/api/leads/external/v1/leads';
5
6const data = {
7    name: 'John Doe',
8    phone: '+1234567890',
9    email: 'john@example.com',
10    company: 'Acme Corp',
11    tags: ['api-import'],
12    custom_fields: {
13        source: 'custom_crm',
14        import_date: new Date().toISOString()
15    }
16};
17
18axios.post(endpoint, data, {
19    headers: {
20        'Authorization': `Bearer ${apiKey}`,
21        'Content-Type': 'application/json'
22    }
23})
24.then(response => {
25    console.log(`Success! Created ${response.data.created} lead(s)`);
26})
27.catch(error => {
28    console.error('Error:', error.response?.data || error.message);
29});
javascript

Best Practices

1. Security

  • Never expose API keys in client-side code
  • Always use HTTPS for API calls
  • Store API keys in environment variables
  • Rotate API keys periodically

2. Error Handling

  • Implement retry logic for failed requests
  • Log all API requests and responses
  • Handle rate limiting gracefully
  • Display user-friendly error messages

3. Performance

  • Use batch requests for multiple leads
  • Implement queue systems for high-volume imports
  • Use asynchronous processing
  • Optimize payload size

4. Data Quality

  • Validate data before sending to API
  • Normalize phone numbers
  • Sanitize user input
  • Use consistent field names

Troubleshooting

401 Unauthorized Error

Causes: Invalid or missing API key

Solutions:

  • Verify your API key in Fusion Call Settings
  • Check Authorization header format
  • Generate a new API key if needed

400 Validation Error

Causes: Missing required fields or invalid data format

Solutions:

  • Ensure name and phone are included
  • Verify phone number is 10-15 digits
  • Validate email format if provided
  • Check tags array has max 20 items

409 Duplicate Lead Error

Causes: Lead with same phone number already exists

Solutions:

  • Check if lead already exists in Fusion Call
  • This is expected behavior to prevent duplicates

429 Rate Limit Exceeded

Causes: More than 100 requests per minute

Solutions:

  • Implement exponential backoff
  • Use batch requests to send multiple leads
  • Check Retry-After header

FAQ

How many leads can I send per day?

There's no daily limit, but there's a rate limit of 100 requests per minute. Each request can contain up to 100 leads. Theoretically, you could send up to 144,000 leads per day.

Can I send leads from multiple sources?

Yes! You can use the same API key across multiple systems, or create separate API keys for each source in your Fusion Call Settings.

What happens if a lead already exists?

The API will return a 409 Conflict error if a lead with the same phone number already exists for your account. This prevents duplicate leads.

How quickly do leads appear in Fusion Call?

Leads typically appear within 1-2 seconds after a successful API request.

Support

For API support, please contact:

Email: hello@fusioncalling.com

Documentation: Check our docs folder for additional resources

Changelog

External Leads API - Version 1.0

  • Initial API release
  • Support for single and batch lead creation
  • Platform integrations (GoHighLevel, n8n, Web Forms)
  • Rate limiting: 100 requests per minute
  • Custom fields and tags support

Released: February 2026

External Calendar API - Version 1.0

  • Initial API release
  • Support for CRUD operations on calendar events
  • Flexible datetime format support
  • API key authentication
  • Account-scoped data access
  • Rate limiting: 12 requests per minute

Released: December 2025