PagerDuty API: what you can do and how to use it with AI agents
The PagerDuty REST API lets engineering and operations teams manage incident response from their own tools. It covers incidents, services, schedules, escalation policies, users and more, and a separate Events API sends alerts in. Teams use it to open and update incidents, read who is on call and build reports. Access uses an API key or OAuth.
What the PagerDuty API offers
Incidents
List, create, acknowledge, resolve and annotate incidents, with their log entries and notes.
Services
Read and manage the services that alerts and incidents belong to, and their integrations.
Schedules and on-calls
See who is on call now or at a given time, and read or edit schedules and overrides.
Escalation policies and teams
Read how incidents escalate and which team owns each policy.
Users and notifications
Read users, their contact methods and notification rules.
Events and webhooks
Send alerts and changes in through the Events API, and receive notifications about incidents through webhooks.
How to access the PagerDuty API
- With your company’s credentialsThe REST API accepts an API key sent in the Authorization header as a token (Token token=KEY), or an OAuth access token as Bearer, together with an Accept header that names the API version. General access keys can read and write across the account, and read-only keys can be created. Creating an incident also requires a From header with the email of a valid user. The Events API uses its own routing key per integration.
- Acknowledging, resolving or escalating incidents changes who gets woken up, so keep those actions behind human approval.
- The REST API has rate limits and answers with a 429 status when you exceed them; read the rate-limit headers and back off.
- Use read-only keys wherever the agent only needs to look, and keep the Events routing key out of prompts.
Official documentation: docs.pagerduty.com/developer/api/reference/rest
Example: list open incidents with the PagerDuty API
curl "https://api.pagerduty.com/incidents?statuses[]=triggered&statuses[]=acknowledged" \
-H "Authorization: Token token=$PAGERDUTY_API_KEY" \
-H "Accept: application/vnd.pagerduty+json;version=2"The agent reads the incidents that are still triggered or acknowledged, a read-only call. The Authorization header carries the API key as a token and Accept names the API version.
Source: docs.pagerduty.com. Check the official documentation for the current version and your plan.
What an iTeam agent does with the PagerDuty API
Incident briefing
When an incident opens, the agent gathers the service, recent changes and past similar incidents, and posts a short briefing in the team channel.
On-call handover
At the end of a shift the agent summarizes open incidents and what was tried, so the next person starts with context.
Alert noise review
Each week the agent finds the services and alerts that page most often and drafts a proposal to tune them, for the team to approve.
Post-incident follow-up
After resolution, the agent drafts the timeline and action items from the incident log, and a person reviews them before they are shared.
From the credential to the agent at work, with approval
Create the key
In PagerDuty, create an API key, preferably read-only for the first tests, or register an app for OAuth.
Store it in the vault
Save the key in the iTeam vault. Each agent receives only the allowed actions, such as reading incidents and on-call, and never resolving them.
Validate on a test service
Create a test service in PagerDuty, point the agent at it, and keep approval on every write while you check the behavior.
Ready-made AI teams for this work
Questions about the PagerDuty API
Is the PagerDuty API free?
We could not confirm a separate API fee. API access comes with PagerDuty's plans, and what is available can depend on the plan, so check the official pricing page.
Do I need to code to use the PagerDuty API with iTeam?
Not necessarily. iTeam's HTTP tool reads the API documentation and learns the calls, and the deployment team sets up credentials, permissions and tests with you.
Is incident data safe with an agent?
Keys stay in the vault, never in prompts. The agent only reads what its role allows, every action is logged, and anything that changes an incident waits for a person.
Can I test without paging anyone?
Yes. Use a test service with a test escalation policy, so that nobody real is notified while you validate the agent.