/v1/availability_periodsCreate an availability or unavailability period
Set is_recurring to false for a one-off period and supply start_time and end_time. Set is_recurring to true for a repeating period and choose simple or advanced as the recurring_strategy. A simple weekly Tuesday uses recurring_strategy: "simple", recurring_day_number_of_week: 2, recurring_interval_in_seconds: 604800, and a Tuesday recurring_start_date. A simple fortnightly period uses 1209600 seconds. The second Thursday of every month uses recurring_strategy: "advanced", recurring_nth_day_in_month: 2, recurring_day_number_of_week: 4, and a matching start date such as 2026-01-08. Add recurring_dates_to_skip: ["2026-02-12"] to omit that specific monthly occurrence. Recurring start and end times use the Organization's local time.
Required API scopes: availability_periods.create
Parameters
Idempotency-Key
header · required
string
Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an
Idempotency-Replayed: trueheader. Same key + different body returns422 idempotency_key_reused. A duplicate that arrives while the first request is still in flight returns409 idempotency_conflictwithRetry-After: 1.
Request body
application/json
availability_typestringrequiredWhether the period makes the Clinician available or unavailable.
Allowed values:
availability | unavailabilityclinician_idstring | null · uuidrequiredThe Clinician affected by the period.
end_timestring | null · date-timeAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.is_activebooleanrequiredWhether the period contributes to the diary.
is_recurringbooleanrequiredWhether the period repeats. When false, supply
start_timeandend_time; recurring fields are cleared.notesstring | nullInternal notes about the period.
recurring_dates_to_skiparraySpecific ISO 8601 dates on which a recurring period must not occur. For example,
["2026-02-12"]skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.itemsstring · date
recurring_day_number_of_weekinteger | nullThe ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.
recurring_end_datestring | null · dateThe optional final recurrence date. It must be after
recurring_start_date.recurring_end_timestring | nullThe end time for each recurring occurrence in the Organization's local time.
recurring_interval_in_secondsinteger | nullRequired for
simple. Use 604800 for weekly or 1209600 for every two weeks.recurring_nth_day_in_monthinteger | nullRequired for
advanced. Use 2 with weekday 4 for the second Thursday of each month.recurring_start_datestring | null · dateThe first recurrence date. Supply a date that matches
recurring_day_number_of_week.recurring_start_timestring | nullThe start time for each recurring occurrence in the Organization's local time.
recurring_strategystring | nullSelect
simplefor a fixed interval measured in seconds, such as every week or every two weeks. Selectadvancedfor an occurrence such as the second Thursday of every month. Use null for a non-recurring period.Allowed values:
simple | advanced | nullroom_idstring | null · uuidThe Room affected by the period.
service_variant_idsarrayThe ServiceVariants offered during an availability period.
itemsstring · uuid
start_timestring | null · date-timeAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.
Responses
The requested AvailabilityPeriod.
availability_typestringrequiredWhether the period makes the Clinician available or unavailable.
Allowed values:
availability | unavailabilityclinician_idstring | null · uuidrequiredThe Clinician affected by the period.
created_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.end_timestring | null · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
is_activebooleanrequiredWhether the period contributes to the diary.
is_recurringbooleanrequiredWhether the period repeats. When false, use
start_timeandend_time; recurring fields are cleared.linksobjectrequiredURLs to related resources.
clinicianstring | null · urirequiredThe full URL of a related resource.
notesstring | nullrequiredInternal notes about the period.
objectanyrequiredDiscriminator value emitted at
object.recurring_dates_to_skiparrayrequiredSpecific ISO 8601 dates on which a recurring period must not occur. For example,
["2026-02-12"]skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.itemsstring · date
recurring_day_number_of_weekinteger | nullrequiredThe ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.
recurring_end_datestring | null · daterequiredThe optional final date on which the recurrence can apply. It must be after
recurring_start_date.recurring_end_timestring | nullrequiredThe end time for each recurring occurrence in the Organization's local time.
recurring_interval_in_secondsinteger | nullrequiredRequired for the
simplestrategy. Use 604800 for weekly or 1209600 for every two weeks.recurring_nth_day_in_monthinteger | nullrequiredRequired for the
advancedstrategy. For example, use 2 with weekday 4 for the second Thursday of each month.recurring_start_datestring | null · daterequiredThe first date on which the recurrence can apply. Supply a date that matches
recurring_day_number_of_week.recurring_start_timestring | nullrequiredThe start time for each recurring occurrence in the Organization's local time.
recurring_strategystring | nullrequiredSelect
simplefor a fixed interval measured in seconds, such as every week or every two weeks. Selectadvancedfor an occurrence such as the second Thursday of every month. Use null for a non-recurring period.Allowed values:
simple | advanced | nullroom_idstring | null · uuidrequiredThe Room affected by the period.
service_variant_idsarrayrequiredThe ServiceVariants offered during an availability period.
itemsstring · uuid
start_timestring | null · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.updated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.
Example
{
"id": "5267a739-2a80-4eaa-80c5-4baeb6a766a9",
"object": "availability_period",
"availability_type": "availability",
"clinician_id": "2b3c4d5e-6f70-489a-9bcd-ef0123456789",
"created_at": "2026-01-01T09:00:00Z",
"end_time": "2026-01-01T10:00:00Z",
"is_active": true,
"is_recurring": true,
"links":
"clinician": "https://api.carebit.co/v1/clinicians/2b3c4d5e-6f70-489a-9bcd-ef0123456789"
},
"notes": "Please confirm the appointment by email.",
"recurring_dates_to_skip":
"2026-01-01"
],
"recurring_day_number_of_week": 1,
"recurring_end_date": "2026-12-31",
"recurring_end_time": "17:00:00",
"recurring_interval_in_seconds": 1,
"recurring_nth_day_in_month": 1,
"recurring_start_date": "2026-01-01",
"recurring_start_time": "09:00:00",
"recurring_strategy": "simple",
"room_id": "4d5e6f70-8192-4abc-bdef-0123456789ab",
"service_variant_ids":
"6f708192-a3b4-4cde-9f01-23456789abcd"
],
"start_time": "2026-01-01T09:00:00Z",
"updated_at": "2026-01-01T09:00:00Z"
}The Idempotency-Key header is missing (idempotency_key_required) or exceeds 255 characters (idempotency_key_too_long).
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}The access token is missing, invalid, expired, or revoked.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}The access token lacks the required scope, or the project is disabled.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}A referenced resource was not found in the Organization.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}A concurrent request holds the idempotency lease (idempotency_conflict). Retry after the delay indicated by Retry-After.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}The Idempotency-Key was previously used with a different request body (idempotency_key_reused), or the request body failed validation.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}Too many requests. Retry after the delay indicated by Retry-After.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}