Weave Events API

Platform events and subscription management.

OpenAPI Specification

weave-hq-events-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Weave Contacts Events API
  description: 'The Weave API is the developer surface of the Weave customer/patient communication and payments platform for small healthcare businesses (dental, optometry, veterinary, medical, and specialty practices). It exposes REST resources across messaging (SMS/text), phone and calls, contacts, scheduling and appointments, payments, digital forms, reviews, and event subscriptions.


    Base URL is https://api.weaveconnect.com. Requests are authenticated with an OAuth 2.0 bearer access token issued by Weave''s OIDC provider (https://oidc.weaveconnect.com, token endpoint under https://auth.weaveconnect.com/oauth2/default) and are scoped to a location (sub-account); the location is identified by a `location_id` query parameter or header on most endpoints.


    Grounding note: the public Weave Developer Portal (https://dp.getweave.com) requires a developer login, so the authoritative request/response schemas could not be read directly. The paths and base URL below are grounded in Weave''s own published Developer Portal client (the app''s compiled configuration and API calls against https://api.weaveconnect.com). Path coverage is therefore high-confidence, while request bodies, query parameters, and response schemas are modeled and should be reconciled against the official reference once portal access is available.'
  version: '1.0'
  contact:
    name: Weave
    url: https://www.getweave.com
  license:
    name: Proprietary
    url: https://www.getweave.com/legal/terms/
servers:
- url: https://api.weaveconnect.com
  description: Weave production API
security:
- oauth2: []
- bearerAuth: []
tags:
- name: Events
  description: Platform events and subscription management.
paths:
  /v1/events:
    get:
      operationId: listEvents
      tags:
      - Events
      summary: List events
      description: Lists platform events (calls, messages, appointments, payments, forms) for a location.
      parameters:
      - $ref: '#/components/parameters/LocationId'
      - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: A list of events.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v1/subscribe:
    post:
      operationId: subscribe
      tags:
      - Events
      summary: Subscribe to an event stream
      description: Subscribes a client to a single event stream/topic.
      parameters:
      - $ref: '#/components/parameters/LocationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                topic:
                  type: string
      responses:
        '200':
          description: Subscription confirmation.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v1/subscribe/multi:
    post:
      operationId: subscribeMulti
      tags:
      - Events
      summary: Subscribe to multiple event streams
      description: Subscribes a client to multiple event streams/topics at once.
      parameters:
      - $ref: '#/components/parameters/LocationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                topics:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: Subscription confirmation.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v1/unsubscribe:
    post:
      operationId: unsubscribe
      tags:
      - Events
      summary: Unsubscribe from an event stream
      description: Unsubscribes a client from an event stream/topic.
      parameters:
      - $ref: '#/components/parameters/LocationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                topic:
                  type: string
      responses:
        '200':
          description: Unsubscribe confirmation.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Event:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          description: Event type, e.g. call.completed, message.received, appointment.updated, payment.succeeded, form.submitted.
        location_id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
        data:
          type: object
          additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    Limit:
      name: limit
      in: query
      required: false
      description: Maximum number of items to return.
      schema:
        type: integer
        default: 50
    LocationId:
      name: location_id
      in: query
      required: false
      description: The Weave location (sub-account) the request is scoped to. Required on most endpoints; may alternatively be supplied via a location header.
      schema:
        type: string
        format: uuid
  securitySchemes:
    oauth2:
      type: oauth2
      description: 'OAuth 2.0 access token issued by Weave''s OIDC provider. Authorization and token endpoints are served under https://auth.weaveconnect.com/oauth2/default (issuer https://oidc.weaveconnect.com). Present as `Authorization: Bearer ACCESS_TOKEN`.'
      flows:
        authorizationCode:
          authorizationUrl: https://auth.weaveconnect.com/oauth2/default/v1/authorize
          tokenUrl: https://auth.weaveconnect.com/oauth2/default/v1/token
          scopes: {}
    bearerAuth:
      type: http
      scheme: bearer
      description: 'OAuth 2.0 bearer access token passed as `Authorization: Bearer ACCESS_TOKEN`.'