Skip to main content
POST
/
availabilities
Create an availability
curl --request POST \
  --url https://{your-workspace}.neetocal.com/api/external/v1/availabilities \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
{
  "email": "[email protected]",
  "name": "Custom Work Hours",
  "periods": [
    {
      "wday": "monday",
      "start_time": "09:00 AM",
      "end_time": "05:00 PM"
    },
    {
      "wday": "wednesday",
      "start_time": "10:00 AM",
      "end_time": "06: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"
}
'
{
  "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.

Body

application/json
email
string<email>
required

Email of the team member for whom the availability should be created.

name
string
required

Name for the custom availability.

Example:

"Custom Work Hours"

periods
object[]
Example:
[
{
"wday": "monday",
"start_time": "09:00 AM",
"end_time": "05:00 PM"
},
{
"wday": "wednesday",
"start_time": "10:00 AM",
"end_time": "06: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 created successfully

availability
object