POST
Calendar.Add
Create a calendar appointment in the appointments table, same data as the dashboard calendar-tab Meeting modal (title, color, date/time, customer, team members, location, details). Distinct from Meeting.Add which creates combo meetings.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Creates a Calendar record or sends the requested data after validation.
Push Service
Pushes appointment.created so open calendars can refresh. Also syncs to Google Calendar via g-calapi (same as dashboard) when the assignee has Google connected; stores event_id / event_id_2 on the appointment.
Automation
Runs automation event add_meeting after insert when configured.
Special Instructions
- Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
- Send parameters as POST body fields exactly as documented.
- Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
titlepost | string | test add event | Event title. Alias: subject. |
datepost | date | 2026-07-29 | Appointment date. Send UTC Y-m-d or a parseable date. Aliases: datesel, appointment_date. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
start_timepost | time | 04:00 | Start time H:i. Aliases: appo_from, from. Send time values as H:i:s. If the route also has a date field, send that date as UTC Y-m-d H:i:s. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
end_timepost | time | 04:30 | End time H:i. Used to compute duration when duration is omitted. Aliases: appo_to, to. Send time values as H:i:s. If the route also has a date field, send that date as UTC Y-m-d H:i:s. |
durationpost | int | 30 | Duration in minutes. If omitted, computed from start_time and end_time. |
appoinment_colorpost | string | red | Color label (red, green, yellow, blue, purple, orange, pink). Alias: color. |
customer_idpost | int | 108545 | Optional customer id. Aliases: client_id, cust_id. |
team_member_idpost | int | 14 | Primary assigned user/team member. Defaults to the logged-in user. Alias: user. |
team_member_id_2post | int | 0 | Optional second team member. Must differ from team_member_id. |
appoiment_addresspost | string | Office | Location. Aliases: location, address. |
appoimenttextpost | string | Details note | Details / notes. Aliases: details, note, notes. |
notifypost | int | 1 | Notify flag. Default 1. |
sync_google_calendarpost | int | 1 | Sync to Google Calendar for assigned team members (default 1). Pass 0 to skip. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Calendar.Add",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"title": "test add event",
"date": "2026-07-29",
"start_time": "04:00",
"end_time": "04:30",
"appoinment_color": "red",
"customer_id": "108545",
"appoiment_address": "Office",
"appoimenttext": "Details"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Calendar.Add",
"url_domain": "https:\/\/{domain}\/app\/Calendar.Add"
}Endpoint
POST /app/Calendar.Add
POST https://{user}.bull36.com/app/Calendar.Add
POST https://{domain}/app/Calendar.AddSample Output
{
"success": 1,
"message": "Appointment added successfully",
"appointment_id": 9001,
"google_calendar": {
"synced": 1,
"event_id": "abc123",
"event_id_2": ""
},
"automation_event": "add_meeting",
"socket_event": "appointment.created"
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('title', 'test add event');
body.set('date', '2026-07-29');
body.set('start_time', '04:00');
body.set('end_time', '04:30');
body.set('appoinment_color', 'red');
const res = await fetch('/app/Calendar.Add', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());Error Example
{
"success": 0,
"message": "Missing required parameter: title"
}