v1
latestOpenAPI 3.0.12026-07-22120163333.7 KBCalendar V2 API
Create Calendar Event
Creates either a Task or an Appointment for the target lead, selected by the 'type' field (case-insensitive TASK / APPOINTMENT).
Notes:
- Caller must have manage permission on the lead; otherwise 400 PERMISSION_DENIED (20017).
- type, leadId, content, startAt and endAt are required. taskWay is additionally required when type = TASK.
- startAt and endAt must be later than the current server time.
- The returned data.id is a composite string ('<numericId>-task' or '<numericId>-appointment') and must be used as-is when updating, finishing or deleting this entry.
- When startAt and endAt are both exactly midnight (00:00:00) in their declared offsets, an appointment is automatically marked as all-day.
post/v2.0/calendar
Headers
Authorizationstring required
Bearer [access_token]
Content-Typestring required
application/json
Request body
Example request
{
"type": "TASK",
"content": "Follow up with client about property",
"leadId": 563172647619608,
"startAt": "2026-03-01T14:00:00-08:00",
"endAt": "2026-03-01T15:00:00-08:00",
"startAtMs": 1740866400000,
"endAtMs": 1740870000000,
"timeZoneCode": "America/Los_Angeles",
"taskWay": "Call",
"assignedRole": "Agent",
"address": "123 Main St, Los Angeles, CA"
}Response
Calendar created. The response wraps CalendarCreateResult under the 'data' key.
Example response
{
"data": {
"id": "12345-task",
"type": "TASK"
}
}