v1

latestSwagger 2.02026-08-06115129197.7 KB
Blockages

Create a blockage

Creates a one-off or recurring blockage. Reference the location and (optional) employee by MyTime id or partner/external id. Include a schedule to make the blockage recurring.

post/blockages

Headers

X-Subdomainstring

Merchant subdomain - Optional

Request body

location_idinteger

MyTime id of the location the blockage applies to. Provide this or location_external_id.

location_external_idstring

Partner/external id of the location. Resolved server-side to a MyTime location.

employee_idinteger

MyTime id of the employee the blockage applies to. Omit (or send an id that does not resolve) for a location-wide blockage. Provide this or employee_external_id.

employee_external_idstring

Partner/external id of the employee. Resolved server-side to a MyTime employee.

begin_atstring date-time required

ISO8601 start of the blocked-off window.

end_atstring date-time required

ISO8601 end of the blocked-off window.

titlestring

Free-form label shown on the calendar (e.g. "Lunch", "Vacation").

descriptionstring

Optional longer note for the blockage.

blockage_typestring

Free-form type. day_off marks the window as a day off; any other value is a generic block.

resource_idinteger

Optional MyTime id of a resource (e.g. a room) the blockage reserves.

Example request

{
  "location_id": 0,
  "employee_id": 0,
  "begin_at": "2026-07-10T12:09:28.048Z",
  "end_at": "2026-07-10T12:09:28.048Z",
  "title": "string",
  "description": "string",
  "blockage_type": "string",
  "resource_id": 0,
  "schedule": {
    "frequency_interval": 1,
    "interval_datatype": "days",
    "end_date": "2026-12-31",
    "interval_extra": {}
  }
}

Response

Created

Example response

{
  "blockage": {
    "schedule": {
      "frequency_interval": 1,
      "interval_datatype": "weeks",
      "end_date": "2026-12-31"
    }
  }
}