PagerDuty Incident Workflows API

An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.

OpenAPI Specification

pagerduty-incident-workflows-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  description: 'This document describes the PagerDuty REST APIs.


    For guides and examples please visit our [Documentation.](https://developer.pagerduty.com/docs/get-started/getting-started/)


    Our REST APIs are defined in OpenAPI v3.x. You can view the schema at [github.com/PagerDuty/api-schema](https://github.com/PagerDuty/api-schema).


    Note that properties in some schemas have fields not shown by default such as `readOnly`, `format`, and `default`. Hover your cursor over the right column that looks like `optional+1` to see the full list of fields.

    '
  contact:
    name: PagerDuty Support
    url: http://www.pagerduty.com/support
    email: support@pagerduty.com
  title: PagerDuty Abilities Incident Workflows API
  version: 2.0.0
servers:
- url: https://api.pagerduty.com
  description: PagerDuty V2 API.
security:
- api_key: []
tags:
- name: Incident Workflows
  description: 'An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.

    '
paths:
  /incident_workflows:
    description: Create, retrieve, or modify Incident Workflows
    get:
      x-pd-requires-scope: incident_workflows.read
      tags:
      - Incident Workflows
      operationId: listIncidentWorkflows
      description: 'List existing Incident Workflows.


        This is the best method to use to list all Incident Workflows in your account. If your use case requires listing Incident Workflows associated with a particular Service, you can use the "List Triggers" method to find Incident Workflows configured to start for Incidents in a given Service.


        An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.


        Scoped OAuth requires: `incident_workflows.read`

        '
      summary: PagerDuty List Incident Workflows
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/offset_limit'
      - $ref: '#/components/parameters/offset_offset'
      - $ref: '#/components/parameters/offset_total'
      - $ref: '#/components/parameters/query'
      - $ref: '#/components/parameters/include_incident_workflow_children'
      responses:
        '200':
          description: A paginated array of Incident Workflows.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Pagination'
                - type: object
                  properties:
                    incident_workflows:
                      type: array
                      items:
                        $ref: '#/components/schemas/IncidentWorkflow'
                  required:
                  - incident_workflows
              examples:
                response:
                  summary: Response Example
                  value:
                    incident_workflows:
                    - id: PSFEVL7
                      name: Example Incident Workflow
                      description: This Incident Workflow is an example
                      type: incident_workflow
                      created_at: '2022-12-13T19:55:01.171Z'
                      self: https://api.pagerduty.com/incident_workflows/PSFEVL7
                      html_url: https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7
                    limit: 1
                    offset: 0
                    more: true
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      x-pd-requires-scope: incident_workflows.write
      tags:
      - Incident Workflows
      operationId: postIncidentWorkflow
      description: 'Create a new Incident Workflow


        An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.


        Scoped OAuth requires: `incident_workflows.write`

        '
      summary: PagerDuty Create an Incident Workflow
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                incident_workflow:
                  $ref: '#/components/schemas/IncidentWorkflow'
              required:
              - incident_workflow
            examples:
              request:
                summary: Request Example
                value:
                  incident_workflow:
                    name: Example Incident Workflow
                    description: This Incident Workflow is an example
                    steps:
                    - name: Send Status Update
                      action_configuration:
                        action_id: pagerduty.com:incident-workflows:send-status-update:1
                        inputs:
                        - name: Message
                          value: Example status message sent on {{current_date}}
      responses:
        '201':
          description: The new Incident Workflow
          content:
            application/json:
              schema:
                type: object
                properties:
                  incident_workflow:
                    $ref: '#/components/schemas/IncidentWorkflow'
                required:
                - incident_workflow
              examples:
                response:
                  summary: Response Example
                  value:
                    incident_workflow:
                      id: PSFEVL7
                      name: Example Incident Workflow
                      description: This Incident Workflow is an example
                      type: incident_workflow
                      created_at: '2022-12-13T19:55:01.171Z'
                      self: https://api.pagerduty.com/incident_workflows/PSFEVL7
                      html_url: https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7
                      steps:
                      - id: P4RG7YW
                        type: step
                        name: Send Status Update
                        description: Posts a status update to a given incident
                        action_configuration:
                          action_id: pagerduty.com:incident-workflows:send-status-update:1
                          description: Posts a status update to a given incident
                          inputs:
                          - name: Message
                            parameter_type: text
                            value: Example status message sent on {{current_date}}
                          outputs:
                          - name: Result
                            reference_name: result
                            parameter_type: text
                          - name: Result Summary
                            reference_name: result-summary
                            parameter_type: text
                          - name: Error
                            reference_name: error
                            parameter_type: text
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /incident_workflows/{id}:
    description: Create, retrieve, modify, or delete Incident Workflows
    get:
      x-pd-requires-scope: incident_workflows.read
      tags:
      - Incident Workflows
      operationId: getIncidentWorkflow
      description: 'Get an existing Incident Workflow

        An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.


        Scoped OAuth requires: `incident_workflows.read`

        '
      summary: PagerDuty Get an Incident Workflow
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      responses:
        '201':
          description: The Incident Workflow
          content:
            application/json:
              schema:
                type: object
                properties:
                  incident_workflow:
                    $ref: '#/components/schemas/IncidentWorkflow'
                required:
                - incident_workflow
              examples:
                response:
                  summary: Response Example
                  value:
                    incident_workflow:
                      id: PSFEVL7
                      name: Example Incident Workflow
                      description: This Incident Workflow is an example
                      type: incident_workflow
                      created_at: '2022-12-13T19:55:01.171Z'
                      self: https://api.pagerduty.com/incident_workflows/PSFEVL7
                      html_url: https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7
                      steps:
                      - id: P4RG7YW
                        type: step
                        name: Send Status Update
                        description: Posts a status update to a given incident
                        action_configuration:
                          action_id: pagerduty.com:incident-workflows:send-status-update:1
                          description: Posts a status update to a given incident
                          inputs:
                          - name: Message
                            parameter_type: text
                            value: Example status message sent on {{current_date}}
                          outputs:
                          - name: Result
                            reference_name: result
                            parameter_type: text
                          - name: Result Summary
                            reference_name: result-summary
                            parameter_type: text
                          - name: Error
                            reference_name: error
                            parameter_type: text
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    delete:
      x-pd-requires-scope: incident_workflows.write
      tags:
      - Incident Workflows
      operationId: deleteIncidentWorkflow
      description: 'Delete an existing Incident Workflow


        An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.


        Scoped OAuth requires: `incident_workflows.write`

        '
      summary: PagerDuty Delete an Incident Workflow
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: The Incident Workflow was deleted successfully
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    put:
      x-pd-requires-scope: incident_workflows.write
      tags:
      - Incident Workflows
      operationId: putIncidentWorkflow
      description: 'Update an Incident Workflow


        An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.


        Scoped OAuth requires: `incident_workflows.write`

        '
      summary: PagerDuty Update an Incident Workflow
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                incident_workflow:
                  $ref: '#/components/schemas/IncidentWorkflow'
              required:
              - incident_workflow
            examples:
              request:
                summary: Request Example
                value:
                  incident_workflow:
                    name: Example Incident Workflow
                    description: This Incident Workflow is an example
                    steps:
                    - name: Send Status Update
                      action_configuration:
                        action_id: pagerduty.com:incident-workflows:send-status-update:1
                        inputs:
                        - name: Message
                          value: Example status message sent on {{current_date}}
      responses:
        '201':
          description: The new Incident Workflow
          content:
            application/json:
              schema:
                type: object
                properties:
                  incident_workflow:
                    $ref: '#/components/schemas/IncidentWorkflow'
                required:
                - incident_workflow
              examples:
                response:
                  summary: Response Example
                  value:
                    incident_workflow:
                      id: PSFEVL7
                      name: Example Incident Workflow
                      description: This Incident Workflow is an example
                      type: incident_workflow
                      created_at: '2022-12-13T19:55:01.171Z'
                      self: https://api.pagerduty.com/incident_workflows/PSFEVL7
                      html_url: https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7
                      steps:
                      - id: P4RG7YW
                        type: step
                        name: Send Status Update
                        description: Posts a status update to a given incident
                        action_configuration:
                          action_id: pagerduty.com:incident-workflows:send-status-update:1
                          description: Posts a status update to a given incident
                          inputs:
                          - name: Message
                            parameter_type: text
                            value: Example status message sent on {{current_date}}
                          outputs:
                          - name: Result
                            reference_name: result
                            parameter_type: text
                          - name: Result Summary
                            reference_name: result-summary
                            parameter_type: text
                          - name: Error
                            reference_name: error
                            parameter_type: text
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /incident_workflows/{id}/instances:
    description: Start an Instance of an Incident Workflows
    post:
      x-pd-requires-scope: incident_workflows:instances.write
      tags:
      - Incident Workflows
      operationId: createIncidentWorkflowInstance
      description: 'Start an Instance of an Incident Workflow. Sometimes referred to as "triggering a workflow on an incident."


        An Incident Workflow is a sequence of configurable Steps and associated Triggers that can execute automated Actions for a given Incident.


        Scoped OAuth requires: `incident_workflows:instances.write`

        '
      summary: PagerDuty Start an Incident Workflow Instance
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                incident_workflow_instance:
                  type: object
                  properties:
                    incident:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                          - incident_reference
                      required:
                      - id
              required:
              - incident_workflow_instance
            examples:
              request:
                summary: Request Example
                value:
                  incident_workflow_instance:
                    id: P3SNKQS
                    type: incident_workflow_instance
                    incident:
                      id: Q1R2DLCB21K7NP
                      type: incident_reference
      responses:
        '201':
          description: The Incident Workflow Instance
          content:
            application/json:
              schema:
                type: object
                properties:
                  incident_workflow_instance:
                    $ref: '#/components/schemas/IncidentWorkflowInstance'
                required:
                - incident_workflow_instance
              examples:
                response:
                  summary: Response Example
                  value:
                    incident_workflow_instance:
                      id: P3SNKQS
                      type: incident_workflow_instance
                      incident:
                        id: Q1R2DLCB21K7NP
                        type: incident_reference
                        summary: '[#1234] The server is on fire.'
                        self: https://api.pagerduty.com/incidents/PT4KHLK
                        html_url: https://subdomain.pagerduty.com/incidents/PT4KHLK
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /incident_workflows/actions:
    description: Retrieve Incident Workflow Actions
    get:
      x-pd-requires-scope: incident_workflows.read
      tags:
      - Incident Workflows
      operationId: listIncidentWorkflowActions
      description: 'List Incident Workflow Actions


        Scoped OAuth requires: `incident_workflows.read`

        '
      summary: PagerDuty List Actions
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/cursor_limit'
      - $ref: '#/components/parameters/cursor_cursor'
      - $ref: '#/components/parameters/actions_filter_keyword'
      responses:
        '200':
          description: A paginated array of Incident Workflow Actions
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/CursorPagination'
                - type: object
                  properties:
                    more:
                      type: boolean
                      description: Indicates if there are additional records to return
                      readOnly: true
                    actions:
                      type: array
                      items:
                        $ref: '#/components/schemas/IncidentWorkflowAction'
              examples:
                response:
                  summary: Response Example
                  value:
                    actions:
                    - type: action
                      id: pagerduty.com:test:sample-action:1
                      domain_name: pagerduty.com
                      package_name: test
                      function_name: sample-action
                      version: 1
                      name: 'Test: Sample Action'
                      description: A fake Action for documentation purposes
                      action_type: integration
                      tags: []
                      metadata: '{}'
                      search_keywords: []
                      inputs:
                      - name: Text Input
                        description: A text input
                        type: text
                        default_value: some text
                        is_required: true
                        is_hidden: false
                        advanced: false
                        metadata: '{}'
                        connection_type_id: ''
                      - name: Int Input
                        description: An integer input
                        type: integer
                        default_value: '1234'
                        is_required: false
                        is_hidden: false
                        advanced: false
                        metadata: '{}'
                        connection_type_id: ''
                      outputs:
                      - name: Text Output
                        description: A text output
                        type: text
                      created_at: '2022-12-08T22:14:16.965Z'
                      created_by_user_id: PNBURS9
                    limit: 1
                    next_cursor: N2E3YzkzNjMtYzBkMC00NjFmLTg1OTEtMGZjMjcwODUzODNl
                    more: true
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /incident_workflows/actions/{id}:
    description: Retrieve Incident Workflow Actions
    get:
      x-pd-requires-scope: incident_workflows.read
      tags:
      - Incident Workflows
      operationId: getIncidentWorkflowAction
      description: 'Get an Incident Workflow Action


        Scoped OAuth requires: `incident_workflows.read`

        '
      summary: PagerDuty Get an Action
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: An Incident Workflow Action
          content:
            application/json:
              schema:
                type: object
                properties:
                  action:
                    $ref: '#/components/schemas/IncidentWorkflowAction'
              examples:
                response:
                  summary: Response Example
                  value:
                    action:
                      type: action
                      id: pagerduty.com:test:sample-action:1
                      domain_name: pagerduty.com
                      package_name: test
                      function_name: sample-action
                      version: 1
                      name: 'Test: Sample Action'
                      description: A fake Action for documentation purposes
                      action_type: integration
                      tags: []
                      metadata: '{}'
                      search_keywords: []
                      inputs:
                      - name: Text Input
                        description: A text input
                        type: text
                        default_value: some text
                        is_required: true
                        is_hidden: false
                        advanced: false
                        metadata: '{}'
                        connection_type_id: ''
                      - name: Int Input
                        description: An integer input
                        type: integer
                        default_value: '1234'
                        is_required: false
                        is_hidden: false
                        advanced: false
                        metadata: '{}'
                        connection_type_id: ''
                      outputs:
                      - name: Text Output
                        description: A text output
                        type: text
                      created_at: '2022-12-08T22:14:16.965Z'
                      created_by_user_id: PNBURS9
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /incident_workflows/triggers:
    description: Create, retrieve, or modify Incident Workflow Triggers
    get:
      x-pd-requires-scope: incident_workflows.read
      tags:
      - Incident Workflows
      operationId: listIncidentWorkflowTriggers
      description: 'List existing Incident Workflow Triggers


        Scoped OAuth requires: `incident_workflows.read`

        '
      summary: PagerDuty List Triggers
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/triggers_filter_workflow_id'
      - $ref: '#/components/parameters/triggers_filter_incident_id'
      - $ref: '#/components/parameters/triggers_filter_service_id'
      - $ref: '#/components/parameters/triggers_filter_trigger_type'
      - $ref: '#/components/parameters/triggers_filter_workflow_name_contains'
      - $ref: '#/components/parameters/triggers_sort_by'
      - $ref: '#/components/parameters/cursor_limit'
      - $ref: '#/components/parameters/cursor_cursor'
      responses:
        '200':
          description: A paginated array of Incident Workflow Triggers
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/CursorPagination'
                - type: object
                  properties:
                    more:
                      type: boolean
                      description: Indicates if there are additional records to return
                      readOnly: true
                    triggers:
                      type: array
                      items:
                        $ref: '#/components/schemas/IncidentWorkflowTrigger'
              examples:
                response:
                  summary: Response Example
                  value:
                    triggers:
                    - id: 4ad696eb-bb48-422a-8bd0-6efad6befa29
                      type: workflow_trigger
                      trigger_type_name: Conditional Trigger
                      trigger_type: conditional
                      condition: incident.priority matches 'P1'
                      trigger_url: https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29/start
                      self: https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29
                      workflow_id: PSFEVL7
                      workflow_name: Example Incident Workflow
                      is_subscribed_to_all_services: true
                      services: []
                      workflow:
                        id: PSFEVL7
                        name: Example Incident Workflow
                        description: This Incident Workflow is an example
                        type: incident_workflow
                        created_at: '2022-12-13T19:55:01.171Z'
                        self: https://api.pagerduty.com/incident_workflows/PSFEVL7
                        html_url: https://pdt-flex-actions.pagerduty.com/flex-workflows/workflows/PSFEVL7
                      permissions:
                        restricted: false
                    limit: 1
                    next_cursor: N2E3YzkzNjMtYzBkMC00NjFmLTg1OTEtMGZjMjcwODUzODNl
                    more: true
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      x-pd-requires-scope: incident_workflows.write
      tags:
      - Incident Workflows
      operationId: createIncidentWorkflowTrigger
      description: 'Create new Incident Workflow Trigger


        Scoped OAuth requires: `incident_workflows.write`

        '
      summary: PagerDuty Create a Trigger
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                trigger:
                  $ref: '#/components/schemas/IncidentWorkflowTrigger'
              required:
              - trigger
            examples:
              request:
                summary: Request Example
                value:
                  trigger:
                    trigger_type: conditional
                    workflow:
                      id: PSFEVL7
                    services:
                    - id: PIJ90N7
                    is_subscribed_to_all_services: false
                    condition: incident.priority matches 'P1'
      responses:
        '201':
          description: The newly created Incident Workflow Trigger
          content:
            application/json:
              schema:
                type: object
                properties:
                  trigger:
                    $ref: '#/components/schemas/IncidentWorkflowTrigger'
                required:
                - trigger
              examples:
                response:
                  summary: Response Example
                  value:
                    trigger:
                      id: 4ad696eb-bb48-422a-8bd0-6efad6befa29
                      type: workflow_trigger
                      trigger_type_name: Conditional Trigger
                      trigger_type: conditional
                      condition: incident.priority matches 'P1'
                      trigger_url: https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29/start
                      self: https://api.pagerduty.com/incident_workflows/triggers/4ad696eb-bb48-422a-8bd0-6efad6befa29
                      workflow_id: PSFEVL7
                      workflow_name: Example Incident Workflow
                      is_subscribed_to_all_services: false
                      services:
                      - id: PIJ90N7
                        summary: My Application Service
                        type: service
                        self: https://api.pagerduty.com/services/PIJ90N7
                        html_url: https://pdt-circular.pagerduty.com/service-directory/P0544JX
                      workflow:
                        id: PSFEVL7


# --- truncated at 32 KB (76 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pagerduty/refs/heads/main/openapi/pagerduty-incident-workflows-api-openapi.yml