Fast and reliable incident response isn't optional anymore—your customers expect it. PagerDuty, with its powerful API, sits at the center of incident management, offering a robust platform that helps teams catch and fix issues before users notice anything wrong.
The PagerDuty API lets you build custom automations that make monitoring, alerting, and incident response workflows smoother than ever. Research from PagerDuty shows companies automating their incident management fix problems 70% faster.
When you combine PagerDuty's specialized APIs with a solid API management platform, you unlock serious potential. A code-first approach gives developers control over every step of the incident lifecycle—from detection to resolution—while keeping everything secure and performant.
Whether you want to connect your monitoring tools, build custom dashboards, or create smart automation workflows, getting familiar with the PagerDuty API ecosystem is your first step toward stronger operations. This guide has all you need to get started.
Understanding PagerDuty API Components#
When connecting to PagerDuty's incident management platform, knowing the different API pieces helps you build effective automations. PagerDuty offers three main API types, each handling specific parts of your incident management workflows.
Overview of the PagerDuty API Types#
- REST API: The PagerDuty REST API gives you complete access to manage everything in PagerDuty. Use it to handle incidents, users, schedules, and more through standard operations.
- Events API: The PagerDuty Events API focuses on triggering, acknowledging, and resolving incidents in real-time. It's the main way to connect monitoring tools with PagerDuty.
- Webhooks: PagerDuty's webhook system pushes updates to your systems as incidents change. This lets you build responsive automated processes that react immediately when something changes.
Choosing the Right PagerDuty API for Your Needs#
Your specific goals determine which PagerDuty API makes the most sense:
For managing all your PagerDuty resources, the REST API excels at:
- Creating and updating on-call schedules
- Managing user accounts and permissions
- Getting detailed incident information for reports
When you need to create incidents from monitoring tools, the Events API works best for:
- Creating new incidents from system alerts
- Updating incidents with acknowledgments or resolutions
- Sending custom event data to PagerDuty
For instant updates about incident changes, webhooks provide:
- Immediate notifications when incidents change state
- Triggers for automated responses
- Data for live dashboards showing current incidents
These APIs work best together. You might use the Events API to create incidents, webhooks to get real-time updates, and the REST API to manage the entire incident lifecycle programmatically.
Integrating the PagerDuty REST API#
The PagerDuty REST API gives you programmatic control over your incident management ecosystem. With it, you can automate everything from creating incidents to managing schedules, forming a foundation for API integration platform creation.
Authentication and Request Headers#
Security matters when handling incident data. PagerDuty offers two main ways to authenticate:
- API Access Keys: Perfect for server-to-server connections, include your key in the Authorization header:
Authorization: Token token=YOUR_API_KEY - OAuth 2.0: For apps acting on behalf of users, OAuth 2.0 provides better security through temporary tokens:
Authorization: Bearer YOUR_ACCESS_TOKEN
For more on choosing the right API authentication methods, consider the security requirements of your application. To better understand which method suits your needs, you can refer to an in-depth API authentication comparisons.
Always include these headers with requests:
Accept: application/vnd.pagerduty+json;version=2
Content-Type: application/json
Common Endpoints and Actions#
The PagerDuty REST API has many endpoints, but these are the workhorses for most integrations:
- Incidents: Manage the incident lifecycle
- List incidents:
GET /incidents
- Create an incident:
POST /incidents
- Update an incident:
PUT /incidents/{id}
- List incidents:
- Services: Configure monitored services
- List services:
GET /services
- Get service details:
GET /services/{id}
- Create a service:
POST /services
- List services:
- Schedules: Manage on-call rotations
- List schedules:
GET /schedules
- Get schedule details:
GET /schedules/{id}
- Create overrides:
POST /schedules/{id}/overrides
- List schedules:
When using the REST API, handle errors properly and respect rate limits. Watch the X-RateLimit-Remaining
header and add retry logic with exponential backoff for 429 responses to keep critical integrations running smoothly.
Customizing Alerts with the PagerDuty Events API#
The PagerDuty Events API connects your monitoring tools and applications to PagerDuty's incident management system. Unlike other APIs, it has one job: handling incident creation and updates based on real-time events.
Introduction to the PagerDuty Events API#
The Events API supports three main event types:
- Trigger: Creates a new incident or adds to an existing one
- Acknowledge: Marks an incident as being worked on
- Resolve: Closes an incident
These event types match the natural lifecycle of incidents, letting your monitoring systems manage the entire incident process automatically from detection to resolution.
Configuration and Use Cases#
The PagerDuty Events API shines when connected to monitoring systems. Common setups include:
- Infrastructure monitoring: Connect tools like Nagios or Prometheus to trigger incidents when servers, networks, or databases have problems.
- Application performance monitoring: Have New Relic or AppDynamics create PagerDuty incidents when applications experience errors or slow down.
- Custom application integrations: Add Events API calls directly in your applications to trigger incidents for critical errors that need immediate attention.
When using the Events API, you can customize incident details to give responders rich context:
payload = {
"routing_key": "YOUR_INTEGRATION_KEY",
"event_action": "trigger",
"payload": {
"summary": "Database connection pool exhausted",
"severity": "critical",
"source": "mysql-prod-01",
"component": "database",
"group": "production",
"class": "connectivity"
}
}
Version Differences and Enhancements#
PagerDuty's Events API has evolved, with the current v2 offering improvements over v1:
- Better deduplication: V2 has smarter incident deduplication based on the
dedup_key
. - Custom event fields: V2 supports custom fields for extra structured data.
- Links and images: V2 lets you attach relevant links and images to incidents.
- Better client information: V2 allows more details about the client sending the event.
The v2 enhancements provide much richer context, helping responders understand and fix incidents faster.
Leveraging PagerDuty API Webhooks for Real-Time Notifications#
Webhooks complete the picture for truly two-way PagerDuty integrations. While the REST and Events APIs let you send data to PagerDuty, webhooks push real-time updates back to your systems.
Webhooks Overview#
PagerDuty webhooks send notifications about incidents, alerts, and other events to your applications as they happen. Key benefits include:
- Instant notification when incidents change
- Less API usage compared to polling
- Real-time data for dashboards
- Easy automation of downstream processes
Setting Up Webhooks#
Setting up webhooks in PagerDuty takes just a few steps:
- Create a secure HTTPS endpoint in your application that can receive POST requests.
- In your PagerDuty account, go to Integration → Generic Webhooks and click Add Webhook.
- Enter your endpoint URL and pick the events you want to receive.
- Add verification in your endpoint to confirm incoming webhook requests are authentic using the shared secret.
Your webhook endpoint should quickly return a 2xx status code to acknowledge receipt. Any processing should happen asynchronously to avoid timeouts.
Use Cases for Webhooks#
Organizations use PagerDuty webhooks in clever ways to improve their incident management:
- Service desk integration: Automatically create tickets in Jira, ServiceNow, or Zendesk when PagerDuty incidents happen.
- Team communication: Send targeted messages to Slack channels or Microsoft Teams when incidents affect specific services.
- Custom dashboards: Power live incident dashboards showing current operational status. Utilizing API monitoring tools can enhance the visibility and performance of these dashboards.
- Runbook automation: Trigger automated fix scripts when specific types of incidents occur.
- Incident analytics: Collect incident data in real-time for analysis and reporting. By leveraging API usage analytics, you can gain valuable insights from real-time incident data.
When implementing webhooks, security must be a priority. Verify all incoming webhooks using the X-PagerDuty-Signature
header, which contains an HMAC-SHA256 signature of the request body using your webhook's secret key.
Advanced Integration Techniques#
Building solid PagerDuty API integrations means tackling practical challenges like rate limits, error handling, and security. These techniques help create reliable, secure, and efficient integrations.
Handling Rate Limits and Error Responses#
PagerDuty uses rate limits to keep the platform stable. A smart approach to these limits is key for reliable integrations:
- Use Exponential Backoff: When you hit rate limits (429 responses), use exponential backoff with jitter to retry safely.
- Be Proactive: Watch the
X-RateLimit-Remaining
header and slow down requests as you approach limits. - Batch Requests: Use bulk endpoints where available to minimize API calls.
- Use Caching: Cache data that doesn't change often, like users and services, to reduce API usage.
Implementing these strategies can prevent disruptions caused by rate limiting. If you encounter "API Rate Limit Exceeded" errors, here's how to fix them.
Custom Solutions and Best Practices#
The most effective PagerDuty implementations go beyond basic integrations to create tailored solutions addressing specific operational challenges. Building custom integrations can address specific operational challenges and extend your platform's capabilities.
- Smart Alert Correlation: Build middleware that analyzes incoming alerts before they reach PagerDuty. This can group related issues, enrich with context data, and apply custom routing logic. For example, translating SQL queries into API requests can provide real-time data to enhance alert context.
- Automated Runbook Integration: Attach relevant runbooks to incidents based on alert types. When critical incidents trigger, the system can automatically:
- Load runbook steps directly into the incident timeline
- Initiate preliminary diagnostic commands
- Pre-populate troubleshooting data
- Include links to related knowledge base articles
- Context-Aware Escalation: Develop dynamic escalation policies that adapt based on incident context. This might escalate database issues differently than network outages, or adjust escalation timing based on customer impact severity.
- Self-Healing Systems: Design systems where PagerDuty webhooks trigger automated remediation workflows before human intervention. For example, a cloud infrastructure team built a system that automatically:
- Attempts restart of failed services
- Scales up resources during load spikes
- Fails over to backup systems
- Creates incidents only when automation fails
- Incident Aggregation Dashboards: Build executive-level dashboards that aggregate data from multiple monitoring systems and PagerDuty via APIs to show real-time operational health across the organization.
Leading organizations implement rigorous testing cycles for their PagerDuty integrations, including regular "game days" where they simulate failures to ensure their alerting and automation systems work as expected. This approach helps identify gaps in coverage and refine alert thresholds to reduce both false positives and missed issues.
Security Best Practices#
Security can't be an afterthought with PagerDuty integrations:
- Secure API Key Management:
- Never hardcode API keys in your code
- Use a secrets manager for secure storage
- Rotate keys regularly (at least quarterly)
- Create service-specific API keys with minimal permissions
- Zero-Trust Implementation:
- Use TLS 1.2+ for all API traffic
- Validate all webhook signatures with HMAC verification
- Set up IP allowlists for webhook endpoints using PagerDuty's published IP ranges
- Defense in Depth:
- Set request timeouts to prevent hanging connections
- Add alerts for unusual API usage patterns
- Log all API transactions for audits
- Use OAuth 2.0 with short-lived tokens when possible
Implementing these API security best practices ensures your integrations remain secure and compliant.
Exploring PagerDuty API Alternatives#
While PagerDuty offers a robust incident management platform, several alternatives provide different approaches to API-driven incident management.
Zuplo#
While Zuplo is not a direct incident management platform, it serves as a programmable API gateway that can augment incident workflows by enabling intelligent routing, authentication, and transformation of alert and webhook data. For teams building custom incident response pipelines, Zuplo offers:
- Serverless middleware for preprocessing webhook data before forwarding to tools like PagerDuty, OpsGenie, or Slack
- Built-in authentication, rate-limiting, and observability for alert-generating endpoints
- Easy integration with logging and monitoring tools to enforce policy at the edge
- JavaScript-based customization for custom response logic or throttling noisy alerts
Teams seeking to build more flexible and secure alert ingestion endpoints can use Zuplo alongside traditional incident management APIs.
OpsGenie#
OpsGenie offers a comparable API structure with strong routing capabilities. Key differences include:
- More flexible team-based routing options
- Different approach to on-call scheduling APIs
- Enhanced mobile notification controls
- Simpler Jira integration for development teams
Many organizations find OpsGenie's API documentation more accessible for new developers, though PagerDuty's API tends to offer more granular control for complex scenarios.
VictorOps (now Splunk On-Call)#
Splunk On-Call provides a unified observability approach with:
- Deep integration with Splunk's analytics platform
- Strong focus on post-incident learning APIs
- Built-in collaboration tools with API access
- Different webhook structure optimized for Splunk integration
Teams already using Splunk for monitoring may find this integration particularly valuable.
xMatters#
xMatters focuses heavily on communication workflows:
- Sophisticated escalation and notification APIs
- Advanced communication templates
- Strong integration with ITSM platforms
- Rich contextual data delivery to responders
xMatters often appeals to enterprise organizations with complex communication requirements across departments.
Open Source Alternatives#
For teams seeking open-source alternatives:
- Prometheus Alertmanager: Provides a simpler API focused primarily on alert routing and grouping
- OpenDistro for Elasticsearch: Offers alerting APIs deeply integrated with Elasticsearch
- Grafana OnCall: Newer option with growing API capabilities tightly integrated with Grafana
These options typically require more configuration but offer greater customization potential and zero licensing costs.
Integration Considerations#
When evaluating alternatives to PagerDuty's API ecosystem, consider:
- Your existing monitoring stack and required integrations
- Specific webhook formats supported by your applications
- Authentication methods and security requirements
- Development resources available for implementation
- Required customization level for your alerting workflows
Many organizations implement abstraction layers in their incident management workflows, allowing them to switch between providers or use multiple providers simultaneously without significant codebase changes.
PagerDuty Pricing#
PagerDuty offers several pricing tiers with different API access levels and capabilities. Understanding these distinctions helps organizations choose the right plan for their integration needs.
Free Tier#
The free tier includes basic API access with:
- Limited REST API access
- Core Events API functionality
- Basic webhook capabilities
- Restricted API call volume
While suitable for small teams or testing, the free tier has notable restrictions on API usage and integration options.
Professional Tier#
The professional tier expands API capabilities with:
- Full REST API access
- Complete Events API functionality
- Advanced webhook configuration
- Higher API rate limits
- Service-level API keys
- Modern incidents API access
This tier meets most organizations' needs, especially those implementing custom integrations or automations.
Business Tier#
For organizations requiring more sophisticated API usage:
- Extended API rate limits
- Advanced event intelligence features
- Custom fields in API responses
- Enhanced reporting API access
- Advanced analytics API integration
- API access to business service configuration
Enterprise organizations with complex operational needs often require this tier.
Enterprise Tier#
The enterprise tier provides the most comprehensive API access:
- Maximum API rate limits
- Full analytics API access
- Priority API support
- Custom API solutions
- Data retention API controls
- Advanced security features for API access
Organizations with mission-critical systems or regulatory requirements typically need enterprise-level capabilities.
API Access Considerations#
When selecting a PagerDuty pricing tier, consider:
- Your expected API call volume
- Required data retention periods for API-accessible data
- Authentication and security requirements
- Custom field needs in your integration
- Number of services you'll connect via API
- Technical support requirements for your API implementation
PagerDuty offers custom pricing for organizations with specific API requirements or unusually high API usage patterns. Visit their pricing page for detailed information on all these plans as well as custom pricing options.
Optimize Incident Management with Pagerduty API#
The PagerDuty API transforms incident management from a reactive process into a streamlined, automated system. By integrating it into your operational workflows, you detect issues faster, route them to the right teams automatically, and resolve them more efficiently.
The most successful implementations combine the REST API, Events API, and webhooks to create end-to-end automation that cuts manual work and speeds up incident resolution. Whether you're building custom dashboards, connecting with your monitoring stack, or creating ChatOps solutions, the PagerDuty API provides the foundation for stronger operations.
Ready to take your API management to the next level? Zuplo can secure, manage, and optimize your PagerDuty API integrations with powerful developer-friendly tools. Sign up for a free Zuplo account and see how we can help your team build more resilient, responsive incident management workflows with just a few clicks.