Truv Webhooks API

Webhook endpoint registration and delivery history.

OpenAPI Specification

truv-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Truv Admin Webhooks API
  description: Truv provides consumer-permissioned access to payroll, income, and employment data. This specification covers the Truv REST API for managing users, minting bridge tokens, working with links, and retrieving employment, income, pay statement, direct deposit, insurance, identity, and banking data, plus orders, tasks, and webhooks.
  termsOfService: https://truv.com/terms-of-service/
  contact:
    name: Truv Support
    email: support@truv.com
    url: https://docs.truv.com
  version: '1.0'
servers:
- url: https://prod.truv.com
  description: Truv production API
security:
- accessClientId: []
  accessSecret: []
tags:
- name: Webhooks
  description: Webhook endpoint registration and delivery history.
paths:
  /v1/webhooks/:
    get:
      operationId: listWebhooks
      tags:
      - Webhooks
      summary: List webhooks.
      responses:
        '200':
          description: A list of webhooks.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
    post:
      operationId: createWebhook
      tags:
      - Webhooks
      summary: Create a webhook.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequest'
      responses:
        '201':
          description: A webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
  /v1/webhooks/{webhook_id}/:
    parameters:
    - name: webhook_id
      in: path
      required: true
      schema:
        type: string
      description: The ID of the webhook.
    get:
      operationId: getWebhook
      tags:
      - Webhooks
      summary: Retrieve a webhook.
      responses:
        '200':
          description: A webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
    patch:
      operationId: updateWebhook
      tags:
      - Webhooks
      summary: Update a webhook.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequest'
      responses:
        '200':
          description: A webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
    delete:
      operationId: deleteWebhook
      tags:
      - Webhooks
      summary: Delete a webhook.
      responses:
        '204':
          description: Webhook deleted.
  /v1/webhook-requests/:
    get:
      operationId: listWebhookRequests
      tags:
      - Webhooks
      summary: List webhook delivery requests.
      responses:
        '200':
          description: A list of webhook requests.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
components:
  schemas:
    Webhook:
      type: object
      properties:
        webhook_id:
          type: string
        url:
          type: string
        status:
          type: string
        created_at:
          type: string
          format: date-time
    WebhookRequest:
      type: object
      properties:
        url:
          type: string
          description: The endpoint that will receive event notifications.
        auth_token:
          type: string
        status:
          type: string
  securitySchemes:
    accessClientId:
      type: apiKey
      in: header
      name: X-Access-Client-Id
      description: Your Truv access client ID.
    accessSecret:
      type: apiKey
      in: header
      name: X-Access-Secret
      description: Your Truv access secret.