Skip to main content
PUT
/
chrono
/
schedules
/
{scheduleId}
Update a schedule
curl --request PUT \
  --url https://api.altostrat.io/chrono/schedules/{scheduleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Weekend Maintenance Window",
  "timezone": "America/New_York",
  "hours": [
    {
      "day": "saturday",
      "start": "22:00",
      "end": "23:59"
    }
  ],
  "metadata": [
    {
      "key": "ticket_ref",
      "value": "JIRA-456"
    }
  ]
}'
{
  "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "name": "Business Hours Policy",
  "timezone": "Australia/Sydney",
  "active": true,
  "updated_at": "2025-10-29T01:43:31Z",
  "created_at": "2025-10-29T01:43:31Z",
  "hours": [
    {
      "day": "monday",
      "start": "09:00",
      "end": "17:00"
    }
  ],
  "metadata": [
    {
      "key": "policy_id",
      "value": "pol_12345"
    }
  ]
}

Authorizations

Authorization
string
header
required

Enter your API key in the format: Bearer {key}

Path Parameters

scheduleId
string<uuid>
required

The unique identifier (UUID) for the schedule to update.

Example:

"9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"

Body

application/json

The details of the schedule to update.

The request body for creating or updating a schedule.

name
string
required

The name of the schedule. Must be unique within your workspace.

Maximum length: 200
Example:

"Weekend Maintenance Window"

hours
object[]
required

An array of time slot objects. This array will completely replace any existing time slots on an update.

Maximum length: 50
timezone
string

An IANA Time Zone Database name, e.g., America/New_York or UTC. If not provided, the workspace default will be used.

Example:

"America/New_York"

metadata
object[]

An array of key-value pairs. On update, provide a key with a null value to delete it. New keys will be added, and existing keys will be updated.

Maximum length: 50

Response

The schedule was updated successfully.

Represents a schedule object that defines when a policy or configuration is active.

id
string<uuid>

The unique identifier for the schedule.

Example:

"9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"

name
string

A human-readable name for the schedule.

Example:

"Business Hours Policy"

timezone
string

The IANA timezone identifier that this schedule operates in. All start and end times are relative to this timezone.

Example:

"Australia/Sydney"

active
boolean

A read-only flag indicating whether the schedule is currently within an active time slot. This is calculated by the system.

Example:

true

updated_at
string<date-time>

The timestamp of when the schedule was last updated.

Example:

"2025-10-29T01:43:31Z"

created_at
string<date-time>

The timestamp of when the schedule was created.

Example:

"2025-10-29T01:43:31Z"

hours
object[]

A list of time slots that define the active periods for this schedule.

metadata
object[]

A list of key-value pairs that can be used to store additional information about the schedule.