OpenPhone Calls API

Operations related to calls

OpenAPI Specification

openphone-calls-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Quo Public Calls API
  version: 1.0.0
  description: API for connecting with Quo.
  contact:
    name: Quo Support
    email: support@quo.com
    url: https://support.quo.com/
  termsOfService: https://www.quo.com/terms
servers:
- description: Production server
  url: https://api.quo.com
security:
- apiKey: []
tags:
- description: Operations related to calls
  name: Calls
paths:
  /v1/call-recordings/{callId}:
    get:
      tags:
      - Calls
      summary: Get recordings for a call
      description: Retrieve a list of recordings associated with a specific call. The results are sorted chronologically, with the oldest recording segment appearing first in the list.
      operationId: getCallRecordings_v1
      parameters:
      - in: path
        name: callId
        required: true
        schema:
          description: The unique identifier of the call for which recordings are being retrieved.
          examples:
          - AC3700e624eca547eb9f749a06f
          pattern: ^AC(.*)$
          type: string
        example: AC3700e624eca547eb9f749a06f
      security:
      - apiKey: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    items:
                      additionalProperties: false
                      type: object
                      required:
                      - duration
                      - id
                      - startTime
                      - status
                      - type
                      - url
                      properties:
                        duration:
                          anyOf:
                          - description: The length of the call recording in seconds. Null if the recording is not completed or the duration is unknown.
                            examples:
                            - 60
                            type: integer
                            example: 60
                          - type: 'null'
                        id:
                          description: The unique identifier of the call recording.
                          examples:
                          - CRwRVK2qBq
                          type: string
                          example: CRwRVK2qBq
                        startTime:
                          anyOf:
                          - description: The timestamp when the recording began, in ISO 8601 format. Null if the recording hasn't started or the start time is unknown.
                            examples:
                            - '2022-01-01T00:00:00Z'
                            format: date-time
                            type: string
                            example: '2022-01-01T00:00:00Z'
                          - type: 'null'
                        status:
                          anyOf:
                          - type: string
                            enum:
                            - absent
                            - completed
                            - deleted
                            - failed
                            - in-progress
                            - paused
                            - processing
                            - stopped
                            - stopping
                            description: The current status of the call recording.
                            examples:
                            - completed
                            example: completed
                          - type: 'null'
                        type:
                          anyOf:
                          - description: The file type of the call recording. Null if the type is not specified or is unknown.
                            examples:
                            - audio/mpeg
                            type: string
                            example: audio/mpeg
                          - type: 'null'
                        url:
                          anyOf:
                          - description: The URL where the call recording can be accessed or downloaded. Null if the URL is not available or the recording is not accessible.
                            examples:
                            - https://examplestorage.com/a643d4d3e1484fcc8b721627284eda5e.mp3
                            format: uri-reference
                            type: string
                            example: https://examplestorage.com/a643d4d3e1484fcc8b721627284eda5e.mp3
                          - type: 'null'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                properties:
                  message:
                    type: string
                  code:
                    const: 0900400
                    type: string
                  status:
                    const: 400
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Bad Request
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                properties:
                  message:
                    type: string
                  code:
                    const: 0900401
                    type: string
                  status:
                    const: 401
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Unauthorized
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                properties:
                  message:
                    type: string
                  code:
                    const: 0900403
                    type: string
                  status:
                    const: 403
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Forbidden
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                properties:
                  message:
                    type: string
                  code:
                    const: 0900404
                    type: string
                  status:
                    const: 404
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Not Found
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
        '500':
          description: Unknown Error
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                properties:
                  message:
                    type: string
                  code:
                    const: 0901500
                    type: string
                  status:
                    const: 500
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Unknown
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
  /v1/calls:
    get:
      tags:
      - Calls
      summary: List calls
      description: Fetch a paginated list of calls associated with a specific Quo number and another number.
      operationId: listCalls_v1
      parameters:
      - in: query
        name: phoneNumberId
        required: true
        schema:
          description: The unique identifier of the Quo number associated with the call.
          examples:
          - PN123abc
          pattern: ^PN(.*)$
          type: string
        example: PN123abc
      - in: query
        name: userId
        required: false
        schema:
          description: The unique identifier of the user whose access scope is applied to the results. Scopes the response to calls accessible to the specified user. Defaults to the workspace owner.
          examples:
          - US123abc
          pattern: ^US(.*)$
          type: string
        example: US123abc
      - in: query
        name: participants
        required: true
        schema:
          maxItems: 1
          description: The phone numbers of participants involved in the call conversation, excluding your Quo number. Each number should contain the country code and conform to the E.164 format. Currently limited to one-to-one (1:1) conversations only.
          examples:
          - '+15555555555'
          type: array
          items:
            minLength: 1
            type: string
        example: '+15555555555'
      - in: query
        name: since
        required: false
        schema:
          deprecated: true
          description: DEPRECATED, use "createdAfter" or "createdBefore" instead. "since" incorrectly behaves as "createdBefore" and will be removed in an upcoming release.
          examples:
          - '2022-01-01T00:00:00Z'
          format: date-time
          type: string
        example: '2022-01-01T00:00:00Z'
      - in: query
        name: createdAfter
        required: false
        schema:
          description: Filter results to only include calls created after the specified date and time, in ISO 8601 format.
          examples:
          - '2022-01-01T00:00:00Z'
          format: date-time
          type: string
        example: '2022-01-01T00:00:00Z'
      - in: query
        name: createdBefore
        required: false
        schema:
          description: Filter results to only include calls created before the specified date and time, in ISO 8601 format.
          examples:
          - '2022-01-01T00:00:00Z'
          format: date-time
          type: string
        example: '2022-01-01T00:00:00Z'
      - in: query
        name: maxResults
        required: true
        schema:
          description: Maximum number of results to return per page.
          default: 10
          maximum: 100
          minimum: 1
          type: integer
      - in: query
        name: pageToken
        required: false
        schema:
          type: string
      security:
      - apiKey: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                - totalItems
                - nextPageToken
                properties:
                  data:
                    type: array
                    items:
                      additionalProperties: false
                      type: object
                      required:
                      - answeredAt
                      - answeredBy
                      - initiatedBy
                      - direction
                      - status
                      - completedAt
                      - createdAt
                      - callRoute
                      - duration
                      - forwardedFrom
                      - forwardedTo
                      - aiHandled
                      - id
                      - phoneNumberId
                      - participants
                      - updatedAt
                      - userId
                      properties:
                        answeredAt:
                          anyOf:
                          - description: The timestamp when the call was answered in ISO 8601 format. Null if the call was not answered.
                            examples:
                            - '2022-01-01T00:00:00Z'
                            format: date-time
                            type: string
                            example: '2022-01-01T00:00:00Z'
                          - type: 'null'
                        answeredBy:
                          anyOf:
                          - description: The unique identifier of the Quo user who answered the incoming call. Null for outgoing calls or unanswered incoming calls.
                            examples:
                            - USlHhXmRMz
                            type: string
                            example: USlHhXmRMz
                          - type: 'null'
                        initiatedBy:
                          anyOf:
                          - description: The unique identifier of the Quo user who initiated the outgoing call. Null for incoming calls.
                            examples:
                            - USlHhXmRMz
                            type: string
                            example: USlHhXmRMz
                          - type: 'null'
                        direction:
                          type: string
                          enum:
                          - incoming
                          - outgoing
                          description: The direction of the call relative to the Quo number.
                          examples:
                          - incoming
                          example: incoming
                        status:
                          type: string
                          enum:
                          - queued
                          - initiated
                          - ringing
                          - in-progress
                          - completed
                          - busy
                          - failed
                          - no-answer
                          - canceled
                          - missed
                          - answered
                          - forwarded
                          - abandoned
                          description: The current status of the call.
                          examples:
                          - completed
                          example: completed
                        completedAt:
                          anyOf:
                          - description: The timestamp when the call ended, in ISO 8601 format. Null if the call is ongoing or was not completed.
                            examples:
                            - '2022-01-01T00:00:00Z'
                            format: date-time
                            type: string
                            example: '2022-01-01T00:00:00Z'
                          - type: 'null'
                        createdAt:
                          description: The timestamp when the call record was created, in ISO 8601 format.
                          examples:
                          - '2022-01-01T00:00:00Z'
                          format: date-time
                          type: string
                          example: '2022-01-01T00:00:00Z'
                        callRoute:
                          anyOf:
                          - description: 'How the call reached the user''s inbox: either by direct dial to their number or routed through a phone menu. Null for outbound calls.'
                            examples:
                            - phone-number
                            - phone-menu
                            type: string
                            example: phone-number
                          - type: 'null'
                        duration:
                          description: The total duration of the call in seconds.
                          examples:
                          - 60
                          type: integer
                          example: 60
                        forwardedFrom:
                          anyOf:
                          - description: The phone number or Quo user ID from which the call was forwarded. Null if the call was not forwarded.
                            examples:
                            - US123abc
                            example: US123abc
                            anyOf:
                            - description: A phone number in E.164 format, including the country code.
                              examples:
                              - '+15555555555'
                              pattern: ^\+[1-9]\d{1,14}$
                              type: string
                              example: '+15555555555'
                            - pattern: ^US(.*)$
                              type: string
                          - type: 'null'
                        forwardedTo:
                          anyOf:
                          - description: The phone number or Quo user ID to which the call was forwarded. Null if the call was not forwarded.
                            examples:
                            - US123abc
                            example: US123abc
                            anyOf:
                            - description: A phone number in E.164 format, including the country code.
                              examples:
                              - '+15555555555'
                              pattern: ^\+[1-9]\d{1,14}$
                              type: string
                              example: '+15555555555'
                            - pattern: ^US(.*)$
                              type: string
                          - type: 'null'
                        aiHandled:
                          anyOf:
                          - description: Type of AI that answered the call. Set to 'ai-agent' for AI responses, or null for human responses.
                            examples:
                            - ai-agent
                            type: string
                            example: ai-agent
                          - type: 'null'
                        id:
                          description: The unique identifier of the call.
                          examples:
                          - AC123abc
                          pattern: ^AC(.*)$
                          type: string
                          example: AC123abc
                        phoneNumberId:
                          description: The unique identifier of the Quo number associated with the call.
                          examples:
                          - PN123abc
                          pattern: ^PN(.*)$
                          type: string
                          example: PN123abc
                        participants:
                          maxItems: 2
                          type: array
                          items:
                            description: A phone number in E.164 format, including the country code.
                            examples:
                            - '+15555555555'
                            pattern: ^\+[1-9]\d{1,14}$
                            type: string
                            example: '+15555555555'
                        updatedAt:
                          anyOf:
                          - description: The timestamp when the call record was last updated, in ISO 8601 format. Null if never updated.
                            examples:
                            - '2022-01-01T00:00:00Z'
                            format: date-time
                            type: string
                            example: '2022-01-01T00:00:00Z'
                          - type: 'null'
                        userId:
                          description: The unique identifier of the Quo user account associated with the call.
                          examples:
                          - US123abc
                          pattern: ^US(.*)$
                          type: string
                          example: US123abc
                  totalItems:
                    description: 'Total number of items available. ⚠️ Note: `totalItems` is not accurately returning the total number of items that can be paginated. We are working on fixing this issue.'
                    type: integer
                  nextPageToken:
                    anyOf:
                    - type: string
                    - type: 'null'
        '400':
          description: Too Many Participants
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                - description
                properties:
                  message:
                    type: string
                  code:
                    const: '0101400'
                    type: string
                  status:
                    const: 400
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Too Many Participants
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
                  description:
                    const: Too Many Participants
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                properties:
                  message:
                    type: string
                  code:
                    const: '0100401'
                    type: string
                  status:
                    const: 401
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Unauthorized
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
        '403':
          description: Not Phone Number User
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                - description
                properties:
                  message:
                    type: string
                  code:
                    const: '0101403'
                    type: string
                  status:
                    const: 403
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Not Phone Number User
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
                  description:
                    const: Not Phone Number User
                    type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                properties:
                  message:
                    type: string
                  code:
                    const: '0100404'
                    type: string
                  status:
                    const: 404
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Not Found
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                          - type
                          properties:
                            type:
                              type: string
        '500':
          description: Unknown Error
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                - code
                - status
                - docs
                - title
                properties:
                  message:
                    type: string
                  code:
                    const: '0101500'
                    type: string
                  status:
                    const: 500
                    type: number
                  docs:
                    const: https://quo.com/docs
                    type: string
                  title:
                    const: Unknown
                    type: string
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                      - path
                      - message
                      - schema
                      properties:
                        path:
                          type: string
                        message:
                          type

# --- truncated at 32 KB (84 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/openphone/refs/heads/main/openapi/openphone-calls-api-openapi.yml