openapi: 3.0.1
info:
  title: DASH Notifications
  description: >-
    An API for managing notifications sent when numbers provisioned on the 911
    Access Dashboard make a call to emergecy services

    ## Base Path

    `https://evs-api.bandwidth.com/api/v1`
  version: 1.0.0
  contact:
    name: Bandwidth Support
  x-server-configuration:
    default-environment: production
    default-server: default
    environments:
      - name: production
        servers:
          - name: default
            url: https://evs-api.bandwidth.com/api/v1
      - name: staging
        servers:
          - name: default
            url: https://test.evs.bandwidth.com/api/v1
      - name: custom
        servers:
          - name: default
            url: '{base_url}'
    parameters:
      - name: base_url
        description: ''
        type: string
        example: https://www.example.com
security:
  - basicAuth: []
tags:
  - name: Notification Recipients
    description: Notification Recipients
servers:
  - url: https://evs-api.bandwidth.com/api/v1
    description: Production
    variables: {}
  - url: https://test.evs.bandwidth.com/api/v1
    description: Staging
    variables: {}
paths:
  /notifications/endpoints/{endpointId}/notificationRecipients/{recipientId}:
    delete:
      tags:
        - Notification Recipients
      summary: Delete Endpoint Notification Recipient Association
      description: Delete a notification recipient association from an endpoint
      operationId: disassociateNotificationRecipientUsingDELETE
      parameters:
        - name: endpointId
          in: path
          description: endpointId
          required: true
          schema:
            type: string
        - name: recipientId
          in: path
          description: recipientId
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/notificationRecipientListResponse'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
      security:
        - basicAuth: []
    patch:
      tags:
        - Notification Recipients
      summary: Add Endpoint Notification Recipient Association
      description: Add a notification recipient association to an endpoint
      operationId: associateNotificationRecipientUsingPATCH
      parameters:
        - name: endpointId
          in: path
          description: endpointId
          required: true
          schema:
            type: string
        - name: recipientId
          in: path
          description: recipientId
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/notificationRecipientListResponse'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
      security:
        - basicAuth: []
  /notifications/notificationRecipients:
    get:
      tags:
        - Notification Recipients
      summary: Get Notification Recipients
      description: Returns notification recipients on the account
      operationId: getNotificationRecipientsUsingGET
      parameters:
        - name: endpointId
          in: query
          description: Endpoint to which the notification recipients belong
          schema:
            type: string
        - name: uriSubstr
          in: query
          description: >-
            Recipient or type of the notification (accepts recipient
            substrings). If searching type, it must be all caps (ex: SMS).
          schema:
            type: string
        - name: Page
          in: query
          description: Page number for results
          schema:
            type: integer
            format: int32
        - name: Size
          in: query
          description: Size of the page
          schema:
            type: integer
            format: int32
        - name: From
          in: query
          description: Skip this many records from the beginning of the set
          schema:
            type: integer
            format: int32
      responses:
        '200':
          $ref: '#/components/responses/notificationRecipientListResponse'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
      security:
        - basicAuth: []
    post:
      tags:
        - Notification Recipients
      summary: Create Notification Recipient
      description: Create a new notification recipient
      operationId: addNotificationRecipientUsingPOST
      requestBody:
        description: The notification recipient to add to the account
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationRecipient'
        required: true
      responses:
        '201':
          $ref: '#/components/responses/notificationRecipientCreatedResponse'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
      security:
        - basicAuth: []
      x-codegen-request-body-name: Notification Recipient
  /notifications/notificationRecipients/{recipientId}:
    get:
      tags:
        - Notification Recipients
      summary: Get Notification Recipient
      description: Returns notification recipient from given recipient id
      operationId: getNotificationRecipientUsingGET
      parameters:
        - name: recipientId
          in: path
          description: Recipient Id
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/notificationRecipientResponse'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
      security:
        - basicAuth: []
    delete:
      tags:
        - Notification Recipients
      summary: Delete Notification Recipient
      description: Delete notification recipient for given recipientId
      operationId: deleteNotificationRecipientUsingDELETE
      parameters:
        - name: recipientId
          in: path
          description: recipientId
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
      security:
        - basicAuth: []
    patch:
      tags:
        - Notification Recipients
      summary: Modify Notification Recipient
      description: Modify an existing notification recipient
      operationId: modifyNotificationRecipientUsingPATCH
      parameters:
        - name: recipientId
          in: path
          description: recipientId
          required: true
          schema:
            type: string
      requestBody:
        description: The notification recipient to modify
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationRecipient'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/notificationRecipientResponse'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
      security:
        - basicAuth: []
      x-codegen-request-body-name: Notification Recipient
  /notifications/notificationRecipients/{recipientId}/associations:
    get:
      tags:
        - Notification Recipients
      summary: Get Endpoints Associated to a Notification Recipient
      description: Get endpoints associated to a notification recipient
      operationId: getEndpointsAssociatedToANotificationRecipientUsingGET
      parameters:
        - name: recipientId
          in: path
          description: recipientId
          required: true
          schema:
            type: string
        - name: Page
          in: query
          description: Page number for results
          schema:
            type: integer
            format: int32
        - name: Size
          in: query
          description: Size of the page
          schema:
            type: integer
            format: int32
        - name: From
          in: query
          description: Skip this many records from the beginning of the set
          schema:
            type: integer
            format: int32
      responses:
        '200':
          $ref: '#/components/responses/notificationRecipientListResponse'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
      security:
        - basicAuth: []
components:
  responses:
    badRequest:
      description: Bad Request
      content: {}
    unauthorized:
      description: Unauthorized
      content: {}
    forbidden:
      description: Forbidden
      content: {}
    notFound:
      description: Not Found
      content: {}
    conflict:
      description: Conflict
      content: {}
    serviceUnavailable:
      description: Service Unavailable
      content: {}
    notificationRecipientCreatedResponse:
      description: Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotificationRecipient'
    notificationRecipientResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotificationRecipient'
    notificationRecipientListResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotificationRecipients'
  schemas:
    NotificationRecipient:
      title: NotificationRecipient
      type: object
      properties:
        created:
          type: string
          format: date-time
          readOnly: true
        password:
          type: string
        recipient:
          type: string
        recipientId:
          type: string
        type:
          type: string
          enum:
            - HTTP
            - EMAIL
            - SMS
            - VOICE
        updated:
          type: string
          format: date-time
          readOnly: true
        username:
          type: string
    NotificationRecipients:
      title: NotificationRecipients
      type: array
      items:
        $ref: '#/components/schemas/NotificationRecipient'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
