Herald Webhooks API

The Webhooks API from Herald — 2 operation(s) for webhooks.

OpenAPI Specification

herald-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Herald Applications Webhooks API
  description: Herald is a unified REST API for commercial insurance. A single integration lets software platforms create applications, submit them to many carriers, and retrieve normalized quotes, products, classifications, distributors, producers, and files. Requests are authenticated with an OAuth2 client-credentials bearer token; an API key may also be supplied directly as a bearer token. The API is resource-oriented with JSON request and response bodies and standard HTTP status codes.
  termsOfService: https://www.heraldapi.com
  contact:
    name: Herald Support
    url: https://docs.heraldapi.com
  version: '1.0'
servers:
- url: https://api.heraldapi.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Webhooks
paths:
  /webhooks:
    post:
      operationId: createWebhook
      tags:
      - Webhooks
      summary: Create a webhook subscription
      description: Register a URL to receive POST callbacks for the selected event types, such as quote_status_update, file_status_update, policy_status_update, and submission_creation. Deliveries are retried on non-200 responses.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreateRequest'
      responses:
        '201':
          description: The webhook subscription was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '401':
          $ref: '#/components/responses/Unauthorized'
    get:
      operationId: listWebhooks
      tags:
      - Webhooks
      summary: List webhook subscriptions
      responses:
        '200':
          description: A list of webhook subscriptions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhooks:
                    type: array
                    items:
                      $ref: '#/components/schemas/Webhook'
  /webhooks/{webhook_id}:
    parameters:
    - $ref: '#/components/parameters/WebhookId'
    delete:
      operationId: deleteWebhook
      tags:
      - Webhooks
      summary: Delete a webhook subscription
      responses:
        '204':
          description: The webhook subscription was deleted.
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Authentication credentials were missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    WebhookId:
      name: webhook_id
      in: path
      required: true
      description: The unique identifier of the webhook subscription.
      schema:
        type: string
  schemas:
    WebhookCreateRequest:
      type: object
      required:
      - url
      - event_types
      properties:
        url:
          type: string
          format: uri
          example: https://example.com/herald/webhook
        event_types:
          type: array
          items:
            type: string
          example:
          - quote_status_update
          - policy_status_update
    Webhook:
      type: object
      properties:
        id:
          type: string
          example: whk_2b3c
        url:
          type: string
          format: uri
          example: https://example.com/herald/webhook
        event_types:
          type: array
          items:
            type: string
          example:
          - quote_status_update
          - file_status_update
          - submission_creation
    Error:
      type: object
      properties:
        status:
          type: integer
          example: 422
        title:
          type: string
          example: Unprocessable Entity
        detail:
          type: string
          example: One or more parameter values are invalid.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Send an API key or an access token from /auth/token in the Authorization header as `Bearer <token>`. Access tokens are obtained via the OAuth2 client-credentials grant and expire after 24 hours.