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

# Create webhook



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/webhooks
openapi: 3.1.1
info:
  title: ContraForce API
  description: ContraForce platform API for security operations management.
  version: '2.0'
servers: []
security: []
tags:
  - name: Incidents
  - name: Gamebooks
  - name: Data sources
  - name: Service tickets
  - name: Investigation
  - name: Cross-workspace incidents
  - name: Cross-workspace gamebooks
  - name: Cross-workspace data sources
  - name: Webhooks
  - name: Service accounts
  - name: Users
  - name: Azure resources
paths:
  /api/v2/webhooks:
    post:
      tags:
        - Webhooks
      summary: Create webhook
      operationId: v2-create-webhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookConfigurationRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponseOfWebhookConfigurationCreatedDto
        '400':
          description: Bad request — validation or parameter binding failed.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '401':
          description: Unauthorized — missing or invalid Bearer token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '403':
          description: Forbidden — insufficient scope or workspace access.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '404':
          description: Not found — workspace or resource is missing.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '500':
          description: Internal server error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
components:
  schemas:
    CreateWebhookConfigurationRequest:
      type: object
      properties:
        workspaceId:
          type:
            - 'null'
            - string
          format: uuid
        name:
          type:
            - 'null'
            - string
        url:
          type:
            - 'null'
            - string
        eventTypes:
          type:
            - 'null'
            - array
          items:
            type: string
        monitoredAccountIds:
          type:
            - 'null'
            - array
          items:
            type: string
            format: uuid
        authenticationType:
          $ref: '#/components/schemas/WebhookAuthenticationType'
        token:
          type:
            - 'null'
            - string
        signingToken:
          type:
            - 'null'
            - string
        username:
          type:
            - 'null'
            - string
        password:
          type:
            - 'null'
            - string
    ApiResponseOfWebhookConfigurationCreatedDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/WebhookConfigurationCreatedDto'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      description: Standard v2 API response envelope for single-item responses.
    ApiProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
        code:
          type:
            - 'null'
            - string
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
        target:
          type:
            - 'null'
            - string
        errors:
          type:
            - 'null'
            - object
          additionalProperties:
            type: array
            items:
              type: string
      description: "API extension of ProblemDetails that surfaces the stable error code,\r\ntrace identifier, timestamp, optional target, and optional field-keyed validation\r\nerror map alongside the RFC 7807 members."
    WebhookAuthenticationType:
      enum:
        - None
        - BasicAuth
        - BearerToken
    WebhookConfigurationCreatedDto:
      type: object
      properties:
        secret:
          type:
            - 'null'
            - string
        id:
          type: string
          format: uuid
        serviceProviderId:
          type: string
          format: uuid
        targetAccountId:
          type: string
          format: uuid
        targetAccountName:
          type:
            - 'null'
            - string
        workspaceId:
          type:
            - 'null'
            - string
          format: uuid
        name:
          type:
            - 'null'
            - string
        url:
          type:
            - 'null'
            - string
        status:
          $ref: '#/components/schemas/WebhookConfigurationStatus'
        eventTypes:
          type:
            - 'null'
            - array
          items:
            type: string
        monitoredAccountIds:
          type:
            - 'null'
            - array
          items:
            type: string
            format: uuid
        authenticationType:
          $ref: '#/components/schemas/WebhookAuthenticationType'
        hasSigningToken:
          type: boolean
        disableReason:
          type:
            - 'null'
            - string
        disabledAt:
          type:
            - 'null'
            - string
          format: date-time
        createdAt:
          type: string
          format: date-time
        lastModifiedAt:
          type: string
          format: date-time
    ResponseMeta:
      type: object
      properties:
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
    WebhookConfigurationStatus:
      enum:
        - Active
        - Paused
        - Disabled

````