PagerDuty

Create PagerDuty Incident

Creates an incident directly on a PagerDuty service.

Unverified

What the model is told

Create a PagerDuty incident for an issue the on-call team must handle. Confirm a short title and the detail first. This pages people, so do not use it for routine requests. A successful call returns the incident id and incident_number. Tell the caller the incident number.

Request

POSThttps://api.pagerduty.com/incidents

Headers

  • Content-Typeapplication/json
  • AuthorizationToken token=YOUR_PAGERDUTY_API_KEY
  • Acceptapplication/vnd.pagerduty+json;version=2
  • FromYOUR_PAGERDUTY_USER_EMAIL

Body

{
  "incident": {
    "type": "incident",
    "title": "{{title}}",
    "service": {
      "id": "YOUR_PAGERDUTY_SERVICE_ID",
      "type": "service_reference"
    },
    "urgency": "high",
    "body": {
      "type": "incident_body",
      "details": "{{details}}"
    }
  }
}

Parameters

  • title stringA short title for the incident.
  • details stringThe detail of the problem.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "61ff6e6e-066e-4da4-89ad-c7f20fba63c7",
    "type": "HTTP_REQUEST",
    "label": "Create PagerDuty Incident",
    "name": "create_pagerduty_incident",
    "customName": false,
    "description": "Create a PagerDuty incident for an issue the on-call team must handle. Confirm a short title and the detail first. This pages people, so do not use it for routine requests. A successful call returns the incident id and incident_number. Tell the caller the incident number.",
    "parameters": [
      {
        "name": "title",
        "type": "string",
        "description": "A short title for the incident."
      },
      {
        "name": "details",
        "type": "string",
        "description": "The detail of the problem."
      }
    ],
    "config": {
      "endpoint": {
        "method": "POST",
        "url": "https://api.pagerduty.com/incidents"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Authorization",
          "value": "Token token=YOUR_PAGERDUTY_API_KEY"
        },
        {
          "name": "Accept",
          "value": "application/vnd.pagerduty+json;version=2"
        },
        {
          "name": "From",
          "value": "YOUR_PAGERDUTY_USER_EMAIL"
        }
      ],
      "body": "{\n  \"incident\": {\n    \"type\": \"incident\",\n    \"title\": \"{{title}}\",\n    \"service\": {\n      \"id\": \"YOUR_PAGERDUTY_SERVICE_ID\",\n      \"type\": \"service_reference\"\n    },\n    \"urgency\": \"high\",\n    \"body\": {\n      \"type\": \"incident_body\",\n      \"details\": \"{{details}}\"\n    }\n  }\n}",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.