Guava Voice Agent REST API

REST API to manage calls, conversations, transcripts, recordings, and SMS messages for Guava voice agents. Bearer API-key auth over https://api.goguava.ai/v1.

OpenAPI Specification

gridspace-guava-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Guava Voice Agent REST API
  description: >-
    The Guava (formerly Gridspace) REST API lets you manage calls, conversations,
    SMS messages, and account resources directly over HTTP — no SDK required.
    Guava is a voice AI platform for regulated industries (healthcare, banking,
    insurance, BPOs, government). This specification was reconstructed faithfully
    from Guava's published REST API reference at https://goguava.ai/docs/api-overview;
    every path, parameter, and response field is documented by the provider.
  version: v1
  contact:
    name: Guava Support
    email: hi@goguava.ai
    url: https://goguava.ai/docs/api-overview
  x-logo:
    url: https://goguava.ai
servers:
  - url: https://api.goguava.ai/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Conversations
    description: Retrieve, inspect, and delete conversation data for completed calls.
  - name: Messages
    description: Send SMS messages and read inbound messages received on your Guava numbers.
  - name: SDK
    description: SDK lifecycle utilities.
paths:
  /check-sdk-deprecation:
    post:
      operationId: checkSdkDeprecation
      summary: Check SDK deprecation status
      description: Check the deprecation status of a specific SDK version. REST-only — there is no SDK or CLI method for it.
      tags:
        - SDK
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [sdk_name, sdk_version]
              properties:
                sdk_name:
                  type: string
                  enum: [python-sdk, typescript-sdk]
                  description: The SDK to check.
                sdk_version:
                  type: string
                  description: The version to check (e.g. "0.5.0").
      responses:
        '200':
          description: Deprecation status returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  deprecation_status:
                    type: string
                    enum: [supported, deprecated]
        '401':
          description: Invalid authentication.
  /conversations:
    get:
      operationId: listConversations
      summary: List conversations
      description: List your organization's conversations, newest first. Cursor paginated.
      tags:
        - Conversations
      parameters:
        - name: from_number
          in: query
          required: false
          schema: { type: string }
          description: Only return calls placed from this number (E.164).
        - name: to_number
          in: query
          required: false
          schema: { type: string }
          description: Only return calls placed to this number (E.164).
        - name: direction
          in: query
          required: false
          schema: { type: string, enum: [inbound, outbound, all] }
          description: Filter by call direction from the perspective of your agent.
        - name: date_from
          in: query
          required: false
          schema: { type: string, format: date-time }
          description: Only return calls at or after this time (ISO 8601).
        - name: date_to
          in: query
          required: false
          schema: { type: string, format: date-time }
          description: Only return calls at or before this time (ISO 8601).
        - name: campaign_id
          in: query
          required: false
          schema: { type: string }
          description: Only return calls placed by this outbound campaign.
        - name: limit
          in: query
          required: false
          schema: { type: integer, minimum: 1, maximum: 100, default: 50 }
          description: Maximum number of conversations to return.
        - name: after
          in: query
          required: false
          schema: { type: string }
          description: Pagination cursor — pass the next_cursor from the previous response.
      responses:
        '200':
          description: A page of conversations.
          content:
            application/json:
              schema:
                type: object
                properties:
                  conversations:
                    type: array
                    items:
                      $ref: '#/components/schemas/Conversation'
                  next_cursor:
                    type: string
                    nullable: true
                  has_more:
                    type: boolean
        '400':
          description: Invalid limit, after cursor, campaign_id, or date value.
        '401':
          description: Invalid authentication.
        '422':
          description: from_number or to_number is not a valid E.164 number.
  /conversations/{call_id}:
    get:
      operationId: getConversation
      summary: Get conversation details
      description: Retrieve metadata about a single conversation.
      tags:
        - Conversations
      parameters:
        - $ref: '#/components/parameters/CallId'
      responses:
        '200':
          description: The conversation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
        '401':
          description: Invalid authentication.
        '404':
          description: The call with this ID does not exist.
    delete:
      operationId: deleteConversation
      summary: Delete a conversation
      description: Permanently delete a conversation and its associated data.
      tags:
        - Conversations
      parameters:
        - $ref: '#/components/parameters/CallId'
      responses:
        '204':
          description: Deleted (empty body).
        '401':
          description: Invalid authentication.
        '404':
          description: The call with this ID does not exist.
  /conversations/{call_id}/transcript:
    get:
      operationId: getConversationTranscript
      summary: Get conversation transcript
      description: Download the transcript for a conversation as a list of turns.
      tags:
        - Conversations
      parameters:
        - $ref: '#/components/parameters/CallId'
      responses:
        '200':
          description: The transcript turns.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TranscriptTurn'
        '401':
          description: Invalid authentication.
        '404':
          description: The call with this ID does not exist.
  /conversations/{call_id}/recording:
    get:
      operationId: getConversationRecording
      summary: Get conversation recording
      description: Download the audio recording for a conversation in WAV format.
      tags:
        - Conversations
      parameters:
        - $ref: '#/components/parameters/CallId'
      responses:
        '200':
          description: WAV audio file.
          content:
            audio/wav:
              schema:
                type: string
                format: binary
        '401':
          description: Invalid authentication.
        '404':
          description: The call with this ID does not exist.
  /send-sms:
    post:
      operationId: sendSms
      summary: Send an SMS
      description: Send a single SMS from one of your Guava numbers.
      tags:
        - Messages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [from_number, to_number, message]
              properties:
                from_number:
                  type: string
                  description: One of your Guava numbers (E.164). Must have SMS enabled.
                to_number:
                  type: string
                  description: The recipient's number (E.164).
                message:
                  type: string
                  description: The message body to send.
      responses:
        '201':
          description: Message accepted for delivery.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: sent
        '400':
          description: The from_number isn't owned by your organization, or doesn't have SMS configured.
        '401':
          description: Invalid authentication.
        '500':
          description: The upstream carrier failed to accept the message.
  /messages:
    get:
      operationId: listMessages
      summary: List inbound messages
      description: List the inbound messages received on one of your Guava numbers, oldest first.
      tags:
        - Messages
      parameters:
        - name: to_number
          in: query
          required: true
          schema: { type: string }
          description: The Guava number whose inbox you want to read (E.164). Must be owned by your organization.
        - name: start
          in: query
          required: false
          schema: { type: string, format: date-time }
          description: Only return messages received at or after this time (ISO 8601, inclusive).
        - name: from_number
          in: query
          required: false
          schema: { type: string }
          description: Only return messages sent from this number (E.164).
        - name: modality
          in: query
          required: false
          schema: { type: string, enum: [sms] }
          description: Only return messages on this channel.
        - name: limit
          in: query
          required: false
          schema: { type: integer, minimum: 1, maximum: 100, default: 50 }
          description: Maximum number of messages to return.
      responses:
        '200':
          description: A page of inbound messages.
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/Message'
                  has_more:
                    type: boolean
        '400':
          description: Invalid start timestamp or limit value.
        '401':
          description: Invalid authentication.
        '404':
          description: The to_number isn't owned by your organization.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Include your API key as a bearer token: Authorization: Bearer YOUR_GUAVA_API_KEY.
        API keys are created on the app.goguava.ai dashboard and are prefixed "gva-".
  parameters:
    CallId:
      name: call_id
      in: path
      required: true
      schema: { type: string }
      description: ID of the call.
  schemas:
    Conversation:
      type: object
      properties:
        id:
          type: string
          description: Unique ID of the conversation.
        call_id:
          type: string
          description: ID of the call.
        ts:
          type: string
          format: date-time
          description: Date of the call (ISO 8601).
        direction:
          type: string
          enum: [inbound, outbound]
        from_number:
          type: string
          description: Phone number that initiated the call.
        to_number:
          type: string
          description: Phone number that received the call.
        duration_sec:
          type: integer
          nullable: true
          description: How long the call lasted, in seconds. Null until the call completes.
        campaign_id:
          type: string
          nullable: true
          description: Outbound campaign that initiated this call, if applicable.
        termination_reason:
          type: string
          nullable: true
          description: How the call ended (e.g. "user-hangup"), if known.
    TranscriptTurn:
      type: object
      properties:
        speaker:
          type: string
          enum: [HUMAN, AGENT]
        text:
          type: string
        offset_ms:
          type: integer
          description: Milliseconds into the call when this turn began.
    Message:
      type: object
      properties:
        id:
          type: string
        from_number:
          type: string
        to_number:
          type: string
        content:
          type: string
        received_at:
          type: string
          format: date-time
        modality:
          type: string
          enum: [sms]
        direction:
          type: string
          enum: [inbound]