messagebird Call Flows API

Operations for managing call flows that define interactive voice response sequences.

OpenAPI Specification

messagebird-call-flows-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: MessageBird Balance Available Numbers Call Flows API
  description: The MessageBird Balance API provides developers with access to their account balance information. It returns the current payment type, available amount, and currency for the account associated with the API key. This API is useful for monitoring credit usage, building billing dashboards, and setting up automated alerts when account balances fall below a threshold.
  version: '1.0'
  contact:
    name: MessageBird Support
    url: https://support.messagebird.com
  termsOfService: https://www.messagebird.com/en/terms
servers:
- url: https://rest.messagebird.com
  description: Production Server
security:
- accessKey: []
tags:
- name: Call Flows
  description: Operations for managing call flows that define interactive voice response sequences.
paths:
  /call-flows:
    get:
      operationId: listCallFlows
      summary: List all call flows
      description: Retrieves a paginated list of all call flows configured on the account.
      tags:
      - Call Flows
      parameters:
      - $ref: '#/components/parameters/pageParam'
      - $ref: '#/components/parameters/perPageParam'
      responses:
        '200':
          description: A list of call flows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallFlowList'
        '401':
          description: Unauthorized
    post:
      operationId: createCallFlow
      summary: Create a call flow
      description: Creates a new call flow with a sequence of steps that define the interactive voice response behavior.
      tags:
      - Call Flows
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallFlowCreate'
      responses:
        '201':
          description: Call flow created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallFlowResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
  /call-flows/{callFlowId}:
    get:
      operationId: viewCallFlow
      summary: View a call flow
      description: Retrieves the details of a specific call flow by its unique identifier.
      tags:
      - Call Flows
      parameters:
      - $ref: '#/components/parameters/callFlowIdParam'
      responses:
        '200':
          description: Call flow details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallFlowResponse'
        '401':
          description: Unauthorized
        '404':
          description: Call flow not found
    put:
      operationId: updateCallFlow
      summary: Update a call flow
      description: Updates an existing call flow with new step definitions.
      tags:
      - Call Flows
      parameters:
      - $ref: '#/components/parameters/callFlowIdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallFlowCreate'
      responses:
        '200':
          description: Call flow updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallFlowResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Call flow not found
    delete:
      operationId: deleteCallFlow
      summary: Delete a call flow
      description: Deletes an existing call flow by its unique identifier.
      tags:
      - Call Flows
      parameters:
      - $ref: '#/components/parameters/callFlowIdParam'
      responses:
        '204':
          description: Call flow deleted
        '401':
          description: Unauthorized
        '404':
          description: Call flow not found
components:
  schemas:
    CallFlowResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CallFlow'
    CallFlowStep:
      type: object
      required:
      - action
      properties:
        id:
          type: string
          description: The unique identifier of the step.
        action:
          type: string
          description: The action to perform in this step.
          enum:
          - say
          - play
          - pause
          - record
          - fetchCallFlow
          - hangup
          - transfer
        options:
          type: object
          description: Action-specific options for the step.
    Pagination:
      type: object
      properties:
        totalCount:
          type: integer
          description: The total number of items available.
        pageCount:
          type: integer
          description: The total number of pages.
        currentPage:
          type: integer
          description: The current page number.
        perPage:
          type: integer
          description: The number of items per page.
    CallFlowList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CallFlow'
        pagination:
          $ref: '#/components/schemas/Pagination'
    CallFlowCreate:
      type: object
      required:
      - steps
      properties:
        title:
          type: string
          description: A human-readable title for the call flow.
        record:
          type: boolean
          description: Whether to record the entire call.
        steps:
          type: array
          description: A sequence of steps that define the call flow behavior.
          items:
            $ref: '#/components/schemas/CallFlowStep'
    CallFlow:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the call flow.
        title:
          type: string
          description: The title of the call flow.
        record:
          type: boolean
          description: Whether recording is enabled for the call flow.
        steps:
          type: array
          description: The steps that define the call flow.
          items:
            $ref: '#/components/schemas/CallFlowStep'
        createdAt:
          type: string
          format: date-time
          description: The date and time when the call flow was created.
        updatedAt:
          type: string
          format: date-time
          description: The date and time when the call flow was last updated.
  parameters:
    pageParam:
      name: page
      in: query
      required: false
      description: The page number for pagination.
      schema:
        type: integer
        default: 1
    callFlowIdParam:
      name: callFlowId
      in: path
      required: true
      description: The unique identifier of the call flow.
      schema:
        type: string
    perPageParam:
      name: perPage
      in: query
      required: false
      description: The number of items per page.
      schema:
        type: integer
        default: 10
  securitySchemes:
    accessKey:
      type: apiKey
      in: header
      name: Authorization
      description: Access key authentication in the form of 'AccessKey {accessKey}'.
externalDocs:
  description: Balance API Documentation
  url: https://developers.messagebird.com/api/balance/