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

# Create a project webhook

> Create a webhook; returns the signing secret once.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /projects/{project_id}/webhooks
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /projects/{project_id}/webhooks:
    post:
      tags:
        - project-webhooks
      summary: Create a project webhook
      description: Create a webhook; returns the signing secret once.
      operationId: create_project_webhook_projects__project_id__webhooks_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectWebhook'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectWebhookCreated'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateProjectWebhook:
      properties:
        url:
          type: string
          title: Url
          description: HTTPS destination URL.
        events:
          items:
            $ref: '#/components/schemas/WebhookEvent'
          type: array
          minItems: 1
          title: Events
          description: Events that should trigger delivery.
        enabled:
          type: boolean
          title: Enabled
          description: Whether the webhook is active.
          default: true
      type: object
      required:
        - url
        - events
      title: CreateProjectWebhook
      description: Request body for creating a project webhook.
    ProjectWebhookCreated:
      properties:
        id:
          type: string
          title: Id
        project_id:
          type: string
          title: Project Id
        organization_id:
          type: string
          title: Organization Id
        url:
          type: string
          title: Url
        events:
          items:
            type: string
          type: array
          title: Events
        enabled:
          type: boolean
          title: Enabled
        consecutive_failures:
          type: integer
          title: Consecutive Failures
          default: 0
        disabled_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Disabled Reason
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        secret:
          type: string
          title: Secret
          description: HMAC signing secret; shown only in the create response.
      type: object
      required:
        - id
        - project_id
        - organization_id
        - url
        - events
        - enabled
        - created_at
        - updated_at
        - secret
      title: ProjectWebhookCreated
      description: Create response that includes the signing secret once.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WebhookEvent:
      type: string
      enum:
        - pipeline.completed
        - pipeline.failed
        - pipeline.canceled
        - simple_pipeline.completed
        - simple_pipeline.failed
        - simple_pipeline.canceled
      title: WebhookEvent
      description: |-
        Supported webhook events (namespaced by resource family).

        Add new members as more resources gain webhook fire points. Validation
        lives in the API layer; the DB does not hard-code the allowed set.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````