Skip to content

Availability

An Availability is the weekly hours a Worker can be booked in, less what their connected calendars already hold, with buffers and notice.

Properties

PropertyTypeRequiredDescription
workerWorkerrequiredWho is booked: a Human, or an Agent that takes calls.
hoursjsonrequiredOpen hours by weekday, in its time zone.
timezonestringrequiredAn IANA time zone.
calendarsstring[]Connected calendars whose busy times it subtracts.
bufferintegerMinutes kept free before and after each Meeting.
noticeintegerThe fewest hours ahead a Meeting can be booked.

Object

JSON
{
  "$id": "https://api.sb/leaseline.app/availabilities/availability_8Zj0a7vvRl",
  "$type": "Availability",
  "worker": "worker_whZFpOKWIV",
  "hours": {
    "mon": [
      "09:00-12:00"
    ],
    "thu": [
      "13:00-17:00"
    ]
  },
  "timezone": "America/Chicago",
  "calendars": [
    "Example calendars"
  ],
  "buffer": 10,
  "notice": 12
}

Relationships

Verbs

  1. createCreates an Availability.
    POST /{namespace}/availabilitiesdoAvailability.created
  2. getReturns one Availability by id.
    GET /{namespace}/availabilities/{id}readNo Event
  3. listReturns Availabilities, newest first, one page at a time.
    GET /{namespace}/availabilitiesreadNo Event
  4. updateChanges the given properties of an Availability.
    PATCH /{namespace}/availabilities/{id}doAvailability.updated
  5. deleteDeletes an Availability: a soft delete that keeps its history, undone by `Thing.restore`.
    DELETE /{namespace}/availabilities/{id}doAvailability.deleted
  6. setSet records the weekly hours a Worker can be booked in and the calendars whose busy times it subtracts.
    POST /{namespace}/availabilities/setdoAvailability.set

Permissions

Which Access level may call each Verb. One-way Verbs wait their delay window.

Operationowneradminmemberviewer
Availability.createYesYesYesNo
Availability.getYesYesYesYes
Availability.listYesYesYesYes
Availability.updateYesYesYesNo
Availability.deleteYesYesYesNo
Availability.setYesYesYesNo

Call it

In code: API · SDK · CLI · MCP.

Text
Set the latest availability with a worker.

Works with

Example

Dana Okafor keeps two mornings a week open for calls, in America/Chicago. Her Availability subtracts whatever her connected calendar already holds and keeps 10 minutes free around each Meeting. It refuses a booking less than 12 hours ahead.