Vocode Webhooks API

The Webhooks API from Vocode — 4 operation(s) for webhooks.

OpenAPI Specification

vocode-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Vocode Hosted Actions Webhooks API
  description: Hosted REST API for the Vocode voice AI platform. Place and manage outbound and inbound phone calls driven by configurable voice agents, and manage the agents, voices, prompts, actions, phone numbers, and webhooks that power them. All requests are authenticated with a Bearer API key. This specification covers the hosted API and is distinct from the open-source vocode-core Python library.
  termsOfService: https://www.vocode.dev
  contact:
    name: Vocode Support
    url: https://docs.vocode.dev
  version: 1.0.0
servers:
- url: https://api.vocode.dev/v1
  description: Production environment
security:
- HTTPBearer: []
tags:
- name: Webhooks
paths:
  /webhooks/create:
    post:
      operationId: createWebhook
      tags:
      - Webhooks
      summary: Create a webhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookParams'
      responses:
        '200':
          description: The created webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '422':
          $ref: '#/components/responses/ValidationError'
  /webhooks:
    get:
      operationId: getWebhook
      tags:
      - Webhooks
      summary: Get a webhook
      parameters:
      - name: id
        in: query
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The requested webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '422':
          $ref: '#/components/responses/ValidationError'
  /webhooks/list:
    get:
      operationId: listWebhooks
      tags:
      - Webhooks
      summary: List webhooks
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Size'
      responses:
        '200':
          description: A paginated page of webhooks.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookPage'
        '422':
          $ref: '#/components/responses/ValidationError'
  /webhooks/update:
    post:
      operationId: updateWebhook
      tags:
      - Webhooks
      summary: Update a webhook
      parameters:
      - name: id
        in: query
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookParams'
      responses:
        '200':
          description: The updated webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    Size:
      name: size
      in: query
      required: false
      schema:
        type: integer
        default: 10
    Page:
      name: page
      in: query
      required: false
      schema:
        type: integer
        default: 1
  schemas:
    ValidationError:
      type: object
      required:
      - loc
      - msg
      - type
      properties:
        loc:
          type: array
          items:
            type: string
        msg:
          type: string
        type:
          type: string
    WebhookPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Webhook'
        page:
          type: integer
        size:
          type: integer
        total:
          type: integer
    Webhook:
      type: object
      required:
      - id
      - user_id
      - url
      - subscriptions
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        method:
          type: string
          enum:
          - POST
          - GET
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    EventType:
      type: string
      enum:
      - event_message
      - event_action
      - event_phone_call_connected
      - event_phone_call_ended
      - event_phone_call_did_not_connect
      - event_transcript
      - event_recording
      - event_human_detection
    WebhookParams:
      type: object
      required:
      - url
      - subscriptions
      properties:
        url:
          type: string
          format: uri
        method:
          type: string
          enum:
          - POST
          - GET
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
  responses:
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer