messagebird Recordings API

Operations for managing call recordings.

OpenAPI Specification

messagebird-recordings-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: MessageBird Balance Available Numbers Recordings 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: Recordings
  description: Operations for managing call recordings.
paths:
  /calls/{callId}/legs/{legId}/recordings:
    get:
      operationId: listRecordings
      summary: List recordings for a leg
      description: Retrieves a list of all recordings associated with a specific call leg.
      tags:
      - Recordings
      parameters:
      - $ref: '#/components/parameters/callIdParam'
      - $ref: '#/components/parameters/legIdParam'
      responses:
        '200':
          description: A list of recordings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordingList'
        '401':
          description: Unauthorized
        '404':
          description: Resource not found
  /recordings/{recordingId}:
    get:
      operationId: viewRecording
      summary: View a recording
      description: Retrieves the details of a specific recording by its unique identifier.
      tags:
      - Recordings
      parameters:
      - $ref: '#/components/parameters/recordingIdParam'
      responses:
        '200':
          description: Recording details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordingResponse'
        '401':
          description: Unauthorized
        '404':
          description: Recording not found
    delete:
      operationId: deleteRecording
      summary: Delete a recording
      description: Deletes an existing recording by its unique identifier.
      tags:
      - Recordings
      parameters:
      - $ref: '#/components/parameters/recordingIdParam'
      responses:
        '204':
          description: Recording deleted
        '401':
          description: Unauthorized
        '404':
          description: Recording not found
components:
  schemas:
    Recording:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the recording.
        format:
          type: string
          description: The format of the recording file.
          enum:
          - wav
        legId:
          type: string
          description: The unique identifier of the leg this recording belongs to.
        status:
          type: string
          description: The status of the recording.
          enum:
          - initialised
          - recording
          - done
          - failed
        duration:
          type: integer
          description: The duration of the recording in seconds.
        createdAt:
          type: string
          format: date-time
          description: The date and time when the recording was created.
        updatedAt:
          type: string
          format: date-time
          description: The date and time when the recording was last updated.
    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.
    RecordingResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Recording'
    RecordingList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Recording'
        pagination:
          $ref: '#/components/schemas/Pagination'
  parameters:
    recordingIdParam:
      name: recordingId
      in: path
      required: true
      description: The unique identifier of the recording.
      schema:
        type: string
    legIdParam:
      name: legId
      in: path
      required: true
      description: The unique identifier of the leg.
      schema:
        type: string
    callIdParam:
      name: callId
      in: path
      required: true
      description: The unique identifier of the call.
      schema:
        type: string
  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/