---
title: "Creates user subscription based on chosen settings"
url: "https://earlyaccess.developers.bynder.com/apis/webhooks-api/versions/876c7972-129f-4814-b12a-964ddc49f2b6/operations/createSubscriptionRoute"
---

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

# Creates user subscription based on chosen settings

`POST` `/webhooks/api/subscriptions`

Operation ID: `createSubscriptionRoute`

Creates subscription

## Request body

Content types: `application/json`

## Responses

- `200` - Successfully created subscription
- `400` - Failed to create subscription

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: webhooks-api
  version: 1.0.0
servers:
  - description: Local Development
    url: http://0.0.0.0:8081
paths:
  /webhooks/api/subscriptions:
    post:
      description: Creates subscription
      operationId: createSubscriptionRoute
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSubscriptionRequest"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSubscriptionResponse"
          description: Successfully created subscription
        "400":
          description: Failed to create subscription
      summary: Creates user subscription based on chosen settings
security: []
components:
  schemas:
    CreateSubscriptionRequest:
      properties:
        endpoint:
          type: string
        events:
          items:
            type: string
          type: array
        name:
          type: string
        protocol:
          type: string
      required:
        - endpoint
        - events
        - name
        - protocol
      type: object
    CreateSubscriptionResponse:
      properties:
        message:
          type: string
        record:
          $ref: "#/components/schemas/CreateSubscriptionRecord"
        success:
          type: boolean
      required:
        - message
        - success
      type: object
    CreateSubscriptionRecord:
      properties:
        configId:
          type: string
        endpoint:
          type: string
        events:
          items:
            type: string
          type: array
        name:
          type: string
        portalId:
          type: string
        protocol:
          type: string
        subscriptionArn:
          type: string
        topicArn:
          type: string
      required:
        - configId
        - endpoint
        - events
        - name
        - portalId
        - protocol
        - subscriptionArn
        - topicArn
      type: object
```
