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

# Send webhook events

> Sends record events for an account to the project webhooks subscribed to them, for testing a webhook receiver. Delivery is asynchronous: the response lists the deliveries started, and each is retried until the endpoint accepts it or retries run out.



## OpenAPI

````yaml post /v2/webhooks/events
openapi: 3.1.0
info:
  title: StackOne
  description: The documentation for the StackOne API
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.stackone.com
security: []
tags:
  - name: Accounts
    description: View and manage linked accounts.
  - name: Connector Profiles
    description: >-
      View and manage connector profiles for the project: the authentication,
      enabled actions, data sync and events of each configured connector.
  - name: Connectors
    description: Retrieve metadata for connectors.
  - name: Webhooks
    description: Configure and manage webhooks.
  - name: Data Sync
    description: View data-sync configs, schedules, runs, and event subscriptions.
paths:
  /v2/webhooks/events:
    post:
      tags:
        - Webhooks
      summary: Send webhook events
      description: >-
        Sends record events for an account to the project webhooks subscribed to
        them, for testing a webhook receiver. Delivery is asynchronous: the
        response lists the deliveries started, and each is retried until the
        endpoint accepts it or retries run out.
      operationId: send_webhook_events
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendWebhookEventsDto'
      responses:
        '202':
          description: The deliveries were started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEventDeliveriesResource'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '408':
          description: The request has timed out.
          headers:
            Retry-After:
              description: A time in seconds after which the request can be retried.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestTimedOutResponse'
        '409':
          description: Conflict with current state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
        '412':
          description: The account is not active, so no events can be sent for it.
        '422':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Server error while executing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
        '501':
          description: This functionality is not implemented.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotImplementedResponse'
        '502':
          description: Bad gateway error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGatewayResponse'
        '503':
          description: Event delivery is temporarily unavailable. Retry the request later.
      security:
        - basic: []
components:
  schemas:
    SendWebhookEventsDto:
      type: object
      properties:
        account_id:
          type: string
          description: The id of the account the events are for.
        events:
          description: >-
            The events to send, at most 20, with at most 524288 bytes of data as
            JSON across all of them.
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventInputDto'
        webhook_ids:
          description: >-
            Limits delivery to these webhooks. Each must be an active webhook in
            the project. When omitted, every active webhook subscribed to an
            event receives it.
          nullable: true
          type: array
          items:
            type: string
      required:
        - account_id
        - events
    WebhookEventDeliveriesResource:
      type: object
      properties:
        deliveries:
          description: >-
            One entry per webhook that subscribes to at least one of the events.
            Empty when no webhook subscribes to any of them.
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventDeliveryResource'
      required:
        - deliveries
    BadRequestResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Error message
          example: Bad Request
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
        data:
          description: Error details
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/UnifiedError'
        provider_errors:
          description: List of provider-specific errors
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/ProviderError'
      required:
        - statusCode
        - message
        - timestamp
    UnauthorizedResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 401
        message:
          type: string
          description: Error message
          example: Unauthorized
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    ForbiddenResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 403
        message:
          type: string
          description: Error message
          example: Forbidden resource
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    NotFoundResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 404
        message:
          type: string
          description: Error message
          example: Not Found
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    RequestTimedOutResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 408
        message:
          type: string
          description: Error message
          example: Request timed out
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    ConflictResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 409
        message:
          type: string
          description: Error message
          example: Conflict
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    UnprocessableEntityResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 422
        message:
          type: string
          description: Error message
          example: Unprocessable Entity
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    TooManyRequestsResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 429
        message:
          type: string
          description: Error message
          example: Too many requests
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    InternalServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 500
        message:
          type: string
          description: Error message
          example: Internal server error
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    NotImplementedResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 501
        message:
          type: string
          description: Error message
          example: Not Implemented
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    BadGatewayResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 502
        message:
          type: string
          description: Error message
          example: Bad Gateway
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    WebhookEventInputDto:
      type: object
      properties:
        event:
          type: string
          description: The record event to send.
          enum:
            - hris_employees.created
            - hris_employees.updated
            - hris_employees.deleted
            - hris_employments.created
            - hris_employments.updated
            - hris_employments.deleted
            - hris_time_off.created
            - hris_time_off.updated
            - hris_time_off.deleted
            - hris_tasks.created
            - hris_tasks.updated
            - hris_tasks.deleted
            - hris_shifts.created
            - hris_shifts.updated
            - hris_shifts.deleted
            - ats_assessments.created
            - ats_background_checks.created
            - ats_candidates.created
            - ats_candidates.updated
            - ats_candidates.deleted
            - ats_applications.created
            - ats_applications.updated
            - ats_applications.deleted
            - ats_interviews.created
            - ats_interviews.updated
            - ats_interviews.deleted
            - ats_jobs.created
            - ats_jobs.updated
            - ats_jobs.deleted
            - ats_job_postings.created
            - ats_job_postings.updated
            - ats_job_postings.deleted
            - ats_users.created
            - ats_users.updated
            - ats_users.deleted
            - ats_lists.created
            - ats_lists.updated
            - ats_lists.deleted
            - crm_contacts.created
            - crm_contacts.updated
            - crm_contacts.deleted
            - crm_accounts.created
            - crm_accounts.updated
            - crm_accounts.deleted
            - lms_completions.created
            - lms_completions.updated
            - lms_completions.deleted
            - lms_content.created
            - lms_content.updated
            - lms_content.deleted
            - lms_assignments.created
            - lms_assignments.updated
            - lms_assignments.deleted
            - lms_courses.created
            - lms_courses.updated
            - lms_courses.deleted
            - lms_users.created
            - lms_users.updated
            - lms_users.deleted
            - documents_files.created
            - documents_files.updated
            - documents_files.deleted
            - documents_folders.created
            - documents_folders.updated
            - documents_folders.deleted
            - documents_drives.created
            - documents_drives.updated
            - documents_drives.deleted
            - screening_results.created
            - screening_results.updated
            - screening_results.deleted
          example: hris_employees.created
          x-speakeasy-unknown-values: allow
        record_id:
          type: string
          description: The id of the record the event is about.
          example: '123'
        data:
          type: object
          description: >-
            The record data, delivered as `event_data` in the webhook payload
            exactly as given. At most 65536 bytes as JSON.
          additionalProperties: true
          example:
            first_name: Jane
          nullable: true
      required:
        - event
        - record_id
    WebhookEventDeliveryResource:
      type: object
      properties:
        webhook_id:
          type: string
          description: The webhook the events are being delivered to.
        events:
          type: number
          description: How many of the events this webhook subscribes to.
      required:
        - webhook_id
        - events
    UnifiedError:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
          nullable: true
        message:
          type: string
          description: Error message
          example: Bad Request
          nullable: true
        headers:
          type: object
          description: Response headers
          example:
            content-type: application/json
            x-request-id: 5678c28b211dace4e0a0f9171e6b88c5
          nullable: true
    ProviderError:
      type: object
      properties:
        status:
          type: number
          description: HTTP status code of the provider error
          example: 400
          nullable: true
        url:
          type: string
          description: URL that caused the error
          example: https://api.provider.com/v1/resource
          nullable: true
        raw:
          type: object
          description: Raw error response from the provider
          example:
            message: Invalid input parameters
          nullable: true
        headers:
          type: object
          description: Response headers
          example:
            content-type: application/json
            x-request-id: 5678c28b211dace4e0a0f9171e6b88c5
          nullable: true
  securitySchemes:
    basic:
      type: http
      scheme: basic

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.