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

# Create Workspace Webhook

> Create a new webhook for the workspace with the specified authentication type.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/workspace/webhooks
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/workspace/webhooks:
    post:
      tags:
        - workspace
      summary: Create Workspace Webhook
      description: >-
        Create a new webhook for the workspace with the specified authentication
        type.
      operationId: create_workspace_webhook_route
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_Create_workspace_webhook_v1_workspace_webhooks_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceCreateWebhookResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_Create_workspace_webhook_v1_workspace_webhooks_post:
      properties:
        settings:
          $ref: '#/components/schemas/WebhookHMACSettings'
          description: >-
            Webhook settings object containing auth_type and corresponding
            configuration
      type: object
      required:
        - settings
      title: Body_Create_workspace_webhook_v1_workspace_webhooks_post
    WorkspaceCreateWebhookResponseModel:
      properties:
        webhook_id:
          type: string
          title: Webhook Id
        webhook_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Secret
      type: object
      required:
        - webhook_id
      title: WorkspaceCreateWebhookResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WebhookHMACSettings:
      properties:
        auth_type:
          type: string
          const: hmac
          title: Auth Type
          description: The authentication type for this webhook
        name:
          type: string
          title: Name
          description: The display name for this webhook
        webhook_url:
          type: string
          title: Webhook Url
          description: >-
            The HTTPS callback URL that will be called when this webhook is
            triggered
        request_headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Request Headers
          description: >-
            Optional custom request headers to include with each webhook
            delivery
      type: object
      required:
        - auth_type
        - name
        - webhook_url
      title: WebhookHMACSettings
      description: Settings for creating an HMAC-authenticated webhook
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````