Syllable Incidents API

Operations related to incidents.

OpenAPI Specification

syllable-incidents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SyllableSDK Incidents API
  description: "\n# Syllable Platform SDK\n\nSyllable SDK gives you the power of awesome AI agentry. \U0001F680\n\n## Overview\n\nThe Syllable SDK provides a comprehensive set of tools and APIs to integrate powerful AI\ncapabilities into your communication applications. Whether you're building phone agents, chatbots,\nvirtual assistants, or any other AI-driven solutions, Syllable SDK has got you covered.\n\n## Features\n\n- **Agent Configuration**: Create and manage agents that can interact with users across various \nchannels.\n- **Channel Management**: Configure channels like SMS, web chat, and more to connect agents with \nusers.\n- **Custom Messages**: Set up custom messages that agents can deliver as greetings or responses.\n- **Conversations**: Track and manage conversations between users and agents, including session \nmanagement.\n- **Tools and Workflows**: Leverage tools and workflows to enhance agent capabilities, such as data \nprocessing and API calls.\n- **Data Sources**: Integrate data sources to provide agents with additional context and \ninformation.\n- **Insights and Analytics**: Analyze conversations and sessions to gain insights into user \ninteractions.\n- **Permissions and Security**: Manage permissions to control access to various features and \nfunctionalities.\n- **Language Support**: Define language groups to enable multilingual support for agents.\n- **Outbound Campaigns**: Create and manage outbound communication campaigns to reach users \neffectively.\n- **Session Labels**: Label sessions with evaluations of quality and descriptions of issues \nencountered.\n- **Incident Management**: Track and manage incidents related to agent interactions.\n"
  version: 0.0.3
servers:
- url: https://api.syllable.cloud
  description: API server
tags:
- name: incidents
  description: Operations related to incidents.
paths:
  /api/v1/incidents/:
    get:
      tags:
      - incidents
      summary: List Incidents
      description: List service incidents with pagination and filtering
      operationId: incident_list
      security:
      - APIKeyHeader: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            minimum: 0
          - type: 'null'
          description: The page number from which to start (0-based)
          examples:
          - 0
          default: 0
          title: Page
        description: The page number from which to start (0-based)
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: The maximum number of items to return
          examples:
          - 25
          default: 25
          title: Limit
        description: The maximum number of items to return
      - name: search_fields
        in: query
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/IncidentProperties'
          description: String names of fields to search. Correspond by index to search field values
          examples:
          - name
          default: []
          title: Search Fields
        description: String names of fields to search. Correspond by index to search field values
      - name: search_field_values
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
          description: Values of fields to search. Correspond by index to search fields. Unless field name contains "list", an individual search field value cannot be a list
          examples:
          - Some Object Name
          default: []
          title: Search Field Values
        description: Values of fields to search. Correspond by index to search fields. Unless field name contains "list", an individual search field value cannot be a list
      - name: order_by
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/IncidentProperties'
          - type: 'null'
          description: The field whose value should be used to order the results
          examples:
          - name
          title: Order By
        description: The field whose value should be used to order the results
      - name: order_by_direction
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/OrderByDirection'
          - type: 'null'
          description: The direction in which to order the results
          title: Order By Direction
        description: The direction in which to order the results
      - name: fields
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/IncidentProperties'
          - type: 'null'
          description: The fields to include in the response
          default: []
          title: Fields
        description: The fields to include in the response
      - name: start_datetime
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: The start datetime for filtering results
          examples:
          - '2023-01-01T00:00:00Z'
          title: Start Datetime
        description: The start datetime for filtering results
      - name: end_datetime
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: The end datetime for filtering results
          examples:
          - '2024-01-01T00:00:00Z'
          title: End Datetime
        description: The end datetime for filtering results
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse_IncidentResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: python
        label: Python (SDK)
        source: "import os\nfrom syllable_sdk import SyllableSDK, models\n\n\nwith SyllableSDK(\n    api_key_header=os.getenv(\"SYLLABLESDK_API_KEY_HEADER\", \"\"),\n) as ss_client:\n\n    res = ss_client.incidents.list(page=0, limit=25, search_fields=[\n        models.IncidentProperties.UPDATED_AT,\n    ], search_field_values=[\n        \"Some Object Name\",\n    ], start_datetime=\"2023-01-01T00:00:00Z\", end_datetime=\"2024-01-01T00:00:00Z\")\n\n    # Handle response\n    print(res)"
      - lang: typescript
        label: Typescript (SDK)
        source: "import { SyllableSDK } from \"syllable-sdk\";\n\nconst syllableSDK = new SyllableSDK({\n  apiKeyHeader: process.env[\"SYLLABLESDK_API_KEY_HEADER\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await syllableSDK.incidents.list({\n    page: 0,\n    searchFields: [\n      \"updated_at\",\n    ],\n    searchFieldValues: [\n      \"Some Object Name\",\n    ],\n    startDatetime: \"2023-01-01T00:00:00Z\",\n    endDatetime: \"2024-01-01T00:00:00Z\",\n  });\n\n  console.log(result);\n}\n\nrun();"
    post:
      tags:
      - incidents
      summary: Create Incident
      description: Create a new incident
      operationId: incident_create
      security:
      - APIKeyHeader: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncidentCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: python
        label: Python (SDK)
        source: "import os\nfrom syllable_sdk import SyllableSDK\nfrom syllable_sdk.utils import parse_datetime\n\n\nwith SyllableSDK(\n    api_key_header=os.getenv(\"SYLLABLESDK_API_KEY_HEADER\", \"\"),\n) as ss_client:\n\n    res = ss_client.incidents.create(request={\n        \"description\": \"Service outage in region X\",\n        \"start_datetime\": parse_datetime(\"2023-10-01T08:00:00Z\"),\n        \"resolution_datetime\": parse_datetime(\"2023-10-01T12:00:00Z\"),\n        \"impact_category\": \"High\",\n        \"sessions_impacted\": 1500,\n        \"markdown\": \"**Incident Details**\",\n        \"organization_id\": 123,\n        \"sub_organization_id\": 456,\n    })\n\n    # Handle response\n    print(res)"
      - lang: typescript
        label: Typescript (SDK)
        source: "import { SyllableSDK } from \"syllable-sdk\";\n\nconst syllableSDK = new SyllableSDK({\n  apiKeyHeader: process.env[\"SYLLABLESDK_API_KEY_HEADER\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await syllableSDK.incidents.create({\n    description: \"Service outage in region X\",\n    startDatetime: new Date(\"2023-10-01T08:00:00Z\"),\n    resolutionDatetime: new Date(\"2023-10-01T12:00:00Z\"),\n    impactCategory: \"High\",\n    sessionsImpacted: 1500,\n    markdown: \"**Incident Details**\",\n    organizationId: 123,\n    subOrganizationId: 456,\n  });\n\n  console.log(result);\n}\n\nrun();"
    put:
      tags:
      - incidents
      summary: Update Incident
      description: Update an existing incident
      operationId: incident_update
      security:
      - APIKeyHeader: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncidentUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: python
        label: Python (SDK)
        source: "import os\nfrom syllable_sdk import SyllableSDK\nfrom syllable_sdk.utils import parse_datetime\n\n\nwith SyllableSDK(\n    api_key_header=os.getenv(\"SYLLABLESDK_API_KEY_HEADER\", \"\"),\n) as ss_client:\n\n    res = ss_client.incidents.update(request={\n        \"description\": \"Service outage in region X\",\n        \"start_datetime\": parse_datetime(\"2023-10-01T08:00:00Z\"),\n        \"resolution_datetime\": parse_datetime(\"2023-10-01T12:00:00Z\"),\n        \"impact_category\": \"High\",\n        \"sessions_impacted\": 1500,\n        \"markdown\": \"**Incident Details**\",\n        \"organization_id\": 123,\n        \"sub_organization_id\": 456,\n        \"id\": 1,\n    })\n\n    # Handle response\n    print(res)"
      - lang: typescript
        label: Typescript (SDK)
        source: "import { SyllableSDK } from \"syllable-sdk\";\n\nconst syllableSDK = new SyllableSDK({\n  apiKeyHeader: process.env[\"SYLLABLESDK_API_KEY_HEADER\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await syllableSDK.incidents.update({\n    description: \"Service outage in region X\",\n    startDatetime: new Date(\"2023-10-01T08:00:00Z\"),\n    resolutionDatetime: new Date(\"2023-10-01T12:00:00Z\"),\n    impactCategory: \"High\",\n    sessionsImpacted: 1500,\n    markdown: \"**Incident Details**\",\n    organizationId: 123,\n    subOrganizationId: 456,\n    id: 1,\n  });\n\n  console.log(result);\n}\n\nrun();"
  /api/v1/incidents/organizations:
    get:
      tags:
      - incidents
      summary: Get Organizations
      description: Get all organizations
      operationId: incident_get_organizations
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/IncidentOrganizationResponse'
                type: array
                title: Response Incident Get Organizations
      security:
      - APIKeyHeader: []
      x-codeSamples:
      - lang: python
        label: Python (SDK)
        source: "import os\nfrom syllable_sdk import SyllableSDK\n\n\nwith SyllableSDK(\n    api_key_header=os.getenv(\"SYLLABLESDK_API_KEY_HEADER\", \"\"),\n) as ss_client:\n\n    res = ss_client.incidents.incident_get_organizations()\n\n    # Handle response\n    print(res)"
      - lang: typescript
        label: Typescript (SDK)
        source: "import { SyllableSDK } from \"syllable-sdk\";\n\nconst syllableSDK = new SyllableSDK({\n  apiKeyHeader: process.env[\"SYLLABLESDK_API_KEY_HEADER\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await syllableSDK.incidents.incidentGetOrganizations();\n\n  console.log(result);\n}\n\nrun();"
  /api/v1/incidents/{incident_id}:
    get:
      tags:
      - incidents
      summary: Get Incident By Id
      description: Get incident by ID
      operationId: incident_get_by_id
      security:
      - APIKeyHeader: []
      parameters:
      - name: incident_id
        in: path
        required: true
        schema:
          type: integer
          title: Incident Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: python
        label: Python (SDK)
        source: "import os\nfrom syllable_sdk import SyllableSDK\n\n\nwith SyllableSDK(\n    api_key_header=os.getenv(\"SYLLABLESDK_API_KEY_HEADER\", \"\"),\n) as ss_client:\n\n    res = ss_client.incidents.get_by_id(incident_id=835824)\n\n    # Handle response\n    print(res)"
      - lang: typescript
        label: Typescript (SDK)
        source: "import { SyllableSDK } from \"syllable-sdk\";\n\nconst syllableSDK = new SyllableSDK({\n  apiKeyHeader: process.env[\"SYLLABLESDK_API_KEY_HEADER\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await syllableSDK.incidents.getById({\n    incidentId: 835824,\n  });\n\n  console.log(result);\n}\n\nrun();"
    delete:
      tags:
      - incidents
      summary: Delete Incident
      description: Delete an incident by ID
      operationId: incident_delete
      security:
      - APIKeyHeader: []
      parameters:
      - name: incident_id
        in: path
        required: true
        schema:
          type: integer
          title: Incident Id
      - name: reason
        in: query
        required: true
        schema:
          type: string
          title: Reason
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: python
        label: Python (SDK)
        source: "import os\nfrom syllable_sdk import SyllableSDK\n\n\nwith SyllableSDK(\n    api_key_header=os.getenv(\"SYLLABLESDK_API_KEY_HEADER\", \"\"),\n) as ss_client:\n\n    res = ss_client.incidents.delete(incident_id=400877, reason=\"<value>\")\n\n    # Handle response\n    print(res)"
      - lang: typescript
        label: Typescript (SDK)
        source: "import { SyllableSDK } from \"syllable-sdk\";\n\nconst syllableSDK = new SyllableSDK({\n  apiKeyHeader: process.env[\"SYLLABLESDK_API_KEY_HEADER\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await syllableSDK.incidents.delete({\n    incidentId: 400877,\n    reason: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
components:
  schemas:
    IncidentResponse:
      properties:
        description:
          type: string
          title: Description
          description: Description of the service incident
          examples:
          - Service outage in region X
        start_datetime:
          type: string
          format: date-time
          title: Start Datetime
          description: Start time of the incident
          examples:
          - '2023-10-01T08:00:00Z'
        resolution_datetime:
          type: string
          format: date-time
          title: Resolution Datetime
          description: Resolution time of the incident
          examples:
          - '2023-10-01T12:00:00Z'
        impact_category:
          type: string
          title: Impact Category
          description: Category of the impact
          examples:
          - High
        sessions_impacted:
          type: integer
          title: Sessions Impacted
          description: Number of sessions impacted
          examples:
          - 1500
        markdown:
          type: string
          title: Markdown
          description: Detailed markdown description of the incident
          examples:
          - '**Incident Details**'
        organization_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Organization Id
          description: The ID of the organization
          examples:
          - 123
        sub_organization_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Sub Organization Id
          description: The ID of the sub-organization
          examples:
          - 456
        sub_organization:
          anyOf:
          - type: string
          - type: 'null'
          title: Sub Organization
          description: The name of the sub-organization (DEPRECATED)
          deprecated: true
          examples:
          - SubOrg A
        id:
          type: integer
          title: Id
          description: The ID of the incident to update
          examples:
          - 1
        created_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created At
          description: Creation time of the incident
          examples:
          - '2023-10-01T08:00:00Z'
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
          description: Last update time of the incident
          examples:
          - '2023-10-01T08:00:00Z'
        last_updated_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Updated By
          description: The email of the user who last updated the incident
          examples:
          - user@mail.com
      type: object
      required:
      - description
      - start_datetime
      - resolution_datetime
      - impact_category
      - sessions_impacted
      - markdown
      - id
      - last_updated_by
      title: IncidentResponse
      description: Response model for service incident operations.
    IncidentOrganizationResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
      type: object
      required:
      - id
      - name
      - display_name
      title: IncidentOrganizationResponse
    OrderByDirection:
      type: string
      enum:
      - asc
      - desc
      title: OrderByDirection
      description: The direction in which to order list results, either ascending or descending.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    IncidentCreateRequest:
      properties:
        description:
          type: string
          title: Description
          description: Description of the service incident
          examples:
          - Service outage in region X
        start_datetime:
          type: string
          format: date-time
          title: Start Datetime
          description: Start time of the incident
          examples:
          - '2023-10-01T08:00:00Z'
        resolution_datetime:
          type: string
          format: date-time
          title: Resolution Datetime
          description: Resolution time of the incident
          examples:
          - '2023-10-01T12:00:00Z'
        impact_category:
          type: string
          title: Impact Category
          description: Category of the impact
          examples:
          - High
        sessions_impacted:
          type: integer
          title: Sessions Impacted
          description: Number of sessions impacted
          examples:
          - 1500
        markdown:
          type: string
          title: Markdown
          description: Detailed markdown description of the incident
          examples:
          - '**Incident Details**'
        organization_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Organization Id
          description: The ID of the organization
          examples:
          - 123
        sub_organization_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Sub Organization Id
          description: The ID of the sub-organization
          examples:
          - 456
        sub_organization:
          anyOf:
          - type: string
          - type: 'null'
          title: Sub Organization
          description: The name of the sub-organization (DEPRECATED)
          deprecated: true
          examples:
          - SubOrg A
      type: object
      required:
      - description
      - start_datetime
      - resolution_datetime
      - impact_category
      - sessions_impacted
      - markdown
      title: IncidentCreateRequest
      description: Request model to create a service incident.
    IncidentProperties:
      type: string
      enum:
      - id
      - description
      - impact_category
      - sessions_impacted
      - markdown
      - created_at
      - updated_at
      - organization_id
      - sub_organization_id
      - start_datetime
      - end_datetime
      - resolution_datetime
      title: IncidentProperties
      description: Names of agent fields supported for filtering/sorting on list endpoint.
    ListResponse_IncidentResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/IncidentResponse'
          type: array
          title: Items
          description: List of items returned from the query
          examples: []
        page:
          type: integer
          title: Page
          description: The page number of the results (0-based)
          examples:
          - 0
        page_size:
          type: integer
          title: Page Size
          description: The number of items returned per page
          examples:
          - 25
        total_pages:
          anyOf:
          - type: integer
          - type: 'null'
          title: Total Pages
          description: The total number of pages of results given the indicated page size
          examples:
          - 4
        total_count:
          anyOf:
          - type: integer
          - type: 'null'
          title: Total Count
          description: The total number of items returned from the query
          examples:
          - 100
      type: object
      required:
      - items
      - page
      - page_size
      title: ListResponse[IncidentResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IncidentUpdateRequest:
      properties:
        description:
          type: string
          title: Description
          description: Description of the service incident
          examples:
          - Service outage in region X
        start_datetime:
          type: string
          format: date-time
          title: Start Datetime
          description: Start time of the incident
          examples:
          - '2023-10-01T08:00:00Z'
        resolution_datetime:
          type: string
          format: date-time
          title: Resolution Datetime
          description: Resolution time of the incident
          examples:
          - '2023-10-01T12:00:00Z'
        impact_category:
          type: string
          title: Impact Category
          description: Category of the impact
          examples:
          - High
        sessions_impacted:
          type: integer
          title: Sessions Impacted
          description: Number of sessions impacted
          examples:
          - 1500
        markdown:
          type: string
          title: Markdown
          description: Detailed markdown description of the incident
          examples:
          - '**Incident Details**'
        organization_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Organization Id
          description: The ID of the organization
          examples:
          - 123
        sub_organization_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Sub Organization Id
          description: The ID of the sub-organization
          examples:
          - 456
        sub_organization:
          anyOf:
          - type: string
          - type: 'null'
          title: Sub Organization
          description: The name of the sub-organization (DEPRECATED)
          deprecated: true
          examples:
          - SubOrg A
        id:
          type: integer
          title: Id
          description: The ID of the incident to update
          examples:
          - 1
      type: object
      required:
      - description
      - start_datetime
      - resolution_datetime
      - impact_category
      - sessions_impacted
      - markdown
      - id
      title: IncidentUpdateRequest
      description: Request model to update an existing service incident.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Syllable-API-Key
x-speakeasy-name-override:
- operationId: .*_list$
  methodNameOverride: list
- operationId: .*_create$
  methodNameOverride: create
- operationId: .*_update$
  methodNameOverride: update
- operationId: .*_upload$
  methodNameOverride: upload
- operationId: .*_delete$
  methodNameOverride: delete
- operationId: .*_get_by_id$
  methodNameOverride: get_by_id
- operationId: .*_get_by_name$
  methodNameOverride: get_by_name
- operationId: .*_add$
  methodNameOverride: add
- operationId: .*_remove$
  methodNameOverride: remove
- operationId: .*_results$
  methodNameOverride: results
- operationId: .*_queue_work$
  methodNameOverride: queue_work
- operationId: .*_activate$
  methodNameOverride: activate
- operationId: .*_inactivate$
  methodNameOverride: inactivate
- operationId: .*_list_files$
  methodNameOverride: list_files
- operationId: .*_move_files$
  methodNameOverride: move_files
- operationId: .*_upload_file$
  methodNameOverride: upload_file