Skip to main content

Create a webhook subscription

Log in to add to favourites
POST/api/management/projects/{projectId}/events/webhooks/subscriptions

Parameter

NameParameter typeTypeDescription
projectId(required)pathstringThe project identifier found in the project overview screen of the management console.

Responses

HTTP status codeReasonModel
201CreatedWebhook Subscription
400An invalid payload was sent in the requestError
401UnauthorizedError
403ForbiddenError
422Validation error(s)Error
500Internal server errorError

Examples

Entries basic events subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example entries basic events subscription",
    "description": "An example entries basic events subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "entry",
            "event": [
                "created",
                "updated",
                "deleted",
                "published",
                "unpublished",
                "archived",
                "unarchived",
                "restored"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

Entries workflow events subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example entries workflow events subscription",
    "description": "An example entries workflow events subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "entry",
            "event": [
                "workflowEventRaised"
            ],
            "contentTypeId": [
                "book"
            ],
            "owner": "some.username",
            "workflowEvent": [
                "contensisEntryApproval.draft.submit",
                "contensisEntryApproval.draft.submitAndApprove",
                "contensisEntryApproval.draft.submitAndScheduledApprove",
                "contensisEntryApproval.awaitingApproval.revoke",
                "contensisEntryApproval.awaitingApproval.decline",
                "contensisEntryApproval.awaitingApproval.approve",
                "contensisEntryApproval.awaitingApproval.scheduledApprove",
                "contensisEntryApproval.declined.submit",
                "contensisEntryApproval.scheduled.cancel",
                "contensisEntryApproval.scheduled.publishNow"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST"
}

Entries workflow transition events subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example entries workflow transition subscription",
    "description": "An example entries workflow transition subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "entry",
            "event": [
                "workflowStateChanged"
            ],
            "contentTypeId": [
                "book"
            ],
            "owner": "some.username",
            "workflowState": [
                "contensisEntryApproval.draft",
                "contensisEntryApproval.awaitingApproval",
                "contensisEntryApproval.declined",
                "contensisEntryApproval.scheduled",
                "contensisEntryApproval.versionComplete",
                "contensisEntryApproval.archived"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST"
}

Form response basic events subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example form response basic events subscription",
    "description": "An example form response basic events subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "form",
            "event": [
                "created",
                "updated",
                "deleted",
                "archived",
                "unarchived",
                "restored"
            ],
            "contentTypeId": [
                "someForm"
            ],
            "owner": "some.username"
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST"
}

Form response workflow events subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example form response workflow events subscription",
    "description": "An example form response workflow events subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
         {
            "resourceType": "form",
            "event": [
                "workflowEventRaised"
            ],
            "contentTypeId": [
                "someForm"
            ],
            "owner": "some.username",
            "workflowEvent": [
                "contensisFormBasic.unread.read",
                "contensisFormBasic.read.unread"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST"
}

Form response workflow transition subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Form response workflow transition subscription",
    "description": "An example form response workflow transition subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "form",
            "event": [
                "workflowStateChanged"
            ],
            "contentTypeId": [
                "someForm"
            ],
            "owner": "some.username",
            "workflowState": [
                "contensisFormBasic.unread",
                "contensisFormBasic.read",
                "contensisFormBasic.archived"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST"
}

Assets subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example asset subscription",
    "description": "",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "asset",
            "event": [
                "created",
                "updated",
                "deleted",
                "published"
            ],
            "contentTypeId": [
                "image"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

Content types/forms subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example contenttype/form subscription",
    "description": "An example content type/form subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "contentType",
            "event": [
                "created",
                "updated",
                "deleted",
                "published"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

Components subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example component subscription",
    "description": "An example component subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "component",
            "event": [
                "created",
                "updated",
                "deleted",
                "published"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

Nodes subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example nodes subscription",
    "description": "An example nodes subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "node",
            "event": [
                "created",
                "updated",
                "deleted",
                "moved",
                "childOrderChanged"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

Projects subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example projects subscription",
    "description": "An example projects subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "project",
            "event": [
                "updated"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

Users subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example users subscription",
    "description": "An example users subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "user",
            "event": [
                "created",
                "updated",
                "deleted"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

User groups subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example groups subscription",
    "description": "An example groups subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "group",
            "event": [
                "created",
                "updated",
                "deleted",
                "userAdded",
                "userRemoved",
                "groupAdded",
                "groupRemoved"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

Comments for entries subscription

JSON
POST: /api/management/projects/movies/events/webhooks/subscriptions/{subscriptionId}

{
    "name": "Example comments for entries subscription",
    "description": "An example comments for entries subscription",
    "url": "https://webhook.site/11ac515d-bba8-462d-8da3-f4a8312a6745",
    "enabled": true,
    "topics": [
        {
            "resourceType": "comment.entry",
            "event": [
                "created",
                "replied",
                "updated",
                "resolved",
                "reactivated",
                "deleted"
            ]
        }
    ],
    "templates": {},
    "headers": {},
    "method": "POST",
    "ui": false
}

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request