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

# Clerk webhook handler

> Handle webhook events from Clerk (user.created, user.updated, user.deleted)



## OpenAPI

````yaml openapi.json post /webhooks/clerk
openapi: 3.0.0
info:
  description: Dualship backend API for workflow automation and API management.
  title: Dualship API
  termsOfService: https://dualship.run/terms
  contact:
    name: Dualship Support
    url: https://dualship.run/support
    email: support@dualship.run
  version: '1.0'
servers:
  - url: https://api.dualship.run
security: []
paths:
  /webhooks/clerk:
    post:
      tags:
        - webhooks
      summary: Clerk webhook handler
      description: >-
        Handle webhook events from Clerk (user.created, user.updated,
        user.deleted)
      parameters:
        - description: Svix webhook ID
          name: svix-id
          in: header
          required: true
          schema:
            type: string
        - description: Svix webhook timestamp
          name: svix-timestamp
          in: header
          required: true
          schema:
            type: string
        - description: Svix webhook signature
          name: svix-signature
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_api_handler.ClerkWebhookEvent'
        description: Webhook event payload
        required: true
      responses:
        '200':
          description: Webhook received
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_api_handler.WebhookResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_api_handler.BadRequestError'
        '401':
          description: Invalid signature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_api_handler.UnauthorizedError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_api_handler.InternalServerError'
components:
  schemas:
    internal_api_handler.ClerkWebhookEvent:
      type: object
      properties:
        data:
          type: array
          items:
            type: integer
        type:
          type: string
    internal_api_handler.WebhookResponse:
      description: Webhook processing response
      type: object
      properties:
        received:
          type: boolean
          example: true
    internal_api_handler.BadRequestError:
      description: Bad request error
      type: object
      properties:
        code:
          type: string
          example: BAD_REQUEST
        error:
          type: string
          example: invalid request parameters
    internal_api_handler.UnauthorizedError:
      description: Unauthorized error
      type: object
      properties:
        code:
          type: string
          example: UNAUTHORIZED
        error:
          type: string
          example: unauthorized
    internal_api_handler.InternalServerError:
      description: Internal server error
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_ERROR
        error:
          type: string
          example: internal server error

````