Twilio Alerts API

The Alerts API from Twilio — 2 operation(s) for alerts.

Documentation

Specifications

Other Resources

OpenAPI Specification

twilio-alerts-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Twilio - Accounts A2p Alerts API
  description: This is the public Twilio REST API.
  termsOfService: https://www.twilio.com/legal/tos
  contact:
    name: Twilio Support
    url: https://support.twilio.com
    email: support@twilio.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.52.0
servers:
- url: https://accounts.twilio.com
tags:
- name: Alerts
paths:
  /v1/Alerts/{Sid}:
    servers:
    - url: https://monitor.twilio.com
    description: Debugger alerts
    x-twilio:
      defaultOutputProperties:
      - sid
      - error_code
      - log_level
      - alert_text
      pathType: instance
    get:
      description: ''
      tags:
      - Alerts
      parameters:
      - name: Sid
        in: path
        description: The SID of the Alert resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NO[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/monitor.v1.alert-instance'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchAlert
      x-maturity:
      - GA
  /v1/Alerts:
    servers:
    - url: https://monitor.twilio.com
    description: Debugger alerts
    x-twilio:
      defaultOutputProperties:
      - sid
      - error_code
      - log_level
      - alert_text
      pathType: list
    get:
      description: ''
      tags:
      - Alerts
      parameters:
      - name: LogLevel
        in: query
        description: 'Only show alerts for this log-level.  Can be: `error`, `warning`, `notice`, or `debug`.'
        schema:
          type: string
      - name: StartDate
        in: query
        description: Only include alerts that occurred on or after this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
        schema:
          type: string
          format: date-time
      - name: EndDate
        in: query
        description: Only include alerts that occurred on or before this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
        schema:
          type: string
          format: date-time
      - name: PageSize
        in: query
        description: How many resources to return in each list page. The default is 50, and the maximum is 1000.
        schema:
          type: integer
          minimum: 1
          maximum: 1000
      - name: Page
        in: query
        description: The page index. This value is simply for client state.
        schema:
          type: integer
          minimum: 0
      - name: PageToken
        in: query
        description: The page token. This is provided by the API.
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAlertResponse'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListAlert
      x-maturity:
      - GA
components:
  schemas:
    monitor.v1.alert-instance:
      type: object
      properties:
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Alert resource.
        alert_text:
          type: string
          nullable: true
          description: The text of the alert.
        api_version:
          type: string
          nullable: true
          description: The API version used when the alert was generated.  Can be empty for events that don't have a specific API version.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        date_generated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the alert was generated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format.  Due to buffering, this can be different than `date_created`.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        error_code:
          type: string
          nullable: true
          description: The error code for the condition that generated the alert. See the [Error Dictionary](https://www.twilio.com/docs/api/errors) for possible causes and solutions to the error.
        log_level:
          type: string
          nullable: true
          description: 'The log level.  Can be: `error`, `warning`, `notice`, or `debug`.'
        more_info:
          type: string
          nullable: true
          description: The URL of the page in our [Error Dictionary](https://www.twilio.com/docs/api/errors) with more information about the error condition.
        request_method:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          nullable: true
          description: The method used by the request that generated the alert. If the alert was generated by a request we made to your server, this is the method we used. If the alert was generated by a request from your application to our API, this is the method your application used.
        request_url:
          type: string
          nullable: true
          description: The URL of the request that generated the alert. If the alert was generated by a request we made to your server, this is the URL on your server that generated the alert. If the alert was generated by a request from your application to our API, this is the URL of the resource requested.
        request_variables:
          type: string
          nullable: true
          description: The variables passed in the request that generated the alert. This value is only returned when a single Alert resource is fetched.
        resource_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the resource for which the alert was generated.  For instance, if your server failed to respond to an HTTP request during the flow of a particular call, this value would be the SID of the server.  This value is empty if the alert was not generated for a particular resource.
        response_body:
          type: string
          nullable: true
          description: The response body of the request that generated the alert. This value is only returned when a single Alert resource is fetched.
        response_headers:
          type: string
          nullable: true
          description: The response headers of the request that generated the alert. This value is only returned when a single Alert resource is fetched.
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NO[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Alert resource.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the Alert resource.
        request_headers:
          type: string
          nullable: true
          description: The request headers of the request that generated the alert. This value is only returned when a single Alert resource is fetched.
        service_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the service or resource that generated the alert. Can be `null`.
    monitor.v1.alert:
      type: object
      properties:
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Alert resource.
        alert_text:
          type: string
          nullable: true
          description: The text of the alert.
        api_version:
          type: string
          nullable: true
          description: The API version used when the alert was generated.  Can be empty for events that don't have a specific API version.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        date_generated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the alert was generated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format.  Due to buffering, this can be different than `date_created`.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        error_code:
          type: string
          nullable: true
          description: The error code for the condition that generated the alert. See the [Error Dictionary](https://www.twilio.com/docs/api/errors) for possible causes and solutions to the error.
        log_level:
          type: string
          nullable: true
          description: 'The log level.  Can be: `error`, `warning`, `notice`, or `debug`.'
        more_info:
          type: string
          nullable: true
          description: The URL of the page in our [Error Dictionary](https://www.twilio.com/docs/api/errors) with more information about the error condition.
        request_method:
          type: string
          format: http-method
          enum:
          - HEAD
          - GET
          - POST
          - PATCH
          - PUT
          - DELETE
          nullable: true
          description: The method used by the request that generated the alert. If the alert was generated by a request we made to your server, this is the method we used. If the alert was generated by a request from your application to our API, this is the method your application used.
        request_url:
          type: string
          nullable: true
          description: The URL of the request that generated the alert. If the alert was generated by a request we made to your server, this is the URL on your server that generated the alert. If the alert was generated by a request from your application to our API, this is the URL of the resource requested.
        resource_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the resource for which the alert was generated.  For instance, if your server failed to respond to an HTTP request during the flow of a particular call, this value would be the SID of the server.  This value is empty if the alert was not generated for a particular resource.
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NO[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Alert resource.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the Alert resource.
        service_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the service or resource that generated the alert. Can be `null`.
    ListAlertResponse:
      type: object
      properties:
        alerts:
          type: array
          items:
            $ref: '#/components/schemas/monitor.v1.alert'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type: string
              format: uri
              nullable: true
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type: string
              format: uri
              nullable: true
            url:
              type: string
              format: uri
            key:
              type: string
  securitySchemes:
    accountSid_authToken:
      type: http
      scheme: basic
x-maturity:
- name: GA
  description: This product is Generally Available.
- name: Beta
  description: PLEASE NOTE that this is a Beta product that is subject to change. Use it with caution.