Global Relay Voice API

Endpoints for archiving voice and video recordings

OpenAPI Specification

global-relay-voice-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Global Relay Conversation Archiving Conversations Voice API
  description: The Global Relay Conversation Archiving API provides a RESTful interface to seamlessly integrate messaging platforms with the Global Relay Archive. It enables secure capture and preservation of one-to-one or multi-party conversations, including text messages, file attachments, reactions, edits, and deletions. The API supports all conversation events and provides guardrails and flexibility to efficiently automate the archiving process and meet compliance requirements. Authentication uses the Client Credentials OAuth 2.0 grant type with Bearer tokens.
  version: 2.0.0
  contact:
    name: Global Relay
    url: https://developers.globalrelay.com/api/conversation-archiving-api/
  license:
    name: Proprietary
    url: https://www.globalrelay.com/legal/
servers:
- url: https://conversations.api.globalrelay.com/v2
  description: Production server
security:
- BearerAuth: []
tags:
- name: Voice
  description: Endpoints for archiving voice and video recordings
paths:
  /voice:
    post:
      operationId: archiveVoiceRecord
      summary: Global Relay Archive a voice or video recording
      description: Archives a voice or video call recording to the Global Relay Archive. Each request must include a unique requestId (UUID). Audio and video files must be uploaded via the /files endpoint before being referenced in this request. The maximum data payload is 3.5MB excluding file attachments.
      tags:
      - Voice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceRequest'
      responses:
        '200':
          description: Voice record archived successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceResponse'
        '400':
          description: Bad request - invalid voice data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or expired access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    VoiceRecord:
      type: object
      required:
      - callId
      - callType
      - startTime
      - endTime
      - participants
      properties:
        callId:
          type: string
          description: Unique identifier for the call or meeting
        callType:
          type: string
          description: Type of voice/video communication
          enum:
          - VoiceCall
          - VideoCall
          - Conference
          - Meeting
          - Webinar
        title:
          type: string
          description: Title or subject of the call or meeting
        startTime:
          type: string
          format: date-time
          description: Start time of the call in ISO 8601 format
        endTime:
          type: string
          format: date-time
          description: End time of the call in ISO 8601 format
        duration:
          type: integer
          description: Duration in seconds
        participants:
          type: array
          items:
            $ref: '#/components/schemas/Participant'
        fileIds:
          type: array
          items:
            type: string
          description: IDs of audio/video files uploaded via /files endpoint
        transcript:
          type: string
          description: Text transcript of the call if available
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error code
        message:
          type: string
          description: Human-readable error message
        requestId:
          type: string
          format: uuid
          description: Request ID for troubleshooting
    VoiceRequest:
      type: object
      required:
      - requestId
      - voiceRecord
      properties:
        requestId:
          type: string
          format: uuid
          description: Unique identifier for this API request
        voiceRecord:
          $ref: '#/components/schemas/VoiceRecord'
    Participant:
      type: object
      required:
      - participantId
      - displayName
      properties:
        participantId:
          type: string
          description: Unique identifier for the participant
        displayName:
          type: string
          description: Display name of the participant
        email:
          type: string
          format: email
          description: Email address of the participant
        role:
          type: string
          description: Role in the call
          enum:
          - Host
          - Presenter
          - Attendee
          - Caller
          - Callee
    VoiceResponse:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
        status:
          type: string
          description: Status of the archive request
        callId:
          type: string
          description: ID of the archived voice record
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 Client Credentials grant. Obtain a token from https://iam-oauth2.globalrelay.com/oauth2/token with grant_type=client_credentials and scope=openid conversation.