Skip to main content
PATCH
/
availabilities
/
{availability_id}
Update an availability
curl --request PATCH \
  --url https://{your-workspace}.neetocal.com/api/external/v1/availabilities/{availability_id} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
{
  "periods": [
    {
      "wday": "monday",
      "start_time": "09:00 AM",
      "end_time": "05:00 PM"
    },
    {
      "wday": "tuesday",
      "start_time": "11:00 AM",
      "end_time": "04:00 PM"
    }
  ],
  "overrides": [
    {
      "date": "2025-03-07",
      "periods": [
        {
          "wday": "friday",
          "start_time": "11:00 AM",
          "end_time": "04:00 PM"
        }
      ]
    }
  ],
  "time_zone": "America/New_York"
}
'
{
  "message": "<string>",
  "availability": {
    "id": "01ea5ddf-ed00-4bed-bfa3-ba8ea80a856a",
    "sid": "2nq7q5c",
    "name": "Availability for custom user",
    "default": false,
    "after_buffer_time": 0,
    "before_buffer_time": 0,
    "periods": [
      {
        "id": "21c812a7-3859-4f01-b214-850e6f11caad",
        "wday": "monday",
        "start_time": "09:00 AM",
        "end_time": "05:00 PM"
      }
    ],
    "overrides": [
      {
        "date": "2025-03-07",
        "periods": [
          {
            "wday": "friday",
            "start_time": "10:00 AM",
            "end_time": "03:00 PM"
          }
        ]
      }
    ],
    "user": {
      "id": "b6d02dfa-8ef6-453d-b9f7-67a6f20bcaa6",
      "name": "Oliver Smith",
      "email": "[email protected]"
    }
  }
}
Replace {your-workspace} with your workspace’s subdomain.
Learn how to find your subdomain in Identifying your subdomain.

Headers

X-Api-Key
string
required

X-Api-Key is used to authenticate requests using an API key. Provide your API key in this header to access protected endpoints. Refer to Authentication for more information.

Path Parameters

availability_id
string
required

Id of the availability can be retrieved by going to the particular availability page, and copying it from the URL.

Body

application/json
periods
object[]
Example:
[
{
"wday": "monday",
"start_time": "09:00 AM",
"end_time": "05:00 PM"
},
{
"wday": "tuesday",
"start_time": "11:00 AM",
"end_time": "04:00 PM"
}
]
overrides
object[]

Set an override for specific days. To set a date as unavailable, pass a blank array to the periods property. You can remove existing overrides by omitting the periods property.

Example:
[
{
"date": "2025-03-07",
"periods": [
{
"wday": "friday",
"start_time": "11:00 AM",
"end_time": "04:00 PM"
}
]
}
]
time_zone
string

Optional IANA timezone name (e.g., "America/New_York", "Asia/Kolkata"). When provided, the start_time and end_time values in periods and overrides are assumed to be in this timezone and will be converted to the user's timezone before saving. If not provided, times are assumed to be in the user's timezone.

Example:

"America/New_York"

Response

200 - application/json

OK - Availability updated successfully

message
string
availability
object