---
title: "PATCH /api/v1/contacts/{pk}/oncall/"
method: PATCH
path: "/api/v1/contacts/{pk}/oncall/"
tags: ["contacts"]
---

# PATCH /api/v1/contacts/{pk}/oncall/

`PATCH /api/v1/contacts/{pk}/oncall/`

## Request

- Base URL: `https://uptime.com` (the document declares no server; this is the origin it was published from)
- URL: `https://uptime.com/api/v1/contacts/{pk}/oncall/`
- Auth: none declared
- TypeScript: <https://skmtc.dev/uptime/apis/uptime-com-openapi-schema/docs/api/v1/contacts/:pk/oncall/patch.ts> (a function with typed inputs; its response is checked against the schema)

Set the on-call schedule for a contact.

**Sample data (JSON):**

    # Set always on-call
    {
        "state": "ACTIVE"
    }

    # Set weekly on-call schedule
    {
        "state": "SCHEDULED",
        "schedule": [{
            "type": "WEEKLY",
            "from_time": "03:15",
            "to_time": "18:30",
            "weekdays": [6, 0]
        }]
    }

    # Set monthly schedule
    {
        "state": "SCHEDULED",
        "schedule": [{
            "type": "MONTHLY",
            "from_time": "03:15",
            "to_time": "18:30",
            "monthday": 7
        }]
    }

    or

    {
        "state": "SCHEDULED",
        "schedule": [{
            "type": "MONTHLY",
            "from_time": "03:15",
            "to_time": "18:30",
            "monthday_from": 7,
            "monthday_to": 9
        }]
    }

## Path parameters

- `pk` string, required

## Request body

- ContactGroupOnCallSchedule
  - `state` 'ACTIVE' | 'SUPPRESSED' | 'SCHEDULED', required: Whether to use an on-call schedule. Either ACTIVE (always on call) or SCHEDULED (use defined schedule).
  - `schedule` object[]: The schedule entries for when the contact is on-call; see example above.
    - `id` integer
    - `weekdays` integer[], required
    - `to_time` string, nullable
    - `type` 'WEEKLY' | 'MONTHLY' | 'ONCE', required
    - `once_start_date` string, date-time, nullable
    - `once_end_date` string, date-time, nullable
    - `from_time` string, nullable
    - `monthday_from` integer
    - `monthday_to` integer

## Response `200`

- ContactGroupOnCallSchedule
  - `state` 'ACTIVE' | 'SUPPRESSED' | 'SCHEDULED', required: Whether to use an on-call schedule. Either ACTIVE (always on call) or SCHEDULED (use defined schedule).
  - `schedule` object[]: The schedule entries for when the contact is on-call; see example above.
    - `id` integer
    - `weekdays` integer[], required
    - `to_time` string, nullable
    - `type` 'WEEKLY' | 'MONTHLY' | 'ONCE', required
    - `once_start_date` string, date-time, nullable
    - `once_end_date` string, date-time, nullable
    - `from_time` string, nullable
    - `monthday_from` integer
    - `monthday_to` integer

---

[API](https://skmtc.dev/uptime/apis/uptime-com-openapi-schema.md) - [All operations](https://skmtc.dev/uptime/apis/uptime-com-openapi-schema/llms.txt) - [OpenAPI document](https://skmtc.dev/uptime/apis/uptime-com-openapi-schema/revisions/e1e4a57a60d8?raw)
