---
title: "Create a webhook subscription"
method: POST
path: "/create_22E_v1"
---

# Create a webhook subscription

`POST /create_22E_v1`

Create a new webhook subscription

## Request body

- object
  - `subscription` object — The subscription object defines the webhook, including the webhook’s name and ID, where the webhook URL information is sent, and the criteria that triggers the webhook.
    - `id` string — The webhook’s identifier. This can include letters, numbers, characters, and spaces. You can use this identifier to reference this subscription in our webhook endpoints with the parameter <code>subscriptionID</code>.
    - `name` string — The webhook’s name. This can include letters, numbers, characters, and spaces.
    - `description` string — The webhook’s description. This can include letters, numbers, characters, and spaces.
    - `isActive` boolean — When <code>true</code>, the subscription is active. When <code>false</code>, the subscription is not active.
    - `definition` object — The subscription's definition, which is made up of a URL and headers.
      - `targetURL` string — The URL of the endpoint the webhook goes to. <br><br/> ℹ️ <span style="color:#46B8DA"><strong>NOTE</strong></span><br>Only HTTPS endpoints are allowed.
      - `customHeaders` object — The custom header to include in the <span style="color:#0171C2">**POST**</span> request to the webhook endpoints. You can use this to add extra context to webhook notifications with the format <code>”description”: “string”</code>.</p>
        - `jobInformation` string — The job information. This information is not required; this is just an example of metadata you might want to add to the asset.
        - `[customInformation]` string — You can add other information to the headers with this syntax <code>"customInformation": "string"</code>.
    - `inclusivePredicates` object — Use this parameter to allow webhooks to be sent under certain conditions. This requires custom configuration from Orange Logic. If you do not need to limit the asset information sent via the webhook, you can delete these parameters. If you need to add limitations, submit a support request.
      - `name` string — The inclusive predicate’s name.
      - `description` string — The inclusive predicate’s description.
      - `conditions` object[] — Use this parameter to allow webhooks to be sent under certain conditions. This requires custom configuration from Orange Logic. To add limitations, submit a support request and include the ID 2P7YOHB2RFVU.
        - `criteria` 'Topic' | 'Data' | 'Tenant' | 'UserID' — The event type that triggers a webhook: <ul> <li><strong><a href="https://developer.orangelogic.com/reference/webhooks#body" target="_blank">Topic</a></strong>: Filters by the event type, such as when an asset is created, deleted, or modified, in the format <code>domain.eventname</code>. For example, the topic when an asset is created is: <code>Documents.Created</code>. </li> <li><strong>Data</strong>: Filters directly on the data itself.</li> <li><strong>Tenant</strong>: Filters by the site short location code.</li> <li><strong>UserId</strong>: Filters by the originating user who triggered the event.</li> </ul>
        - `pattern` string — The pattern of the event type that triggers a webhook, in wildcard format: <ul> <li><code>?</code> means none or one character (any character).</li> <li><code>&ast;</code> means none or any number of any characters.</li> </ul> For example, say you want Orange Logic to send webhooks for any event that deletes a document’s metadata. You’d enter <code>&ast;.Delete</code>.
    - `exclusivePredicates` object — Use this parameter to prevent webhooks from being sent under certain conditions. This requires custom configuration from Orange Logic. If you do not need to limit the asset information sent via the webhook, you can delete these parameters. If you need to add limitations, submit a support request.
      - `criteria` 'Topic' | 'Data' | 'Tenant' | 'UserID' — The event type that prevents a webhook from firing: <ul> <li><strong><a href="https://developer.orangelogic.com/reference/webhooks#body" target="_blank">Topic</a></strong>: Filters by the event type, such as when an asset is created, deleted, or modified, in the format <code>domain.eventname</code>. For example, the topic when an asset is created is: <code>Documents.Created</code>. </li> <li><strong>Data</strong>: Filters directly on the data itself.</li> <li><strong>Tenant</strong>: Filters by the site short location code.</li> <li><strong>UserId</strong>: Filters by the originating user who triggered the event.</li> </ul>
      - `pattern` string — The pattern of the event type that prevents a webhook from firing, in wildcard format: <ul> <li><code>?</code> means none or one character (any character).</li> <li><code>&ast;</code> means none or any number of any characters.</li> </ul> For example, let’s say you don’t want Orange Logic to send webhooks for any event type that deletes a document’s metadata. You’d enter <code>&ast;.Delete</code>.

## Response `200`

200

- object
  - `subscription` object
    - `id` string
    - `name` string
    - `description` string
    - `isActive` boolean
    - `definition` object
      - `targetURL` string
      - `customHeaders` object
        - `jobInformation` string
      - `inclusivePredicates` object[]
        - `name` string
        - `description` string
        - `conditions` object[]
          - `criteria` string
          - `pattern` string
      - `exclusivePredicates` unknown

---

[API](https://skmtc.net/orangelogic/apis/security.md) · [All operations](https://skmtc.net/orangelogic/apis/security/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orangelogic/security/versions/c8e945426c5e/schema)
