Skip to main content

Create Availability

Create a new availability for a calendar.

πŸ”Ή Endpoint​

POST /api/v2/availabilities

πŸ”’ Authentication​

HeaderRequiredDescription
Content-TypeYesMust be application/json
AuthorizationYesFormat: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

πŸ“ Body Fields​

FieldTypeRequiredDescription
calendarIdstring (UUID)YesCalendar ID owning this availability
serviceIdsstring[] (UUID)NoServices linked to this availability
namestringNoAvailability name
weeklyScheduleobjectNoMap of 0..6 β†’ array of {startTime, endTime}
unavailableDatesarrayNoArray of {startAt, endAt} ISO date-times
overridesobjectNoMap of date (YYYY-MM-DD) β†’ array of time intervals

🧩 Example​

curl -X POST "https://openapi.onlive.site/api/v2/availabilities" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"calendarId": "550e8400-e29b-41d4-a716-446655440000",
"serviceIds": [
"660e8400-e29b-41d4-a716-446655440000"
],
"name": "Main Office Hours",
"weeklySchedule": {
"1": [
{
"startTime": "09:00",
"endTime": "17:00"
}
],
"2": [
{
"startTime": "09:00",
"endTime": "17:00"
}
]
},
"unavailableDates": [
{
"startAt": "2025-12-31T00:00:00Z",
"endAt": "2025-12-31T23:59:59Z"
}
],
"overrides": {
"2025-12-25": [
{
"startTime": "10:00",
"endTime": "15:00"
}
]
}
}'

πŸ“€ Response (201 Created)​

Returns an Availability object. See Availability Properties.