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

# Add webhook

> Add webhook

<sup>Required permissions: `webhook:write`</sup>



## OpenAPI

````yaml post /webhooks
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /webhooks:
    parameters: []
    post:
      tags:
        - Webhook
      summary: Add webhook
      description: |-
        Add webhook

        <sup>Required permissions: `webhook:write`</sup>
      operationId: addWebhook
      parameters: []
      requestBody:
        description: The new Webhook resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhook'
          text/html:
            schema:
              $ref: '#/components/schemas/Webhook'
        required: true
      responses:
        '201':
          description: Webhook resource created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook-WebhookRead'
            text/html:
              schema:
                $ref: '#/components/schemas/Webhook-WebhookRead'
          links: {}
        '400':
          description: Invalid input
        '422':
          description: Unprocessable entity
      deprecated: false
      security:
        - JWT:
            - webhook:write
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST \
             /webhooks \
             --header "Content-Type: application/json" \
             --header "Authorization: Bearer <token>" \
             --data '{
                "id": "",
                "events": [
                    ""
                ],
                "version": "",
                "enabled": "",
                "url": "",
                "webhookResults": [
                    "https:\/\/example.com\/"
                ],
                "status": "",
                "lastSentAt": "",
                "activities": [
                    "https:\/\/example.com\/"
                ],
                "tenantId": ""
            }'
components:
  schemas:
    Webhook:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        events:
          type: array
          items:
            type: string
        version:
          type: string
        enabled:
          type: boolean
        url:
          type: string
        webhookResults:
          readOnly: true
          type: array
          items:
            type: string
            format: uuid
            example: https://example.com/
        status:
          readOnly: true
          type: string
          enum:
            - success
            - failed
            - pending
        lastSentAt:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        activities:
          type: array
          items:
            type: string
            format: uuid
            example: https://example.com/
        tenantId:
          readOnly: true
          type: string
    Webhook-WebhookRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        events:
          type: array
          items:
            type: string
        version:
          type: string
        enabled:
          type: boolean
        url:
          type: string
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````