Create Custom Calendar Event
POST
/api/v1/cases/{caseId}Creates a custom calendar event for a case. Allows scheduling meetings or activities with a defined time, timezone, location, and optional meeting link.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/cases/{caseId}Staging
https://api-staging.care360-next.carevalidate.com/api/v1/cases/{caseId}Parameters
Headers
content-typestringrequired`application/json`
cv-api-keystringrequiredOrganization API key
Path Parameters
caseIdstring<UUID>requiredCase identifier
Example:
a1b2c3d4-e5f6-7890-abcd-ef1234567890Request Body
actionstringrequiredThe action to perform. Must be `CREATE_CALENDAR_EVENT`.
Values:CREATE_CALENDAR_EVENT
calendarobjectrequiredCalendar event details.
Show 9 child properties
titlestringrequiredEvent title.
Example:
Quarterly Planning MeetingagentNamestringrequiredMust be `custom`.
Values:custom
descriptionstringoptionalEvent agenda or description.
Example:
Review priorities and align on next-quarter goals.startTimestringrequiredStart time in ISO 8601 format (UTC). Must be before endTime.
Example:
2025-03-10T14:00:00ZendTimestringrequiredEnd time in ISO 8601 format (UTC). Must be after startTime.
Example:
2025-03-10T15:00:00ZtimeZonestringrequiredIANA timezone identifier. Times are stored in UTC; display uses this timezone.
Example:
America/New_YorkmeetingLinkstringrequiredVirtual meeting URL.
Example:
https://example.com/meet/123locationstringrequiredLocation type for the meeting.
Values:google_conferencezoom_conferencemicrosoft_teams_conferencewebex_conference
providerobjectoptionalProvider information.
Show 2 child properties
emailstringrequiredProvider email address.
Example:
provider@example.comnamestringrequiredProvider name.
Example:
Dr. SmithNotes
startTimemust be beforeendTime.- Times are stored in UTC; display uses the
timeZonevalue.
Examples
- cURL
- JavaScript
- Python
curl --request POST \
--url "https://api.example.com/api/v1/cases/{caseId}" \
--header "content-type: application/json" \
--header "cv-api-key: your-org-cv-api-key" \
--data '{
"action": "CREATE_CALENDAR_EVENT",
"calendar": {
"title": "Quarterly Planning Meeting",
"agentName": "custom",
"description": "Review priorities and align on next-quarter goals.",
"startTime": "2025-12-31T14:00:00Z",
"endTime": "2025-12-31T15:00:00Z",
"timeZone": "America/New_York",
"meetingLink": "https://example.com/meet/123",
"location": "gotomeeting_conference",
"provider": {
"email": "provider@example.com",
"name": "Dr. Smith"
}
}
}'
const caseId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
const response = await fetch(`https://api.example.com/api/v1/cases/${caseId}`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"cv-api-key": "your-org-cv-api-key",
},
body: JSON.stringify({
action: "CREATE_CALENDAR_EVENT",
calendar: {
title: "Quarterly Planning Meeting",
agentName: "custom",
description: "Review priorities and align on next-quarter goals.",
startTime: "2025-12-31T14:00:00Z",
endTime: "2025-12-31T15:00:00Z",
timeZone: "America/New_York",
meetingLink: "https://example.com/meet/123",
location: "gotomeeting_conference",
provider: {
email: "provider@example.com",
name: "Dr. Smith",
},
},
}),
});
const data = await response.json();
console.log(data);
import requests
case_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = requests.post(
f"https://api.example.com/api/v1/cases/{case_id}",
headers={
"Content-Type": "application/json",
"cv-api-key": "your-org-cv-api-key",
},
json={
"action": "CREATE_CALENDAR_EVENT",
"calendar": {
"title": "Quarterly Planning Meeting",
"agentName": "custom",
"description": "Review priorities and align on next-quarter goals.",
"startTime": "2025-12-31T14:00:00Z",
"endTime": "2025-12-31T15:00:00Z",
"timeZone": "America/New_York",
"meetingLink": "https://example.com/meet/123",
"location": "gotomeeting_conference",
"provider": {
"email": "provider@example.com",
"name": "Dr. Smith",
},
},
},
)
print(response.json())
Try It Out
Try itAPI Playground
▶Responses
▶200SuccessCalendar event created successfully.
{
"status": 200,
"success": true,
"message": "Case calendar event created successfully",
"data": {
"success": true,
"calendarEventId": "123e4567-e89b-12d3-a456-426614174000"
}
}
▶400Bad Request — Invalid ActionReturned when the action field is not a recognized value.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "Invalid action"
}
▶400Bad Request — Missing FieldsReturned when required fields are missing from the request body.
{
"status": 400,
"success": false,
"message": "Invalid request parameters",
"error": "calendar.meetingLink, Invalid input: expected string, received undefined"
}
▶401UnauthorizedReturned when API key is missing or invalid.
{
"status": 401,
"success": false,
"message": "Invalid or missing API key"
}
▶404Not FoundReturned when no case exists with the provided caseId.
{
"status": 404,
"success": false,
"message": "Invalid request",
"error": "No Case found for provided details!"
}
▶422Unprocessable EntityReturned when time validation fails.
{
"status": 422,
"success": false,
"message": "Time validation failed"
}
▶500Internal Server ErrorReturned when an unexpected error occurs.
{
"status": 500,
"success": false,
"message": "Internal error"
}