> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truv.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a webhook endpoint

> The endpoint creates a webhook.



## OpenAPI

````yaml POST /v1/webhooks/
openapi: 3.0.1
info:
  title: Truv API
  description: Truv API Documentation
  termsOfService: https://www.truv.com/legal/terms-of-use
  contact:
    email: support@truv.com
  version: v1
servers:
  - url: https://prod.truv.com
security:
  - ClientID: []
    AccessKey: []
tags:
  - name: Users
  - name: Bridge Token
  - name: Companies and Data Providers
  - name: Key Management
  - name: Account Links
  - name: Data Refresh
  - name: Customization Templates
  - name: Webhooks
  - name: Orders
  - name: Tasks
  - name: VOIE Reports
  - name: VOA Reports
  - name: Income Insights Reports
  - name: DDS Reports
  - name: Employment
  - name: Identity
  - name: Shifts
  - name: Pay Statements
  - name: Tax Documents
  - name: Parsed Documents
  - name: Reports
  - name: Uploaded Documents
  - name: Bank Accounts
  - name: Bank Statements
  - name: Deposit Switch Reports
  - name: Insurance Reports
  - name: Income Report
  - name: Scoring Attributes
  - name: Accounts
  - name: Transactions
  - name: Recurring Transactions
  - name: Document Collections
paths:
  /v1/webhooks/:
    parameters: []
    post:
      tags:
        - Webhooks
      summary: Create a webhook endpoint
      description: The endpoint creates a webhook.
      operationId: v1_webhooks_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequestCreate'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          description: HTTP 400 Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: HTTP 401 Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '403':
          description: HTTP 403 Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
components:
  schemas:
    WebhookRequestCreate:
      required:
        - name
        - webhook_url
        - env_type
      type: object
      properties:
        name:
          description: Public name for this webhook config.
          type: string
          maxLength: 128
        webhook_url:
          description: Webhook URL where event data will be sent.
          type: string
          format: uri
          example: http://example.com/
          maxLength: 2048
        events:
          description: List of events sent to this webhook URL.
          type: array
          items:
            type: string
            enum:
              - task-status-updated
              - order-status-updated
              - order-created
              - link-connected
              - link-disconnected
              - order-refresh-failed
              - link-deleted
              - employment-created
              - employment-updated
              - profile-created
              - profile-updated
              - statements-created
              - statements-updated
              - shifts-created
              - shifts-updated
              - bank-accounts-created
              - bank-accounts-updated
          example:
            - task-status-updated
            - order-status-updated
        env_type:
          description: Type of environment.
          type: string
          enum:
            - sandbox
            - dev
            - prod
          example: dev
        enabled:
          description: Whether the webhook is active.
          type: boolean
    Webhook:
      required:
        - id
        - name
        - webhook_url
        - events
        - env_type
        - enabled
        - created_at
        - updated_at
      type: object
      properties:
        id:
          description: Unique identifier of the webhook.
          type: string
          readOnly: true
          maxLength: 32
          example: 48427a36d43c4d5aa6324bc06c692456
        name:
          description: Public name for this webhook config.
          type: string
          maxLength: 128
        webhook_url:
          description: Webhook URL where event data will be sent.
          type: string
          format: uri
          example: http://example.com/
          maxLength: 2048
        events:
          description: List of events sent to this webhook URL.
          type: array
          items:
            type: string
            enum:
              - task-status-updated
              - order-status-updated
              - order-created
              - link-connected
              - link-disconnected
              - order-refresh-failed
              - link-deleted
              - employment-created
              - employment-updated
              - profile-created
              - profile-updated
              - statements-created
              - statements-updated
              - shifts-created
              - shifts-updated
              - bank-accounts-created
              - bank-accounts-updated
          example:
            - task-status-updated
            - order-status-updated
        env_type:
          description: Type of environment.
          type: string
          enum:
            - sandbox
            - dev
            - prod
          example: dev
        enabled:
          description: Whether the webhook is active.
          type: boolean
        created_at:
          description: Timestamp when the webhook was created.
          type: string
          format: date-time
          readOnly: true
          example: '2022-05-04T11:30:00Z'
        updated_at:
          description: Timestamp when the webhook was updated last time.
          type: string
          format: date-time
          readOnly: true
          example: '2022-05-04T12:00:00Z'
    Error400:
      description: ''
      type: object
      properties:
        error:
          description: ''
          type: object
          properties:
            code:
              description: ''
              type: string
              example: incorrect_parameters
            message:
              description: ''
              type: string
              example: Incorrect request parameters
            extra:
              description: ''
              type: object
              properties:
                invalid-params:
                  description: ''
                  type: array
                  items:
                    description: ''
                    type: object
                    properties:
                      field:
                        description: ''
                        type: string
                        example: access_token
                      message:
                        description: ''
                        type: string
                        example: This field is required.
                  example:
                    - field: access_token
                      message: This field is required.
    Error401:
      description: ''
      type: object
      properties:
        error:
          description: ''
          type: object
          properties:
            code:
              description: ''
              type: string
              example: authentication_failed
            message:
              description: ''
              type: string
              example: No such token
    Error403:
      description: ''
      type: object
      properties:
        error:
          description: ''
          type: object
          properties:
            code:
              description: ''
              type: string
              example: not_authenticated
            message:
              description: ''
              type: string
              example: Authentication credentials were not provided.
  securitySchemes:
    ClientID:
      type: apiKey
      description: Client ID
      name: X-Access-Client-Id
      in: header
    AccessKey:
      type: apiKey
      description: Client Access Key
      name: X-Access-Secret
      in: header

````