Webhook Registrations
The Webhook Registrations resource allows you to register webhook endpoints via the MarkUp.io API.
Create webhook registration
POST /api/v2/webhook-registrations
curl "https://api.markup.io/api/v2/webhook-registrations" \
-X POST \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" \
--data '{
"url": "https://markup.io",
"workspaceId": "af17f82b-102b-4c64-bf45-be0eae98c4db",
"eventTypes": [
"comment_created",
"comment_resolved"
],
"enabled": true
}'{
"id": "ce39fa44-9d09-40db-85e2-9041c99e2a69",
"createdAt": "2023-05-19T12:56:40.461Z",
"modifiedAt": "2023-05-19T12:56:40.461Z",
"url": "https://markup.io",
"workspaceId": "123e4567-e89b-12d3-a456-426655440000",
"eventTypes": [
"comment_created",
"comment_resolved"
],
"enabled": true
}Response Body - WebhookRegistrationResponse
Request Body CreateWebhookRegistrationRequest
| Option | Type | |
|---|---|---|
| url | string | |
| workspaceId | string | |
| eventTypes optional | ||
| enabled | boolean |
Update webhook registration
POST /api/v2/webhook-registrations/:id
curl "https://api.markup.io/api/v2/webhook-registrations/65af4995-2298-49c6-9d1e-241087e8f1b6" \
-X POST \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" \
--data '{
"url": "https://markup.io",
"eventTypes": [
"comment_created",
"comment_resolved"
],
"enabled": true
}'{
"id": "5102cc29-f9b3-4b9c-8c2d-1ae32608ce32",
"createdAt": "2023-05-19T12:56:40.461Z",
"modifiedAt": "2023-05-19T12:56:40.461Z",
"url": "https://markup.io",
"workspaceId": "123e4567-e89b-12d3-a456-426655440000",
"eventTypes": [
"comment_created",
"comment_resolved"
],
"enabled": true
}Response Body - WebhookRegistrationResponse
Request Path Params IdRequestParam
| Option | Type | |
|---|---|---|
| id | string |
Request Body UpdateWebhookRegistrationRequest
| Option | Type | |
|---|---|---|
| url | string | |
| eventTypes optional | ||
| enabled | boolean |
Refresh webhook signing key
POST /api/v2/webhook-registrations/:id/refresh-signing-key
curl "https://api.markup.io/api/v2/webhook-registrations/4da66bd5-4656-4206-8cec-d5ad8467700a/refresh-signing-key" \
-X POST \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"id": "37828908-22f9-450f-a18e-ad97b34ddb1d",
"createdAt": "2023-05-19T12:56:40.462Z",
"modifiedAt": "2023-05-19T12:56:40.462Z",
"url": "https://markup.io",
"workspaceId": "123e4567-e89b-12d3-a456-426655440000",
"eventTypes": [
"comment_created",
"comment_resolved"
],
"enabled": true
}Response Body - WebhookRegistrationResponse
Request Path Params IdRequestParam
| Option | Type | |
|---|---|---|
| id | string |
Get webhook registration
GET /api/v2/webhook-registrations/:id
curl "https://api.markup.io/api/v2/webhook-registrations/d18e33fa-a604-40e3-9d21-27e2b4ed7b60" \
-X GET \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"id": "062057ba-e2c7-4283-aef2-5721c3157d49",
"createdAt": "2023-05-19T12:56:40.462Z",
"modifiedAt": "2023-05-19T12:56:40.462Z",
"url": "https://markup.io",
"workspaceId": "123e4567-e89b-12d3-a456-426655440000",
"eventTypes": [
"comment_created",
"comment_resolved"
],
"enabled": true
}Response Body - WebhookRegistrationResponse
Request Path Params IdRequestParam
| Option | Type | |
|---|---|---|
| id | string |
List webhook registrations
GET /api/v2/webhook-registrations
curl "https://api.markup.io/api/v2/webhook-registrations?workspaceId=c0c3ed9b-0e38-4d50-9367-60b9b2281e3f" \
-X GET \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"data": [
{
"id": "e6d37280-5937-44d6-9b39-9222e1ca09b5",
"createdAt": "2023-05-19T12:56:40.462Z",
"modifiedAt": "2023-05-19T12:56:40.462Z",
"url": "https://markup.io",
"workspaceId": "123e4567-e89b-12d3-a456-426655440000",
"eventTypes": [
"comment_created",
"comment_resolved"
],
"enabled": true
}
]
}Response Body ListWebhookRegistrationResponse
| Option | Type | |
|---|---|---|
| data |
Request Query Params WorkspaceIdRequest
| Option | Type | |
|---|---|---|
| workspaceId | string |
Delete webhook registration
DELETE /api/v2/webhook-registrations/:id
curl "https://api.markup.io/api/v2/webhook-registrations/a1fcb24a-b3d6-4bd3-998d-728fbc3c0ddc" \
-X DELETE \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" 204 No ContentRequest Path Params IdRequestParam
| Option | Type | |
|---|---|---|
| id | string |
Related types
WebhookRegistrationResponse
| Option | Type | |
|---|---|---|
| id | string | |
| createdAt | Iso8601Timestamp | |
| modifiedAt | Iso8601Timestamp | |
| deletedAt | Iso8601Timestamp | |
| url | string | |
| workspaceId | string | |
| eventTypes | ||
| enabled | boolean | |
| signingKey | string |
WebhookEventType
| Option | Type | |
|---|---|---|
| WebhookEventType | `comment_created` | `comment_resolved` | `comment_unresolved` | `markup_created` | `comment_reply_created` |
WebhookRegistrationResponse
| Option | Type | |
|---|---|---|
| id | string | |
| createdAt | Iso8601Timestamp | |
| modifiedAt | Iso8601Timestamp | |
| deletedAt | Iso8601Timestamp | |
| url | string | |
| workspaceId | string | |
| eventTypes | ||
| enabled | boolean | |
| signingKey | string |