Overview
Integrate the ICS Calendar Generator into your applications with ease. This API offers high performance, reliability, and comprehensive documentation to get you started quickly.
Documentation
📅 Perfect for Email Integration! Generate calendar event links that users can click to add events to their calendars. Compatible with Google Calendar, Outlook, Apple Calendar, Yahoo Calendar, and all iCal-compatible calendars.
Base URL
https://devapi.autoplannerx.com/api/v1/calendar-ics-generator
Authentication
All requests require an API key. Include it in the request header or as a query parameter:
X-API-Key: YOUR_API_KEY
?api_key=YOUR_API_KEY
Endpoints
/
Generate ICS Calendar File
Generates and returns a downloadable .ics calendar file for the specified event.
Required Parameters:
title- Event title (string)start- Start date/time (string, e.g., "2024-12-20 14:00:00")end- End date/time (string)
Optional Parameters:
description- Event description (string)location- Event location (string)timezone- Timezone (string, default: "Africa/Harare")organizer- Organizer name or email (string)reminder- Reminder minutes before event (integer)
curl -X GET "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator?title=Team%20Meeting&start=2024-12-20%2014:00:00&end=2024-12-20%2015:30:00&location=Conference%20Room%20A&api_key=YOUR_API_KEY" \
-H "X-API-Key: YOUR_API_KEY" \
-o event.ics
Example Request (POST JSON):
curl -X POST "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"title": "Team Meeting",
"description": "Quarterly team meeting",
"location": "Conference Room A",
"start": "2024-12-20 14:00:00",
"end": "2024-12-20 15:30:00",
"timezone": "Africa/Harare",
"organizer": "organizer@example.com",
"reminder": 15
}' \
-o event.ics
Response:
Returns a downloadable .ics file with appropriate headers.
/url
Generate Calendar URL for Email
Returns a URL that can be used in emails. When users click the link, they'll download the .ics file.
curl -X GET "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator/url?title=Team%20Meeting&start=2024-12-20%2014:00:00&end=2024-12-20%2015:30:00&api_key=YOUR_API_KEY" \
-H "X-API-Key: YOUR_API_KEY"
Example Response:
{
"success": true,
"url": "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator?title=Team%20Meeting&start=2024-12-20%2014:00:00&end=2024-12-20%2015:30:00&api_key=YOUR_API_KEY",
"message": "Use this URL in your emails. When users click it, they will download the .ics file."
}
Date/Time Formats
The API supports multiple date/time formats:
YYYY-MM-DD HH:MM:SS(e.g., "2024-12-20 14:00:00")YYYY-MM-DDTHH:MM:SS(e.g., "2024-12-20T14:00:00")YYYY-MM-DDTHH:MM:SS+00:00(ISO 8601)YYYY-MM-DD(date only, time defaults to 00:00:00)- Unix timestamp
- Any format supported by PHP's strtotime()
Supported Timezones
Use IANA timezone identifiers. Common examples:
Africa/Harare(default)America/New_YorkAmerica/Los_AngelesEurope/LondonEurope/ParisAsia/TokyoUTC
For a complete list, see: IANA Timezone Database
Code Examples
<?php
$apiKey = "your-api-key";
$baseUrl = "https://devapi.autoplannerx.com";
$params = [
"title" => "Team Meeting",
"description" => "Quarterly team meeting",
"location" => "Conference Room A",
"start" => "2024-12-20 14:00:00",
"end" => "2024-12-20 15:30:00",
"timezone" => "Africa/Harare",
"organizer" => "organizer@example.com",
"reminder" => 15,
"api_key" => $apiKey
];
$queryString = http_build_query($params);
$calendarUrl = $baseUrl . "/api/v1/calendar-ics-generator?" . $queryString;
// Use in email
$emailBody = "Add to calendar: <a href=\"$calendarUrl\">Click here</a>";
// Or download directly
$ch = curl_init($calendarUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: " . $apiKey]);
$icsContent = curl_exec($ch);
curl_close($ch);
file_put_contents("event.ics", $icsContent);
?>
const apiKey = "your-api-key";
const baseUrl = "https://devapi.autoplannerx.com";
const params = {
title: "Team Meeting",
description: "Quarterly team meeting",
location: "Conference Room A",
start: "2024-12-20 14:00:00",
end: "2024-12-20 15:30:00",
timezone: "Africa/Harare",
organizer: "organizer@example.com",
reminder: 15,
api_key: apiKey
};
const queryString = new URLSearchParams(params).toString();
const calendarUrl = `${baseUrl}/api/v1/calendar-ics-generator?${queryString}`;
// Use in email or web page
window.location.href = calendarUrl;
// Or use in email HTML
const emailLink = `<a href="${calendarUrl}">Add to Calendar</a>`;
import requests
from urllib.parse import urlencode
api_key = "your-api-key"
base_url = "https://devapi.autoplannerx.com"
params = {
"title": "Team Meeting",
"description": "Quarterly team meeting",
"location": "Conference Room A",
"start": "2024-12-20 14:00:00",
"end": "2024-12-20 15:30:00",
"timezone": "Africa/Harare",
"organizer": "organizer@example.com",
"reminder": 15,
"api_key": api_key
}
query_string = urlencode(params)
calendar_url = f"{base_url}/api/v1/calendar-ics-generator?{query_string}"
# Use in email
email_body = f"Add to calendar: <a href='{calendar_url}'>Click here</a>"
# Or download directly
headers = {"X-API-Key": api_key}
response = requests.get(calendar_url, headers=headers)
with open("event.ics", "wb") as f:
f.write(response.content)
Use Cases
- Event Emails: Send calendar links in event invitation emails
- Booking Systems: Generate calendar files for appointments
- Web Applications: Add "Add to Calendar" buttons
- Automated Reminders: Create calendar events programmatically
- Integration: Embed calendar generation in your applications
Rate Limits
- Free Tier: 500 requests per hour
- Premium Tier: 5,000 requests per hour
- Enterprise Tier: 50,000 requests per hour
Error Responses
// 400 Bad Request - Missing required parameter
{
"error": true,
"message": "Title is required"
}
// 400 Bad Request - Invalid date format
{
"error": true,
"message": "Invalid date/time format: invalid-date"
}
// 400 Bad Request - End before start
{
"error": true,
"message": "End date/time must be after start date/time"
}
// 401 Unauthorized
{
"error": true,
"message": "API Key is missing"
}
// 429 Too Many Requests
{
"error": true,
"message": "Rate limit exceeded"
}
Calendar Compatibility
The generated .ics files are compatible with:
- ✅ Google Calendar
- ✅ Outlook (web and desktop)
- ✅ Apple Calendar
- ✅ Yahoo Calendar
- ✅ Samsung Calendar
- ✅ Any iCal-compatible calendar application
Code Examples
Get started quickly with code examples in your preferred programming language. All examples use the base URL: https://devapi.autoplannerx.com/api/v1/calendar-ics-generator
PHP Examples
Generate Calendar Link for Email
<?php
$apiKey = "your-api-key";
$baseUrl = "https://devapi.autoplannerx.com";
$params = [
"title" => "Team Meeting",
"description" => "Quarterly team meeting",
"location" => "Conference Room A",
"start" => "2024-12-20 14:00:00",
"end" => "2024-12-20 15:30:00",
"timezone" => "Africa/Harare",
"organizer" => "organizer@example.com",
"reminder" => 15,
"api_key" => $apiKey
];
$queryString = http_build_query($params);
$calendarUrl = $baseUrl . "/api/v1/calendar-ics-generator?" . $queryString;
// Use in email
$emailBody = "Add to calendar: <a href=\"$calendarUrl\">Click here</a>";
?>
Download ICS File Directly
<?php
$apiKey = "your-api-key";
$baseUrl = "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator";
$params = [
"title" => "Team Meeting",
"start" => "2024-12-20 14:00:00",
"end" => "2024-12-20 15:30:00",
"location" => "Conference Room A"
];
$queryString = http_build_query(array_merge($params, ["api_key" => $apiKey]));
$url = $baseUrl . "?" . $queryString;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: " . $apiKey]);
$icsContent = curl_exec($ch);
curl_close($ch);
file_put_contents("event.ics", $icsContent);
?>
POST Request (JSON)
<?php
$apiKey = "your-api-key";
$url = "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator";
$data = [
"title" => "Team Meeting",
"description" => "Quarterly team meeting",
"location" => "Conference Room A",
"start" => "2024-12-20 14:00:00",
"end" => "2024-12-20 15:30:00",
"timezone" => "Africa/Harare",
"organizer" => "organizer@example.com",
"reminder" => 15
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: " . $apiKey,
"Content-Type: application/json"
]);
$icsContent = curl_exec($ch);
curl_close($ch);
file_put_contents("event.ics", $icsContent);
?>
JavaScript Examples
Generate Calendar Link (Browser)
const apiKey = "your-api-key";
const baseUrl = "https://devapi.autoplannerx.com";
const params = {
title: "Team Meeting",
description: "Quarterly team meeting",
location: "Conference Room A",
start: "2024-12-20 14:00:00",
end: "2024-12-20 15:30:00",
timezone: "Africa/Harare",
organizer: "organizer@example.com",
reminder: 15,
api_key: apiKey
};
const queryString = new URLSearchParams(params).toString();
const calendarUrl = `${baseUrl}/api/v1/calendar-ics-generator?${queryString}`;
// Use in email or web page
window.location.href = calendarUrl;
// Or create a link element
const link = document.createElement("a");
link.href = calendarUrl;
link.textContent = "Add to Calendar";
document.body.appendChild(link);
Download ICS File (Fetch API)
const apiKey = "your-api-key";
const baseUrl = "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator";
const params = {
title: "Team Meeting",
start: "2024-12-20 14:00:00",
end: "2024-12-20 15:30:00",
location: "Conference Room A",
api_key: apiKey
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}?${queryString}`;
fetch(url, {
headers: {
"X-API-Key": apiKey
}
})
.then(response => response.blob())
.then(blob => {
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "event.ics";
a.click();
});
Node.js (axios)
const axios = require("axios");
const fs = require("fs");
const apiKey = "your-api-key";
const baseUrl = "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator";
const params = {
title: "Team Meeting",
start: "2024-12-20 14:00:00",
end: "2024-12-20 15:30:00",
location: "Conference Room A"
};
const queryString = new URLSearchParams({...params, api_key: apiKey}).toString();
const url = `${baseUrl}?${queryString}`;
axios.get(url, {
headers: {
"X-API-Key": apiKey
},
responseType: "arraybuffer"
})
.then(response => {
fs.writeFileSync("event.ics", response.data);
console.log("Calendar file saved!");
});
Python Examples
Generate Calendar Link
import requests
from urllib.parse import urlencode
api_key = "your-api-key"
base_url = "https://devapi.autoplannerx.com"
params = {
"title": "Team Meeting",
"description": "Quarterly team meeting",
"location": "Conference Room A",
"start": "2024-12-20 14:00:00",
"end": "2024-12-20 15:30:00",
"timezone": "Africa/Harare",
"organizer": "organizer@example.com",
"reminder": 15,
"api_key": api_key
}
query_string = urlencode(params)
calendar_url = f"{base_url}/api/v1/calendar-ics-generator?{query_string}"
# Use in email
email_body = f"Add to calendar: <a href='{calendar_url}'>Click here</a>"
print(calendar_url)
Download ICS File
import requests
from urllib.parse import urlencode
api_key = "your-api-key"
base_url = "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator"
params = {
"title": "Team Meeting",
"start": "2024-12-20 14:00:00",
"end": "2024-12-20 15:30:00",
"location": "Conference Room A",
"api_key": api_key
}
query_string = urlencode(params)
url = f"{base_url}?{query_string}"
headers = {"X-API-Key": api_key}
response = requests.get(url, headers=headers)
if response.status_code == 200:
with open("event.ics", "wb") as f:
f.write(response.content)
print("Calendar file saved!")
else:
print(f"Error: {response.status_code}")
POST Request (JSON)
import requests
import json
api_key = "your-api-key"
url = "https://devapi.autoplannerx.com/api/v1/calendar-ics-generator"
data = {
"title": "Team Meeting",
"description": "Quarterly team meeting",
"location": "Conference Room A",
"start": "2024-12-20 14:00:00",
"end": "2024-12-20 15:30:00",
"timezone": "Africa/Harare",
"organizer": "organizer@example.com",
"reminder": 15
}
headers = {
"X-API-Key": api_key,
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
with open("event.ics", "wb") as f:
f.write(response.content)
print("Calendar file saved!")
else:
print(f"Error: {response.status_code}")
print(response.text)