Explore documentation

Create an on-call calendar event

Create a new event in the given on-call calendar.

POST https://uptime.betterstack.com/api/v2/on-calls/{calendar_id}/events

URL parameters

calendar_id
required string

Headers

Authorization
required string

Body parameters

starts_at
required date
ends_at
required date
users
required array
200

Response body

{
  "id": 12345678,
  "starts_at": "2025-01-01T09:00:00Z",
  "ends_at": "2025-01-01T17:00:00",
  "users": [
    "tomas@betterstack.com"
  ]
}

Example cURL

Example
curl --request POST \
  --url "https://uptime.betterstack.com/api/v2/on-calls/default/events" \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"starts_at":"2025-01-01T09:00:00Z","ends_at":"2025-01-01T17:00:00","users":["tomas@betterstack.com"]}'