About Opsgenie
Opsgenie is Atlassian’s incident-management and on-call scheduling platform. Connecting Opsgenie to Serval lets you create, update and route alerts or incidents as part of fully-automated runbooks.What the Opsgenie integration enables
Capability | Description |
---|---|
Access Management | Create, update, and manage users and their permissions |
Automation workflows | Streamline alert routing and incident management |
Opsgenie Configuration
In Opsgenie there are two equally valid ways to obtain an API key, and which one you choose depends on how much scope you need and what plan your organisation is on:Key type | Scope & typical use | Where you create it | Who can create it |
---|---|---|---|
Account-level key | Full-account configuration and reporting calls (ideal when Serval needs to manage many teams or global settings) | Settings → App Settings → API Key Management | Owner or Admin role, or a custom role with Edit Configuration right |
Integration-specific key | Alert/incident automation tied to one “API” integration (often enough for creating, updating, acknowledging alerts for one team) | Settings → Integrations or Teams → [Team] → Integrations | Team Admin (for team-level) or any Owner/Admin (for global) |
1. Prerequisites
- Role – You must be an Owner or Admin (or hold a custom role with the Edit Configuration right). These roles are the only ones that can reach the relevant settings pages.
- Opsgenie Web UI access – Keys can only be generated from the browser UI (not the mobile app).
- Plan awareness – Free & Essentials plans hide the global Integrations page, so you will create the key from inside a team instead.
2. Method A – Create an Account-level API Key
Use this when Serval needs to manage multiple teams, schedules, or other account-wide settings via the Opsgenie REST API.- Sign in to Opsgenie and open Settings from the left navigation bar.
- Under App Settings, choose API Key Management. (Only Owners/Admins will see this option.)
- Click Add New API Key.
- Name the key something descriptive, e.g. “Serval Production”.
- Select the Access Rights you want to grant.
- Account-level keys can call almost any configuration or incident API, but certain high-impact alert actions (e.g., Create Alert, Acknowledge) are deliberately blocked for safety.
- Copy the key value shown at the top of the dialog before you click Add API Key (it is only shown once).
- Store the key in a secure secret vault or environment variable for Serval.
3. Method B – Create an Integration-specific API Key
Use this when you only need alert-level automation or when you’re on a plan that restricts the global settings pages.3.1 Global “API” integration (all plans that expose Settings → Integrations)
- Go to Settings → Integrations.
- Click Add Integration and search for “API”.
- Give the integration a meaningful name (e.g. “Serval Default API”).
- (Optional) Pick an Assignee team if alerts from Serval should go to one team by default.
- Press Continue – the integration saves at this point.
- Expand Steps to configure and copy the auto-generated API Key.
3.2 Team-level “API” integration (Free & Essentials plans, or when you want tight scope)
- In the top bar click Teams, then choose your target team.
- Open Integrations in the left sidebar and press Add integration.
- Search for “API”, select it, name it, and save.
- Copy the API Key from the integration details panel.
Best-practice notes
- Principle of least privilege – Grant only the domains and HTTP verbs Serval really needs. Opsgenie lets you narrow scopes under Access Management for each key.
- Endpoint selection – Use https://api.opsgenie.com for US instances or https://api.eu.opsgenie.com for EU instances when configuring Serval’s HTTP client.
- Rotation & revocation – Account Owners/Admins can regenerate or delete keys in the same pages where they were created. Serval will stop working until the new key is updated in your secret store.
- Audit-trail – Each request is logged against the key it uses, helping you trace Serval’s activity.
Next steps
You now have a valid Opsgenie API key. Keep it safe—you will paste it into Serval in the “Connect Opsgenie” step of the Serval integration guide (covered in the next section of the full document).Serval configuration
- In Serval go to Apps → Available → Opsgenie → Connect.
- Paste the API Key you created above.
- Select the correct Region (
US
orEU
) to match your Opsgenie instance. - Click Save.