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

# Create Webhook

> Create a webhook

<Note>
  **OAuth scope:** `webhook_write`

  API keys have full access to this endpoint.
</Note>


## OpenAPI

````yaml POST /open-api/v1.0/webhooks
openapi: 3.1.0
info:
  title: Fourthwall APIs
  description: Service used for management of orders, carts, and payments.
  termsOfService: https://fourthwall.com/terms-of-service
  contact:
    name: Backend team
    url: https://fourthwall.com
    email: backend@fourthwall.com
  version: unspecified
servers:
  - url: https://api.fourthwall.com
    description: Production server
security: []
externalDocs:
  description: OpenAPI documentation
  url: https://docs.fourthwall.com
paths:
  /open-api/v1.0/webhooks:
    post:
      tags:
        - Webhooks
      summary: Create a webhook
      description: Create a webhook
      operationId: create-webhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.fourthwall.app.openapi.endpoint.OpenApiWebhookConfigurationEndpoint.WebhookConfigurationCreateRequest
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/com.fourthwall.openapi.model.WebhookConfigurationV1
        '400':
          description: >-
            Possible errors: `WEBHOOK_URI_IP_NOT_ALLOWED`,
            `WEBHOOK_URI_PORT_NOT_ALLOWED`, `WEBHOOK_URI_UNALLOWED_DOMAIN`
          content:
            application/json:
              examples:
                webhook-uri-ip-not-allowed:
                  value:
                    code: WEBHOOK_URI_IP_NOT_ALLOWED
                webhook-uri-port-not-allowed:
                  value:
                    code: WEBHOOK_URI_PORT_NOT_ALLOWED
                webhook-uri-unallowed-domain:
                  value:
                    code: WEBHOOK_URI_UNALLOWED_DOMAIN
      security:
        - oauth:
            - webhook_write
        - basicAuth: []
      externalDocs:
        url: >-
          https://docs.fourthwall.com/api-reference/platform/webhooks/create-webhook
components:
  schemas:
    com.fourthwall.app.openapi.endpoint.OpenApiWebhookConfigurationEndpoint.WebhookConfigurationCreateRequest:
      type: object
      properties:
        url:
          type: string
        allowedTypes:
          type: array
          items:
            type: string
            enum:
              - ORDER_PLACED
              - ORDER_UPDATED
              - GIFT_PURCHASE
              - PRODUCT_CREATED
              - PRODUCT_UPDATED
              - DONATION
              - SUBSCRIPTION_PURCHASED
              - SUBSCRIPTION_EXPIRED
              - SUBSCRIPTION_CHANGED
              - NEWSLETTER_SUBSCRIBED
              - THANK_YOU_SENT
              - GIFT_DRAW_STARTED
              - GIFT_DRAW_ENDED
              - PROMOTION_CREATED
              - PROMOTION_UPDATED
              - PROMOTION_STATUS_CHANGED
              - PLATFORM_APP_DISCONNECTED
              - MEMBERSHIP_POST_UPSERTED
              - MEMBERSHIP_SERIES_UPSERTED
              - MEMBERSHIP_SERIES_DELETED
              - MEMBERSHIP_TAG_CREATED
              - MEMBERSHIP_TAG_UPDATED
              - MEMBERSHIP_TAG_DELETED
              - MEMBERSHIP_TIER_UPSERTED
              - MEMBERSHIP_TIER_DELETED
              - COLLECTION_UPDATED
              - CART_ABANDONED_1H
              - CART_ABANDONED_24H
              - CART_ABANDONED_72H
      required:
        - allowedTypes
        - url
      title: Webhook Configuration Create Request
    com.fourthwall.openapi.model.WebhookConfigurationV1:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
        allowedTypes:
          type: array
          items:
            type: string
            enum:
              - ORDER_PLACED
              - ORDER_UPDATED
              - GIFT_PURCHASE
              - PRODUCT_CREATED
              - PRODUCT_UPDATED
              - DONATION
              - SUBSCRIPTION_PURCHASED
              - SUBSCRIPTION_EXPIRED
              - SUBSCRIPTION_CHANGED
              - NEWSLETTER_SUBSCRIBED
              - THANK_YOU_SENT
              - GIFT_DRAW_STARTED
              - GIFT_DRAW_ENDED
              - PROMOTION_CREATED
              - PROMOTION_UPDATED
              - PROMOTION_STATUS_CHANGED
              - PLATFORM_APP_DISCONNECTED
              - MEMBERSHIP_POST_UPSERTED
              - MEMBERSHIP_SERIES_UPSERTED
              - MEMBERSHIP_SERIES_DELETED
              - MEMBERSHIP_TAG_CREATED
              - MEMBERSHIP_TAG_UPDATED
              - MEMBERSHIP_TAG_DELETED
              - MEMBERSHIP_TIER_UPSERTED
              - MEMBERSHIP_TIER_DELETED
              - COLLECTION_UPDATED
              - CART_ABANDONED_1H
              - CART_ABANDONED_24H
              - CART_ABANDONED_72H
        apiVersion:
          type: string
          enum:
            - V1
      required:
        - allowedTypes
        - apiVersion
        - id
        - url
      title: Webhook Configuration
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://auth.staging.fourthwall.com/auth/realms/Fourthwall/protocol/openid-connect/auth
          scopes:
            donation_read: donation_read
            order_read: order_read
            order_write: order_write
            fulfillment_write: fulfillment_write
            giveaway_read: giveaway_read
            giveaway_write: giveaway_write
            memberships_read: memberships_read
            memberships_write: memberships_write
            promotions_write: promotions_write
            promotions_read: promotions_read
            offer_read: offer_read
            offer_write: offer_write
            shop_read: shop_read
            thankyou_read: thankyou_read
            thankyou_write: thankyou_write
            webhook_read: webhook_read
            webhook_write: webhook_write
            media_read: media_read
            media_write: media_write
            analytics_read: analytics_read
            samples_read: samples_read
            samples_write: samples_write
            dns_read: dns_read
            dns_write: dns_write
            settings_read: settings_read
            payout_read: payout_read
            integrations_read: integrations_read
    basicAuth:
      type: http
      scheme: basic

````