PagerDuty Teams API

A team is a collection of Users and Escalation Policies that represent a group of people within an organization.

Operations 14

POST /teams PagerDuty Create a team #
GET /teams PagerDuty List teams #
GET /teams/{id} PagerDuty Get a team #
DELETE /teams/{id} PagerDuty Delete a team #
PUT /teams/{id} PagerDuty Update a team #
GET /teams/{id}/audit/records PagerDuty List audit records for a team #
DELETE /teams/{id}/escalation_policies/{escalation_policy_id} PagerDuty Remove an escalation policy from a team #
PUT /teams/{id}/escalation_policies/{escalation_policy_id} PagerDuty Add an escalation policy to a team #
GET /teams/{id}/members PagerDuty List members of a team #
GET /teams/{id}/notification_subscriptions PagerDuty List Team Notification Subscriptions #
POST /teams/{id}/notification_subscriptions PagerDuty Create Team Notification Subscriptions #
POST /teams/{id}/notification_subscriptions/unsubscribe #
DELETE /teams/{id}/users/{user_id} PagerDuty Remove a user from a team #
PUT /teams/{id}/users/{user_id} PagerDuty Add a user to a team #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pagerduty-teams-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pagerduty-teams-api-openapi.yml Raw ↑
openapi: 3.2.0
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 Teams API
  version: 2.0.0
servers:
- url: https://api.pagerduty.com
  description: PagerDuty V2 API.
security:
- api_key: []
tags:
- name: Teams
  description: 'A team is a collection of Users and Escalation Policies that represent a group of people within an organization.

    '
paths:
  /teams:
    description: List or create teams.
    post:
      x-pd-requires-scope: teams.write
      tags:
      - Teams
      operationId: createTeam
      description: 'Create a new Team.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.write`

        '
      summary: PagerDuty Create a team
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                team:
                  $ref: '#/components/schemas/Team'
              required:
              - team
            examples:
              request:
                summary: Request Example
                value:
                  team:
                    type: team
                    name: Engineering
                    description: The engineering team
        description: The team to be created.
      responses:
        '201':
          description: The team that was created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  team:
                    $ref: '#/components/schemas/Team'
                required:
                - team
              examples:
                response:
                  summary: Response Example
                  value:
                    team:
                      id: PQ9K7I8
                      type: team
                      summary: Engineering
                      self: https://api.pagerduty.com/teams/PQ9K7I8
                      html_url: https://subdomain.pagerduty.com/teams/PQ9K7I8
                      name: Engineering
                      description: All engineering
                      base_role: observer
        '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'
    get:
      x-pd-requires-scope: teams.read
      tags:
      - Teams
      operationId: listTeams
      description: 'List teams of your PagerDuty account, optionally filtered by a search query.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.read`

        '
      summary: PagerDuty List teams
      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'
      responses:
        '200':
          description: A paginated array of teams.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Pagination'
                - type: object
                  properties:
                    teams:
                      type: array
                      items:
                        $ref: '#/components/schemas/Team'
                  required:
                  - teams
              examples:
                response:
                  summary: Response Example
                  value:
                    teams:
                    - id: PQ9K7I8
                      type: team
                      summary: Engineering
                      self: https://api.pagerduty.com/teams/PQ9K7I8
                      html_url: https://subdomain.pagerduty.com/teams/PQ9K7I8
                      name: Engineering
                      description: All engineering
                    limit: 100
                    offset: 0
                    more: false
                    total: null
        '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'
  /teams/{id}:
    description: Manage a team.
    get:
      x-pd-requires-scope: teams.read
      tags:
      - Teams
      operationId: getTeam
      description: 'Get details about an existing team.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.read`

        '
      summary: PagerDuty Get a team
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/include_teams'
      responses:
        '200':
          description: The team requested.
          content:
            application/json:
              schema:
                type: object
                properties:
                  team:
                    $ref: '#/components/schemas/Team'
                required:
                - team
              examples:
                response:
                  summary: Response Example
                  value:
                    team:
                      id: PQ9K7I8
                      type: team
                      summary: Engineering
                      self: https://api.pagerduty.com/teams/PQ9K7I8
                      html_url: https://subdomain.pagerduty.com/teams/PQ9K7I8
                      name: Engineering
                      description: All engineering
                      default_role: observer
        '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: teams.write
      tags:
      - Teams
      operationId: deleteTeam
      description: 'Remove an existing team.


        Succeeds only if the team has no associated Escalation Policies, Services, Schedules and Subteams.


        All associated unresovled incidents will be reassigned to another team (if specified) or will loose team association, thus becoming account-level (with visibility implications).


        Note that the incidents reassignment process is asynchronous and has no guarantee to complete before the API call return.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.write`

        '
      summary: PagerDuty Delete a team
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/reassignment_team'
      - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: The team was deleted successfully.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    put:
      x-pd-requires-scope: teams.write
      tags:
      - Teams
      operationId: updateTeam
      description: 'Update an existing team.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.write`

        '
      summary: PagerDuty Update a team
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                team:
                  $ref: '#/components/schemas/Team'
              required:
              - team
            examples:
              request:
                summary: Request Example
                value:
                  team:
                    type: team
                    name: Engineering
                    description: The engineering team
        description: The team to be updated.
      responses:
        '200':
          description: The team that was updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  team:
                    $ref: '#/components/schemas/Team'
                required:
                - team
              examples:
                response:
                  summary: Response Example
                  value:
                    team:
                      id: PQ9K7I8
                      type: team
                      summary: Engineering
                      self: https://api.pagerduty.com/teams/PQ9K7I8
                      html_url: https://subdomain.pagerduty.com/teams/PQ9K7I8
                      name: Engineering
                      description: All engineering
                      default_role: observer
        '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'
  /teams/{id}/audit/records:
    description: List audit records of changes made to the team.
    get:
      x-pd-requires-scope: audit_records.read
      tags:
      - Teams
      operationId: listTeamsAuditRecords
      summary: PagerDuty List audit records for a team
      description: 'The returned records are sorted by the `execution_time` from newest to oldest.


        See [`Cursor-based pagination`](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for instructions on how to paginate through the result set.


        For more information see the [Audit API Document](https://developer.pagerduty.com/docs/rest-api-v2/audit-records-api/).


        Scoped OAuth requires: `audit_records.read`

        '
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/cursor_limit'
      - $ref: '#/components/parameters/cursor_cursor'
      - $ref: '#/components/parameters/audit_since'
      - $ref: '#/components/parameters/audit_until'
      responses:
        '200':
          description: Records matching the query criteria.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditRecordResponseSchema'
              examples:
                response:
                  $ref: '#/components/examples/AuditRecordTeamResponse'
        '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'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /teams/{id}/escalation_policies/{escalation_policy_id}:
    description: Manage an escalation policy for a team.
    delete:
      tags:
      - Teams
      x-pd-requires-scope: teams.write
      operationId: deleteTeamEscalationPolicy
      description: 'Remove an escalation policy from a team.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.write`

        '
      summary: PagerDuty Remove an escalation policy from a team
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/team_escalation_policy_id'
      responses:
        '204':
          description: The escalation policy was removed from the team.
        '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:
      tags:
      - Teams
      x-pd-requires-scope: teams.write
      operationId: updateTeamEscalationPolicy
      description: 'Add an escalation policy to a team.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.write`

        '
      summary: PagerDuty Add an escalation policy to a team
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/team_escalation_policy_id'
      responses:
        '204':
          description: The escalation policy was added to the team.
        '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'
  /teams/{id}/members:
    description: List information about members within a team.
    get:
      x-pd-requires-scope: teams.read
      tags:
      - Teams
      operationId: listTeamUsers
      description: 'Get information about members on a team.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.read`

        '
      summary: PagerDuty List members of a team
      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/id'
      - $ref: '#/components/parameters/include_teams_members'
      responses:
        '200':
          description: A paginated array of users within the requested team.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Pagination'
                - type: object
                  properties:
                    members:
                      type: array
                      uniqueItems: false
                      items:
                        type: object
                        properties:
                          user:
                            $ref: '#/components/schemas/UserReference'
                          role:
                            type: string
              examples:
                response:
                  summary: Response Example
                  value:
                    members:
                    - user:
                        id: P0XJYI9
                        type: user_reference
                        summary: Jane Doe
                        self: https://api.pagerduty.com/users/P0XJYI9
                        html_url: https://subdomain.pagerduty.com/users/P0XJYI9
                      role: manager
                    limit: 100
                    offset: 0
                    more: false
                    total: null
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /teams/{id}/notification_subscriptions:
    get:
      x-pd-requires-scope: subscribers.read
      summary: PagerDuty List Team Notification Subscriptions
      tags:
      - Teams
      operationId: getTeamNotificationSubscriptions
      description: 'Retrieve a list of Notification Subscriptions the given Team has.


        <!-- theme: warning -->

        > Teams must be added through `POST /teams/{id}/notification_subscriptions` to be returned from this endpoint.


        Scoped OAuth requires: `subscribers.read`

        '
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Pagination'
                - type: object
                  properties:
                    subscriptions:
                      type: array
                      items:
                        type: object
                        properties:
                          subscription:
                            $ref: '#/components/schemas/NotificationSubscription'
                          subscribable_name:
                            type:
                            - string
                            - 'null'
                            description: The name of the subscribable
                  required:
                  - subscriptions
              examples:
                response:
                  summary: Response Example
                  value:
                    subscriptions:
                    - subscription:
                        subscriber_id: PD1234
                        subscriber_type: team
                        subscribable_id: PD1234
                        subscribable_type: incident
                        subscribable_name: null
                        account_id: PD1234
                    - subscription:
                        subscriber_id: PD1234
                        subscriber_type: team
                        subscribable_id: PD1234
                        subscribable_type: business_service
                        subscribable_name: Online Payment
                        account_id: PD1234
                    limit: 2
                    offset: 0
                    total: 1000
                    more: true
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      x-pd-requires-scope: subscribers.write
      summary: PagerDuty Create Team Notification Subscriptions
      tags:
      - Teams
      operationId: createTeamNotificationSubscriptions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriptions:
                    type: array
                    items:
                      $ref: '#/components/schemas/NotificationSubscriptionWithContext'
              examples:
                response:
                  summary: Response Example
                  value:
                    subscriptions:
                    - account_id: PD1234
                      subscribable_id: PD1234
                      subscribable_type: incident
                      subscriber_id: PD1234
                      subscriber_type: team
                      result: success
                    - account_id: PD1234
                      subscribable_id: PD1234
                      subscribable_type: business_service
                      subscriber_id: PD1234
                      subscriber_type: team
                      result: duplicate
                    - account_id: PD1234
                      subscribable_id: PD1235
                      subscribable_type: business_service
                      subscriber_id: PD1234
                      subscriber_type: team
                      result: unauthorized
        '400':
          $ref: '#/components/responses/ArgumentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
      description: 'Create new Notification Subscriptions for the given Team.


        Scoped OAuth requires: `subscribers.write`

        '
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscribables:
                  type: array
                  uniqueItems: true
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/NotificationSubscribable'
              required:
              - subscribables
            examples:
              request:
                summary: Request Example
                value:
                  subscribables:
                  - subscribable_type: incident
                    subscribable_id: PD1234
                  - subscribable_type: business_service
                    subscribable_id: PD1234
                  - subscribable_type: business_service
                    subscribable_id: PD1235
        description: The entities to subscribe to.
  /teams/{id}/notification_subscriptions/unsubscribe:
    summary: Remove Team Notification Subscriptions
    post:
      x-pd-requires-scope: subscribers.write
      tags:
      - Teams
      operationId: removeTeamNotificationSubscriptions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted_count:
                    type: number
                  unauthorized_count:
                    type: number
                  non_existent_count:
                    type: number
                required:
                - deleted_count
                - unauthorized_count
                - non_existent_count
              examples:
                response:
                  summary: Response Example
                  value:
                    deleted_count: 1
                    unauthorized_count: 1
                    non_existent_count: 0
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
      description: 'Unsubscribe the given Team from Notifications on the matching Subscribable entities.


        Scoped OAuth requires: `subscribers.write`

        '
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscribables:
                  type: array
                  uniqueItems: true
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/NotificationSubscribable'
              required:
              - subscribables
            examples:
              request:
                summary: Response Example
                value:
                  subscribables:
                  - subscribable_type: incident
                    subscribable_id: PD1234
                  - subscribable_type: business_service
                    subscribable_id: PD1234
        description: The entities to unsubscribe from.
  /teams/{id}/users/{user_id}:
    description: Manage team memberships.
    delete:
      x-pd-requires-scope: teams.write
      tags:
      - Teams
      operationId: deleteTeamUser
      description: 'Remove a user from a team.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.write`

        '
      summary: PagerDuty Remove a user from a team
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/team_user_id'
      responses:
        '204':
          description: The user was removed to the team.
        '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: teams.write
      tags:
      - Teams
      operationId: updateTeamUser
      description: 'Add a user to a team. Attempting to add a user with the `read_only_user` role will return a 400 error.


        A team is a collection of Users and Escalation Policies that represent a group of people within an organization.


        For more information see the [API Concepts Document](../../api-reference/ZG9jOjI3NDc5Nzc-api-concepts#teams)


        Scoped OAuth requires: `teams.write`

        '
      summary: PagerDuty Add a user to a team
      parameters:
      - $ref: '#/components/parameters/header_Accept'
      - $ref: '#/components/parameters/header_Content-Type'
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/team_user_id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: string
                  description: The role of the user on the team.
                  enum:
                  - observer
                  - responder
                  - manager
            examples:
              role:
                summary: Request Example
                value:
                  role: observer
        description: The role of the user on the team.
      responses:
        '204':
          description: The user was added to the team.
        '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'
components:
  responses:
    Conflict:
      description: The request conflicts with the current state of the server.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: integer
                    readOnly: true
                  message:
                    type: string
                    readOnly: true
                    description: Error message string
                  errors:
                    type: array
                    readOnly: true
                    items:
                      type: string
                      readOnly: true
                      description: Human-readable error details
                example:
                  message: Not Found
                  code: 2100
    TooManyRequests:
      description: Too many requests have been made, the rate limit has been reached.
      content:
        application/json:
          schema:
            $ref: '#/components/responses/Conflict/content/application~1json/schema'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/responses/Conflict/content/application~1json/schema'
    Unauthorized:
      description: 'Caller did not supply credentials or did not provide the correct credentials.

        If you are using an API key, it may be invalid or your Authorization header may be malformed.

        '
      content:
        application/json:
          schema:
            $ref: '#/components/responses/Conflict/content/application~1json/schema'
    InternalServerError:
      description: Internal Server Error the PagerDuty server experienced an error.
      content:
        application/json:
          schema:
            $ref: '#/components/responses/Conflict/content/application~1json/schema'
    UnprocessableEntity:
      description: Unprocessable Entity. Some arguments failed validation checks.
      content:
        application/json:
          schema:
            $ref: '#/components/responses/Conflict/content/application~1json/schema'
    Forbidden:
      description: 'Caller is not authorized to view the requested reso

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