---
title: "Create a Webhook configuration"
url: "https://developers.bynder.com/apis/webhooks-api/versions/876c7972-129f-4814-b12a-964ddc49f2b6/operations/createWebhookConfiguration"
---

> Full API specification: https://developers.bynder.com/apis/webhooks-api/versions/876c7972-129f-4814-b12a-964ddc49f2b6.md

# Create a Webhook configuration

`POST` `/v7/webhooks/public/api/subscriptions`

Operation ID: `createWebhookConfiguration`

Please be aware that using this endpoint requires the `Manage Webhooks configurations` security role.

## Request body

Content types: `application/json`

## Responses

- `200` - OK
- `400` - Bad Request

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Webhooks
  version: 1.0.0
servers:
  - url: https://{your-bynder-domain}/
    variables:
      your-bynder-domain:
        default: your-bynder-domainDefaultValue
paths:
  /v7/webhooks/public/api/subscriptions:
    post:
      description: Please be aware that using this endpoint requires the `Manage
        Webhooks configurations` security role.
      operationId: createWebhookConfiguration
      requestBody:
        content:
          application/json:
            schema:
              properties:
                endpoint:
                  description: Endpoint for the Webhooks subscription.
                  type: string
                events:
                  description: List of events to subscribe to.
                  items: {}
                  type: array
                name:
                  description: Display name for the Webhooks configuration.
                  type: string
                preArchivedNotificationDays:
                  description: Required to have a value of 1 or greater if the
                    "asset_bank.media.pre_archived" event is subscribed to
                  type: number
                protocol:
                  description: 'Protocol for the Webhooks subscription. Possible values: "http",
                    "https", "email", "email-json", "sqs".'
                  type: string
              required:
                - name
                - endpoint
                - protocol
                - events
              type: object
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Subscription Config ID cf2493be-c808-41da-bcc2-cfb31f38b457 created
                    record:
                      configId: cf2493be-c808-41da-bcc2-cfb31f38b457
                      endpoint: example@example.com
                      events:
                        - asset_bank.media.archived
                        - asset_bank.media.pre_archived
                        - asset_bank.media.deleted
                        - asset_bank.media.updated
                        - asset_bank.media.meta_updated
                        - asset_bank.media.create
                        - workflow.job.create
                        - antivirus.scan.failed
                      is_legacy: false
                      migratedSubscriptions: "[]"
                      name: example-webhook-name
                      portalId: 62dddddd-eeee-ffff-aaaa-9f78fggggggg
                      preArchivedNotificationDays: 1
                      protocol: email
                      subscriptionArn: pendingconfirmation
                      topicArn: arn:aws:sns:us-east-1:003565342056:62dddddd-eeee-ffff-aaaa-9f78fggggggg-example-webhook-name-cf2493be-c808-41da-bcc2-cfb31f38b457
                      userId: DDDDDDE1-DDDD-DDDD-DDDDDD059F8AFFFF
                    success: true
              schema:
                example:
                  message: Subscription Config ID cf2493be-c808-41da-bcc2-cfb31f38b457 created
                  record:
                    configId: cf2493be-c808-41da-bcc2-cfb31f38b457
                    endpoint: example@example.com
                    events:
                      - asset_bank.media.archived
                      - asset_bank.media.pre_archived
                      - asset_bank.media.deleted
                      - asset_bank.media.updated
                      - asset_bank.media.meta_updated
                      - asset_bank.media.create
                      - workflow.job.create
                      - antivirus.scan.failed
                    is_legacy: false
                    migratedSubscriptions: "[]"
                    name: example-webhook-name
                    portalId: 62dddddd-eeee-ffff-aaaa-9f78fggggggg
                    preArchivedNotificationDays: 1
                    protocol: email
                    subscriptionArn: pendingconfirmation
                    topicArn: arn:aws:sns:us-east-1:003565342056:62dddddd-eeee-ffff-aaaa-9f78fggggggg-example-webhook-name-cf2493be-c808-41da-bcc2-cfb31f38b457
                    userId: DDDDDDE1-DDDD-DDDD-DDDDDD059F8AFFFF
                  success: true
                properties:
                  message:
                    type: string
                  record:
                    properties:
                      configId:
                        type: string
                      endpoint:
                        type: string
                      events:
                        items:
                          type: string
                        type: array
                      is_legacy:
                        type: boolean
                      migratedSubscriptions:
                        type: string
                      name:
                        type: string
                      portalId:
                        type: string
                      preArchivedNotificationDays:
                        type: number
                      protocol:
                        type: string
                      subscriptionArn:
                        type: string
                      topicArn:
                        type: string
                      userId:
                        type: string
                    type: object
                  success:
                    type: boolean
                type: object
          description: OK
          headers: {}
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: "Failed to create subscription test-public-api-docs: INVALID_ARGUMENT:
                      Combination of subscription name, protocol, and endpoint
                      already exists"
                    success: false
              schema:
                example:
                  message: "Failed to create subscription test-public-api-docs: INVALID_ARGUMENT:
                    Combination of subscription name, protocol, and endpoint
                    already exists"
                  success: false
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                type: object
          description: Bad Request
          headers: {}
      summary: Create a Webhook configuration
      tags:
        - Configurations
```
