# Schedules API – Tiempo

> Working hours for one resource, versioned by date. Several weeks make a rotation. Times are local wall-clock, so 09:00 stays 09:00 through daylight saving.

Source: https://tiempo.one/docs/schedules

Working hours for one resource, versioned by date. Several weeks make a rotation. Times are local wall-clock, so 09:00 stays 09:00 through daylight saving.

## Create a schedule

`POST /v1/schedules`

Sets working hours for a resource from a date. The version in force on a day is the latest one that has started, so a future version is a planned change. Several weeks make a rotation.

Send the business’s id in `Tiempo-Account`.

### Body parameters

-   `resource` (string, required)
    
    A resource id.
    
-   `effective_from` (date, required)
    
    First local date the hours apply.
    
-   `weeks` (array of maps, required)
    
    One entry per week of the rotation; each maps a weekday to { start, end, location? } intervals in HH:mm.
    
-   `metadata` (map)
    
    Up to 50 keys of your own (strings, keys up to 40 characters, values up to 500). Returned on every read and webhook. On update, an empty string removes a key.
    

### Returns

The schedule. Bookings the new hours no longer cover are flagged conflicted (booking.conflicted).

POST /v1/schedules

```bash
curl -X POST "https://api.tiempo.one/v1/schedules" \
  -H "Authorization: Bearer tpt_4qZ8m1VwXc0L…" \
  -H "Tiempo-Account: acct_01m42yt93ayvyrwr3yczhv6yhw" \
  -H "Content-Type: application/json" \
  -d '{
    "resource": "res_ann",
    "effective_from": "2026-11-16",
    "weeks": [
      {
        "monday": [
          {
            "start": "09:00",
            "end": "12:00"
          },
          {
            "start": "13:00",
            "end": "17:00"
          }
        ],
        "tuesday": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      }
    ]
  }'
```

200Response

```json
{
  "id": "sch_01m4h2v9qk3n7c1zt8mx5wbd0e",
  "object": "schedule",
  "livemode": false,
  "resource": "res_01m42ytc9b53589z4rp11zedjy",
  "effective_from": "2026-11-16",
  "weeks": [
    {
      "monday": [
        {
          "start": "09:00",
          "end": "12:00",
          "location": null
        },
        {
          "start": "13:00",
          "end": "17:00",
          "location": null
        }
      ],
      "tuesday": [
        {
          "start": "10:00",
          "end": "18:00",
          "location": null
        }
      ]
    }
  ],
  "metadata": {},
  "created_at": "2026-10-04T08:00:01Z",
  "updated_at": "2026-10-04T08:00:01Z"
}
```

## List schedules

`GET /v1/schedules`

Send the business’s id in `Tiempo-Account`.

### Query parameters

-   `resource` (string)
    
    Only those involving this resource. On the calendar, repeat it for several.
    
-   `limit` (integer)
    
    1 to 100. Defaults to 20.
    
-   `starting_after` (string)
    
    An object id from the previous page; returns the page after it.
    
-   `ending_before` (string)
    
    An object id; returns the page before it.
    
-   `metadata[key]` (string)
    
    Only objects whose metadata has this key and value. Repeat for several.
    

GET /v1/schedules

```bash
curl "https://api.tiempo.one/v1/schedules?resource=res_ann" \
  -H "Authorization: Bearer tpt_4qZ8m1VwXc0L…" \
  -H "Tiempo-Account: acct_01m42yt93ayvyrwr3yczhv6yhw"
```

200Response

```json
{
  "object": "list",
  "data": [
    {
      "id": "sch_01m4h2v9qk3n7c1zt8mx5wbd0e",
      "object": "schedule",
      "livemode": false,
      "resource": "res_01m42ytc9b53589z4rp11zedjy",
      "effective_from": "2026-11-16",
      "weeks": [
        {
          "monday": [
            {
              "start": "09:00",
              "end": "12:00",
              "location": null
            },
            {
              "start": "13:00",
              "end": "17:00",
              "location": null
            }
          ],
          "tuesday": [
            {
              "start": "10:00",
              "end": "18:00",
              "location": null
            }
          ]
        }
      ],
      "metadata": {},
      "created_at": "2026-10-04T08:00:01Z",
      "updated_at": "2026-10-04T08:00:01Z"
    }
  ],
  "has_more": false
}
```

## Retrieve a schedule

`GET /v1/schedules/{id}`

Send the business’s id in `Tiempo-Account`.

### Path parameters

-   `id` (string, required)
    
    The object’s id.
    

GET /v1/schedules/{id}

```bash
curl "https://api.tiempo.one/v1/schedules/sch_01m4h2v9qk3n7c1zt8mx5wbd0e" \
  -H "Authorization: Bearer tpt_4qZ8m1VwXc0L…" \
  -H "Tiempo-Account: acct_01m42yt93ayvyrwr3yczhv6yhw"
```

200Response

```json
{
  "id": "sch_01m4h2v9qk3n7c1zt8mx5wbd0e",
  "object": "schedule",
  "livemode": false,
  "resource": "res_01m42ytc9b53589z4rp11zedjy",
  "effective_from": "2026-11-16",
  "weeks": [
    {
      "monday": [
        {
          "start": "09:00",
          "end": "12:00",
          "location": null
        },
        {
          "start": "13:00",
          "end": "17:00",
          "location": null
        }
      ],
      "tuesday": [
        {
          "start": "10:00",
          "end": "18:00",
          "location": null
        }
      ]
    }
  ],
  "metadata": {},
  "created_at": "2026-10-04T08:00:01Z",
  "updated_at": "2026-10-04T08:00:01Z"
}
```

## Update a schedule

`POST /v1/schedules/{id}`

Send the business’s id in `Tiempo-Account`.

### Path parameters

-   `id` (string, required)
    
    The object’s id.
    

### Body parameters

-   `effective_from` (date)
    
    First local date the hours apply.
    
-   `weeks` (array of maps)
    
    One entry per week of the rotation; each maps a weekday to { start, end, location? } intervals in HH:mm.
    
-   `metadata` (map)
    
    Up to 50 keys of your own (strings, keys up to 40 characters, values up to 500). Returned on every read and webhook. On update, an empty string removes a key.
    

POST /v1/schedules/{id}

```bash
curl -X POST "https://api.tiempo.one/v1/schedules/sch_01m4h2v9qk3n7c1zt8mx5wbd0e" \
  -H "Authorization: Bearer tpt_4qZ8m1VwXc0L…" \
  -H "Tiempo-Account: acct_01m42yt93ayvyrwr3yczhv6yhw" \
  -H "Content-Type: application/json" \
  -d '{
    "weeks": [
      {
        "monday": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      }
    ]
  }'
```

200Response

```json
{
  "id": "sch_01m4h2v9qk3n7c1zt8mx5wbd0e",
  "object": "schedule",
  "livemode": false,
  "resource": "res_01m42ytc9b53589z4rp11zedjy",
  "effective_from": "2026-11-16",
  "weeks": [
    {
      "monday": [
        {
          "start": "09:00",
          "end": "12:00",
          "location": null
        },
        {
          "start": "13:00",
          "end": "17:00",
          "location": null
        }
      ],
      "tuesday": [
        {
          "start": "10:00",
          "end": "18:00",
          "location": null
        }
      ]
    }
  ],
  "metadata": {},
  "created_at": "2026-10-04T08:00:01Z",
  "updated_at": "2026-10-04T08:00:01Z"
}
```

## Delete a schedule

`DELETE /v1/schedules/{id}`

Send the business’s id in `Tiempo-Account`.

### Path parameters

-   `id` (string, required)
    
    The object’s id.
    

DELETE /v1/schedules/{id}

```bash
curl -X DELETE "https://api.tiempo.one/v1/schedules/sch_01m4h2v9qk3n7c1zt8mx5wbd0e" \
  -H "Authorization: Bearer tpt_4qZ8m1VwXc0L…" \
  -H "Tiempo-Account: acct_01m42yt93ayvyrwr3yczhv6yhw"
```

200Response

```json
{
  "id": "…",
  "object": "…",
  "deleted": true
}
```

The machine-readable description is at [/openapi.json](https://tiempo.one/openapi.json). Try calls in [Swagger UI](https://tiempo.one/swagger-ui.html).[Tiempo home](https://tiempo.one/)[Dashboard](https://tiempo.one/app)
