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

# Create a new webhook

> Creates a new webhook, based on a given ```webhookEventTypeName``` or ```webhookEventTypeId```.



## OpenAPI

````yaml /autogenerated/openapi/cis-webhooks.openapi.json post /webhooks
openapi: 3.1.0
info:
  title: CIS Webhooks API
  version: 2.0.0
  description: Version 2
  license:
    name: UNLICENSED
    url: https://docs.equalsmoney.com
servers:
  - url: https://api.equalsmoney.com/v2
    description: Production
  - url: https://api-sandbox.equalsmoney.com/v2
    description: Sandbox
security: []
paths:
  /webhooks:
    post:
      tags:
        - Webhooks
      summary: Create a new webhook
      description: >-
        Creates a new webhook, based on a given ```webhookEventTypeName``` or
        ```webhookEventTypeId```.
      operationId: createWebhook
      parameters: []
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              oneOf:
                - type:
                    - object
                  properties:
                    accountId:
                      type:
                        - string
                        - 'null'
                      description: The ID of the account to work with.
                      example: F50091
                    url:
                      type:
                        - string
                      maxLength: 512
                      description: The URL of the webhook endpoint.
                      example: https://api.url.com
                    authorizationHeader:
                      type:
                        - string
                        - 'null'
                      maxLength: 512
                      description: The authorization header content for the webhook.
                      example: Basic AXVubzpwQDU1dzByYM==
                    sharedSecret:
                      type:
                        - string
                        - 'null'
                      maxLength: 36
                      description: >-
                        When provided, this is used to sign the webhook payload
                        and generate the `x-em-signature` header.
                      example: 123e4567-e89b-12d3-a456-426614174000
                    enabled:
                      type:
                        - boolean
                      description: >-
                        Webhook event type availability (whether the webhook is
                        enabled or not).
                      example: true
                    webhookEventTypeName:
                      type:
                        - string
                      maxLength: 256
                      description: The name of the webhook event type to work with.
                      example: AccountCreated
                  required:
                    - url
                    - enabled
                    - webhookEventTypeName
                  title: Event type name
                - type:
                    - object
                  properties:
                    accountId:
                      type:
                        - string
                        - 'null'
                      description: The ID of the account to work with.
                      example: F50091
                    url:
                      type:
                        - string
                      maxLength: 512
                      description: The URL of the webhook endpoint.
                      example: https://api.url.com
                    authorizationHeader:
                      type:
                        - string
                        - 'null'
                      maxLength: 512
                      description: The authorization header content for the webhook.
                      example: Basic AXVubzpwQDU1dzByYM==
                    sharedSecret:
                      type:
                        - string
                        - 'null'
                      maxLength: 36
                      description: >-
                        When provided, this is used to sign the webhook payload
                        and generate the `x-em-signature` header.
                      example: 123e4567-e89b-12d3-a456-426614174000
                    enabled:
                      type:
                        - boolean
                      description: >-
                        Webhook event type availability (whether the webhook is
                        enabled or not).
                      example: true
                    webhookEventTypeId:
                      description: The ID of the webhook event type to work with.
                      type:
                        - string
                      format: uuid
                      example: da91434a-4026-42ea-84b8-d0317b64af9c
                  required:
                    - url
                    - enabled
                    - webhookEventTypeId
                  title: Event type name
            examples:
              Event type name:
                value:
                  accountId: F50091
                  url: https://api.url.com
                  authorizationHeader: Basic AXVubzpwQDU1dzByYM==
                  sharedSecret: 123e4567-e89b-12d3-a456-426614174000
                  enabled: true
                  webhookEventTypeId: da91434a-4026-42ea-84b8-d0317b64af9c
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  id:
                    type:
                      - string
                    format: uuid
                    description: The ID of the webhook to work with.
                    example: da91434a-4026-42ea-84b8-d0317b64af9c
                  productId:
                    type:
                      - string
                    format: uuid
                    maxLength: 36
                    description: The ID of the product to work with.
                    example: 3ef24d53-6e22-4103-a16b-d268e4f7346d
                  webhookEventTypeId:
                    description: The ID of the webhook event type to work with.
                    type:
                      - string
                    format: uuid
                    example: da91434a-4026-42ea-84b8-d0317b64af9c
                  webhookEventTypeName:
                    type:
                      - string
                    maxLength: 256
                    description: The webhook event name.
                    example: OrderCreated
                  accountId:
                    type:
                      - string
                      - 'null'
                    description: The ID of the account to work with.
                    example: F50091
                  url:
                    type:
                      - string
                    maxLength: 512
                    description: The URL of the webhook endpoint.
                    example: https://api.url.com
                  authorizationHeader:
                    type:
                      - string
                      - 'null'
                    maxLength: 512
                    description: The authorization header content for the webhook.
                    example: 'Basic AXVubzpwQDU1dzByYM== '
                  enabled:
                    type:
                      - boolean
                    description: >-
                      Webhook event type availability (whether the webhook is
                      enabled or not).
                    example: true
                  sharedSecret:
                    type:
                      - string
                      - 'null'
                    maxLength: 36
                    description: >-
                      When provided, this is used to sign the webhook payload
                      and generate the `x-em-signature` header.
                    example: 123e4567-e89b-12d3-a456-426614174000
                  createdAt:
                    type:
                      - string
                    format: date-time
                    description: >-
                      The date the Resource was initially created. ISO 8601
                      format without milliseconds.
                  updatedAt:
                    type:
                      - string
                    format: date-time
                    description: >-
                      The date the Resource was last modified. ISO 8601 format
                      without milliseconds.
                required:
                  - id
                  - productId
                  - webhookEventTypeId
                  - webhookEventTypeName
                  - accountId
                  - url
                  - authorizationHeader
                  - enabled
                  - sharedSecret
                  - createdAt
                  - updatedAt
                example:
                  id: da91434a-4026-42ea-84b8-d0317b64af9c
                  productId: 3ef24d53-6e22-4103-a16b-d268e4f7346d
                  webhookEventTypeId: da91434a-4026-42ea-84b8-d0317b64af9c
                  webhookEventTypeName: OrderCreated
                  accountId: F50091
                  url: https://api.url.com
                  authorizationHeader: 'Basic AXVubzpwQDU1dzByYM== '
                  enabled: true
                  sharedSecret: 123e4567-e89b-12d3-a456-426614174000
                  createdAt: '2019-08-24T14:15:22Z'
                  updatedAt: '2019-08-24T14:15:22Z'
      security:
        - CommonAuth:
            - webhooks:create:own
            - webhooks:create:any
components:
  securitySchemes:
    CommonAuth:
      type: apiKey
      in: header
      name: Authorization

````