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

# Create Subscription

> Creates and returns a new webhook subscription.



## OpenAPI

````yaml api-reference/openapi-notifications.json POST /notifications/v1/subscriptions
openapi: 3.0.0
info:
  title: Forte Notifications API
  version: v1.0.0
servers:
  - url: https://sandbox-api.sandbox.lemmax.com
security:
  - authorization: []
tags:
  - name: Subscriptions
    description: Manage webhook subscriptions
  - name: Webhooks
    description: Replay webhook deliveries
paths:
  /notifications/v1/subscriptions:
    post:
      tags:
        - Subscriptions
      summary: Create a new webhook subscription.
      description: Creates and returns a new webhook subscription.
      operationId: createSubscription
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_subscription_request'
        description: Subscription attributes.
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create_subscription_response'
          description: Subscription created.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorized'
          description: Unauthorized
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too_many_requests'
          description: Too Many Requests
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Bad Request
      callbacks: {}
components:
  schemas:
    create_subscription_request:
      description: Create a webhook subscription.
      example:
        description: My webhooks
        endpoint: https://example.org/webhooks
      properties:
        description:
          description: The description for the webhook subscription.
          example: My webhooks
          maxLength: 200
          type: string
          x-struct: null
          x-validate: null
        endpoint:
          description: The endpoint of the webhook subscription.
          example: https://example.org/webhooks
          maxLength: 2500
          type: string
          x-struct: null
          x-validate: null
      required:
        - endpoint
        - description
      title: create_subscription_request
      type: object
      x-struct: >-
        Elixir.ForteNotificationsSvcWeb.OpenApi.Schemas.Subscriptions.CreateSubscriptionRequest
      x-validate: null
    create_subscription_response:
      description: Create a webhook subscription response.
      example:
        data:
          description: My webhooks
          endpoint: https://example.org/webhooks
          id: f89eccda-f284-4e30-984f-2f6620238cd1
          signing_key: f89eccda-f284-4e30-984f-2f662023abc2
          status: enabled
          version: '1'
      properties:
        data:
          properties:
            description:
              description: The description for the webhook subscription.
              example: My webhooks
              maxLength: 200
              type: string
              x-struct: null
              x-validate: null
            endpoint:
              description: The endpoint for the webhook subscription.
              example: https://example.org/webhooks
              maxLength: 2500
              type: string
              x-struct: null
              x-validate: null
            id:
              description: ID of the webhook subscription.
              example: f66c8b15-a98c-4fd5-8bab-b14eeb7b47ed
              format: uuid
              maxLength: 36
              minLength: 36
              pattern: >-
                ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
              type: string
              x-struct: null
              x-validate: null
            signing_key:
              description: The signing_key of the webhook subscription.
              example: f89eccda-f284-4e30-984f-2f662023abc2
              format: uuid
              type: string
              x-struct: null
              x-validate: null
            status:
              description: >-
                Value to determine if subscription is enabled, defaults to
                enabled on creation.
              enum:
                - enabled
                - disabled
                - deleted
              example: enabled
              type: string
              x-struct: null
              x-validate: null
            version:
              description: The version of the webhook subscription.
              example: '1'
              maxLength: 10
              type: string
              x-struct: null
              x-validate: null
          required:
            - id
            - endpoint
            - description
            - version
            - status
            - signing_key
          type: object
          x-struct: null
          x-validate: null
      title: create_subscription_response
      type: object
      x-struct: >-
        Elixir.ForteNotificationsSvcWeb.OpenApi.Schemas.Subscriptions.CreateSubscriptionResponse
      x-validate: null
    unauthorized:
      properties:
        error:
          properties:
            message:
              description: Extra information about the error
              example: invalid params
              maxLength: 500
              type: string
              x-struct: null
              x-validate: null
            reason:
              description: Status description
              example: Unauthorized
              maxLength: 100
              type: string
              x-struct: null
              x-validate: null
            status:
              description: HTTP status code
              example: 401
              format: int32
              type: integer
              x-struct: null
              x-validate: null
          required:
            - status
            - reason
          type: object
          x-struct: null
          x-validate: null
      required:
        - error
      title: unauthorized
      type: object
      x-struct: >-
        Elixir.ForteNotificationsSvcWeb.OpenApi.Schemas.JsonErrorResponse.unauthorized
      x-validate: null
    unprocessable_entity:
      properties:
        error:
          properties:
            message:
              description: Extra information about the error
              example: invalid params
              maxLength: 500
              type: string
              x-struct: null
              x-validate: null
            reason:
              description: Status description
              example: Unprocessable Entity
              maxLength: 100
              type: string
              x-struct: null
              x-validate: null
            status:
              description: HTTP status code
              example: 422
              format: int32
              type: integer
              x-struct: null
              x-validate: null
          required:
            - status
            - reason
          type: object
          x-struct: null
          x-validate: null
      required:
        - error
      title: unprocessable_entity
      type: object
      x-struct: >-
        Elixir.ForteNotificationsSvcWeb.OpenApi.Schemas.JsonErrorResponse.unprocessable_entity
      x-validate: null
    too_many_requests:
      properties:
        error:
          properties:
            message:
              description: Extra information about the error
              example: invalid params
              maxLength: 500
              type: string
              x-struct: null
              x-validate: null
            reason:
              description: Status description
              example: Too Many Requests
              maxLength: 100
              type: string
              x-struct: null
              x-validate: null
            status:
              description: HTTP status code
              example: 429
              format: int32
              type: integer
              x-struct: null
              x-validate: null
          required:
            - status
            - reason
          type: object
          x-struct: null
          x-validate: null
      required:
        - error
      title: too_many_requests
      type: object
      x-struct: >-
        Elixir.ForteNotificationsSvcWeb.OpenApi.Schemas.JsonErrorResponse.too_many_requests
      x-validate: null
    bad_request:
      properties:
        error:
          properties:
            message:
              description: Extra information about the error
              example: invalid params
              maxLength: 500
              type: string
              x-struct: null
              x-validate: null
            reason:
              description: Status description
              example: Bad Request
              maxLength: 100
              type: string
              x-struct: null
              x-validate: null
            status:
              description: HTTP status code
              example: 400
              format: int32
              type: integer
              x-struct: null
              x-validate: null
          required:
            - status
            - reason
          type: object
          x-struct: null
          x-validate: null
      required:
        - error
      title: bad_request
      type: object
      x-struct: >-
        Elixir.ForteNotificationsSvcWeb.OpenApi.Schemas.JsonErrorResponse.bad_request
      x-validate: null
  securitySchemes:
    authorization:
      description: '`access_token` returned by the `/auth/v1/oauth2/tokens` API call.'
      scheme: bearer
      type: http

````