Create an alert schedule

POST/alertSchedules

Base URL: https://api.tinkermode.com

Create an alert schedule.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain the key of a user or service account with permissions to create alert schedules or a project API key with the admin operation permission.

Request body

Content type: application/json

PropertyTypeRequiredConstraintsDescription
descriptionstringNodefault: ""Optional description for the alert schedule
entityIdstringNoOptional entity ID if the schedule is associated with a specific entity
namestringYesThe name of the alert schedule
timeZonestringYesThe time zone to use for the schedule (IANA time zone database format, e.g. 'America/New_York')
weeklySchedulesobjectYesWeekly schedule configuration

Request example

{
  "description": "Standard business hours for weekdays with extended hours on Friday",
  "entityId": "entity123456",
  "name": "Business Hours Schedule",
  "timeZone": "America/New_York",
  "weeklySchedules": {
    "friday": {
      "timeWindows": [
        {
          "end": "18:00:00",
          "start": "09:00:00"
        }
      ]
    },
    "monday": {
      "timeWindows": [
        {
          "end": "17:00:00",
          "start": "09:00:00"
        }
      ]
    },
    "saturday": {
      "timeWindows": [
        {
          "end": "14:00:00",
          "start": "10:00:00"
        }
      ]
    },
    "sunday": {
      "timeWindows": []
    },
    "thursday": {
      "timeWindows": [
        {
          "end": "17:00:00",
          "start": "09:00:00"
        }
      ]
    },
    "tuesday": {
      "timeWindows": [
        {
          "end": "17:00:00",
          "start": "09:00:00"
        }
      ]
    },
    "wednesday": {
      "timeWindows": [
        {
          "end": "17:00:00",
          "start": "09:00:00"
        }
      ]
    }
  }
}

Responses

201 Successfully created a new alert schedule.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
descriptionstringNodefault: ""Optional description for the alert schedule
entityIdstringNoOptional entity ID if the schedule is associated with a specific entity
namestringNoThe name of the alert schedule
projectIdintegerNoThe unique identifier for the project the alert rule belongs to
timeZonestringNoThe time zone to use for the schedule (IANA time zone database format, e.g. 'America/New_York')
weeklySchedulesobjectNoWeekly schedule configuration

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of invalid data or denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.