Incident Schedule Management

Incident Schedule Management enables teams to organize, assign, and maintain on-call rotations to ensure timely response to incidents. It provides the ability to retrieve schedules for specific customers, create new team-based on-call schedules, update existing schedules, and remove outdated ones.

This system ensures that there is always designated coverage, reducing response delays and improving operational resilience during both business hours and off-hours.

Key capabilities:
  • Customer-specific scheduling — Retrieve on-call schedules assigned to specific customers or organizational units.
  • Team shift planning — Set up recurring or custom schedules to ensure 24/7 availability across teams.
  • Flexible updates — Adjust existing schedules to accommodate team changes, holidays, or escalations.
  • Schedule cleanup — Remove outdated or inactive shifts to keep on-call rosters current and reliable.
ENDPOINTS
Collapse all
  • On-call schedule management
    GET/customer/{id}/schedule
    POST/team/{id}/schedule
    PUT/team/{id}/schedule
    DELETE/team/{id}/schedule
Get Customer Schedules
Retrieve all on-call schedule data associated with a specific customer by providing the customer_id in the path. The response includes schedule entries that define which team members are responsible for incident response during specific time intervals.

This endpoint helps ensure visibility into who is currently on duty or scheduled for upcoming shifts, enabling seamless coordination and faster incident triage.

Use cases:
  • On-call visibility — View active and upcoming shifts for a customer to understand who is responsible during incidents.
  • Audit and reporting — Analyze historical scheduling data to verify coverage and response availability.
  • Manual coordination — Help team leads or incident managers plan shift handovers or update escalation contacts based on predefined schedules.


Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will return the schedule data, including start and end dates, months, weeks, and days of the schedule.
  • If the request is unauthorized, the system will return an authentication error message.
Path Parameters
  • id string
    The unique ID of the customer whose schedule is being retrieved. Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = "https://incident-query.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/schedule";

axios.get(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Create On-Call Schedule
Create a new on-call schedule for a team by submitting schedule configuration details in the request body. This allows you to assign specific team members to recurring or time-bound shifts based on custom rules.

The request body should include fields such as the team_member_id, start_date, end_date, and the time recurrence parameters including months_of_year, weeks_of_month, week_days, and time_range. These options provide flexible scheduling across daily, weekly, or monthly cycles.

Use cases:
  • 24/7 incident coverage — Build reliable on-call rotations to ensure someone is always available to respond.
  • Custom shift planning — Create unique patterns such as weekday-only coverage, weekend rotation, or split-shift assignments.
  • Automated scheduling infrastructure — Power internal systems with rule-based, structured on-call assignments for each team.

To retrieve existing schedules for a customer, use the Get Customer Schedules endpoint.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will create a new schedule and return a confirmation message.
  • If the request is invalid, the system will return an error message with details of the invalid fields.
Path Parameters
  • id string
    The unique ID of the team for which the schedule is being created. Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
Request Body Parameters
  • team_member_id string
    The unique ID of the team member assigned to the schedule.
  • start_date (advanced) string
  • end_date (advanced) string
  • months_of_year (advanced) array of positive integers
  • weeks_of_month (advanced) array of integers
  • week_days array of positive integers and zero
  • start_time string
  • end_time string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://incident-cmd.api.pinghome.io/v1/team/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/schedule';
const data = {
  team_member_id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed",
  start_date: "2024-01-01T00:00:00Z",
  end_date: "2024-01-31T23:59:59Z",
  months_of_year: [1],
  weeks_of_month: [1],
  week_days: [1],
  start_time: "00:00:00",
  end_time: "23:59:59"
};

axios.post(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Update On-Call Schedule
Update an existing on-call schedule for a team by providing the team_id in the path and submitting the updated configuration in the request body. This allows you to modify both the timing and recurrence rules that define when a team member is expected to be on-call.

The request body should include fields such as team_member_id, start_date, end_date, and recurrence settings including months_of_year, weeks_of_month, week_days, and the time_range.

Use cases:
  • Schedule correction — Fix time or date ranges for an existing schedule due to entry errors or changes in availability.
  • Role reassignment — Update the assigned team_member_id to reflect staffing or rotation changes.
  • Recurrence adjustments — Modify which months, weeks, or weekdays a schedule applies to as coverage needs evolve.

To view the current schedule for reference before updating, use the Get Customer Schedules endpoint.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will update the existing schedule and return a confirmation message.
  • If the request is invalid, the system will return an error message with details of the invalid fields.
Path Parameters
  • id string
    The unique ID of the team for which the schedule is being updated. Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
Request Body Parameters
  • team_member_id string
    The unique ID of the team member assigned to the schedule.
  • start_date (advanced) string
  • created_at string
  • end_date (advanced) string
  • months_of_year (advanced) array of positive integers
  • weeks_of_month (advanced) array of integers
  • week_days array of positive integers and zero
  • start_time string
  • end_time string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://incident-cmd.api.pinghome.io/v1/team/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/schedule';
const data = {
  team_member_id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed",
  created_at: "2024-01-01T00:00:00Z",
  start_date: "2024-01-01T00:00:00Z",
  end_date: "2024-01-31T23:59:59Z",
  months_of_year: [1],
  weeks_of_month: [1],
  week_days: [1],
  start_time: "00:00:00",
  end_time: "23:59:59"
};

axios.put(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Delete On-Call Schedule
Delete an existing on-call schedule for a team member by providing the team_member_id and the created_at timestamp as query parameters. These two values uniquely identify the schedule entry that should be removed.

This endpoint is useful for cleaning up outdated shift assignments, correcting scheduling errors, or removing temporary coverage entries.

Use cases:
  • Coverage cleanup — Remove outdated or duplicate schedule entries from a team member’s on-call calendar.
  • Incorrect assignment fix — Delete a schedule entry created with the wrong timing or person assigned.
  • Temporary shift removal — Cancel a one-time or ad hoc on-call period that is no longer needed.

To modify a schedule instead of deleting it, use Update On-Call Schedule.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will delete the specified on-call schedule and return a confirmation message.
  • If the request is invalid, the system will return an error message with details of the invalid fields.
Path Parameters
  • id string
    The unique ID of the team for which the schedule is being deleted. Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
Query Parameters
  • team_member_id string
    The unique ID of the team member whose schedule is being deleted. Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
  • created_at string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://incident-cmd.api.pinghome.io/v1/team/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/schedule';

axios.delete(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  },
  params: {
    'team_member_id': '445a5c1f-c0eb-403a-96d7-3976e5dc74ed',
    'created_at': '2024-01-01T00:00:00Z'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).