canonical: https://jentic.com/apis/pagertreecom/pagertree

# Pagertreecom PagerTree API

The PagerTree API is organized around REST for managing alerts, teams, schedules, escalation policies, integrations, and users. It supports creating, reading, updating, and deleting alerts with state transitions (acknowledge, reject, resolve), managing on-call schedules with time-window events, configuring team memberships and escalation policies, setting up integrations for alert ingestion, and managing user notification preferences. Returns JSON-encoded responses and uses standard HTTP verbs and status codes. Does not support bulk updates.

## For AI agents

Manage PagerTree alerts, teams, schedules, escalation policies, integrations, and users with state transitions and on-call workflows.

## Scope

Manages alerts, teams, schedules, integrations, and users. Does not expose escalation policy configuration, webhook delivery logs, or billing management - use the PagerTree UI for those settings. Does not support bulk updates.

## Capabilities

- Create, read, update, and delete alerts with urgency levels and metadata
- Transition alert states via acknowledge, reject, and resolve actions
- Comment on alerts to add context and collaboration
- Manage teams with members, admins, and escalation policy bindings
- Query current on-call users for teams and schedules
- Create and manage on-call schedules with event time windows
- Flush schedules to remove all events
- Configure integrations for alert ingestion from external systems
- Manage users with notification preferences (push, email, SMS, voice)
- Paginate and filter alerts, teams, integrations, and users

## Use cases

### Incident Response Workflow

SRE teams can automate incident response by creating alerts via POST /alerts with urgency and destination teams, then transitioning alert states through acknowledge, resolve, or reject actions. GET /alerts lists paginated alerts, and POST `/alerts/{id}/comments` adds collaboration notes. Combined with `/teams/{id}/current_oncall`, responders can route alerts to the on-call engineer and track resolution progress, building an automated incident management pipeline.

Example prompt: POST /alerts with title, urgency, and destination_team_ids to create an alert, then POST `/alerts/{id}/acknowledge` to accept it, add comments via POST `/alerts/{id}/comments`, and POST `/alerts/{id}/resolve` when fixed.

### On-Call Schedule Management

Operations teams can programmatically manage on-call rotations by creating schedules via POST /schedules and querying on-call attendees via GET `/schedules/{id}/current_oncall` or GET `/schedules/{id}/window_events` with start/end times. GET `/teams/{id}/current_oncall` returns the current on-call team members. This enables automated on-call dashboards, shift notifications, or integration with calendar systems for visibility into who is responsible at any given time.

Example prompt: POST /schedules with a name to create a schedule, then GET `/schedules/{id}/current_oncall` to see who is on-call now, or GET `/schedules/{id}/window_events` with start and end query parameters to list on-call periods.

### Monitoring Tool Integration

DevOps platforms can integrate alert sources like Datadog, Prometheus, or custom monitors by creating integrations via POST /integrations with urgency, integration_type_id, and destination team_ids. Each integration generates a webhook URL for the external tool to post alerts. GET /integrations lists configured integrations, and PUT `/integrations/{id}` updates routing or urgency. This centralizes alert ingestion from multiple monitoring tools into a unified incident workflow.

Example prompt: POST /integrations with name, urgency, integration_type_id, and team_ids to create an integration, then configure the external monitoring tool to send alerts to the generated webhook URL.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/alerts` | Create an alert |
| POST | `/alerts/{id}/acknowledge` | Acknowledge an alert |
| POST | `/alerts/{id}/resolve` | Resolve an alert |
| POST | `/alerts/{id}/comments` | Comment on an alert |
| GET | `/teams/{id}/current_oncall` | Get team's current on-call users |
| POST | `/schedules` | Create a schedule |
| GET | `/schedules/{id}/current_oncall` | Get schedule's current on-call |
| GET | `/schedules/{id}/window_events` | List on-call events in a time window |
| POST | `/integrations` | Create an integration |

## Key resources

- **Alerts** — Create, read, update, delete, and transition alerts with urgency, tags, and metadata
- **Alert Actions** — Acknowledge, reject, and resolve alerts; add comments
- **Teams** — Manage teams with members, admins, escalation policies, and current on-call queries
- **Schedules** — Create and manage on-call schedules; query current on-call and time-window events
- **Integrations** — Configure alert ingestion integrations with routing and urgency
- **Users** — Manage users with notification preferences (push, email, SMS, voice)

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 66 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 89 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 50 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 63 / 100
- **View full report:** https://jentic.com/apis/pagertreecom/pagertree/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring PagerTree by hand means handling its bearer-token auth against api.pagertree.com/api/v4, shaping alert and schedule payloads, and building your own retry and error handling. Through Jentic you install once, import the PagerTree API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** PagerTree puts the alert id in the URL path (`/alerts/{id}/acknowledge`), so a rule can pin your agent to one alert: it can acknowledge or comment on that alert and nothing else. You choose the operations it may call, so resolving alerts or creating integrations is not included unless you add them.
- **Credential handling:** Your PagerTree key is stored once, encrypted, by your own Jentic One instance and injected as the Authorization bearer header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a PagerTree alert' or 'get current on-call users', and Jentic returns the matching PagerTree operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **PagerDuty API** — PagerDuty offers enterprise-grade incident management with advanced analytics and integrations.
- **Opsgenie API** — Opsgenie provides incident management and on-call scheduling with Atlassian integration.

## FAQ

### What authentication does the PagerTree API use?

The PagerTree API uses bearer token authentication. Obtain an API key from your User Settings page and pass it in the Authorization header as 'Bearer <api_key>'. Through Jentic, keys are stored encrypted and injected automatically at execution time.

### Can I query who is currently on-call?

Yes. GET `/teams/{id}/current_oncall` returns the current on-call users for a team, and GET `/schedules/{id}/current_oncall` returns the on-call attendees for a schedule at the current time.

### How do I transition alert states?

Use POST `/alerts/{id}/acknowledge` to acknowledge an alert, POST `/alerts/{id}/resolve` to resolve it, or POST `/alerts/{id}/reject` to reject it. Each action requires the alert to be in a valid state (e.g., resolve requires open, dropped, or acknowledged state).

### Does the API support bulk updates?

No. The PagerTree API does not support bulk updates. You must make individual requests for each alert, team, schedule, integration, or user operation.

### Can I retrieve on-call schedules for a specific time range?

Yes. GET `/schedules/{id}/window_events` with start and end query parameters returns on-call attendees for the specified time window.

### How do I integrate monitoring tools like Datadog?

Create an integration via POST /integrations with the appropriate integration_type_id and destination team_ids. The response includes a webhook URL that you configure in your monitoring tool to send alerts to PagerTree.

### Can I limit what my agent is allowed to do with the PagerTree API?

Yes. Because you run Jentic One yourself, your own rules decide which PagerTree operations and credentials your agent may use. Since PagerTree puts the alert id in the URL path, such as POST `/alerts/{id}/acknowledge` and POST `/alerts/{id}/comments`, you can scope the agent to a single alert and let it acknowledge or comment on that alert and nothing else. Operations like POST `/alerts/{id}/resolve` or POST /integrations stay off limits unless you explicitly grant them.
