API
Resources
Webhook Registrations

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

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
}'
Response
{
  "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

OptionType
url string
workspaceId string
eventTypes optional
enabled boolean

Update webhook registration

POST /api/v2/webhook-registrations/:id

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
}'
Response
{
  "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

OptionType
id string

Request Body UpdateWebhookRegistrationRequest

OptionType
url string
eventTypes optional
enabled boolean

Refresh webhook signing key

POST /api/v2/webhook-registrations/:id/refresh-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" 
Response
{
  "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

OptionType
id string

Get webhook registration

GET /api/v2/webhook-registrations/:id

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" 
Response
{
  "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

OptionType
id string

List webhook registrations

GET /api/v2/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" 
Response
{
  "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

Request Query Params WorkspaceIdRequest

OptionType
workspaceId string

Delete webhook registration

DELETE /api/v2/webhook-registrations/:id

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" 
Response
204 No Content

Request Path Params IdRequestParam

OptionType
id string

Related types

WebhookRegistrationResponse

OptionType
id string
createdAt Iso8601Timestamp
modifiedAt Iso8601Timestamp
deletedAt Iso8601Timestamp
url string
workspaceId string
eventTypes
enabled boolean
signingKey string

WebhookEventType

OptionType
WebhookEventType `comment_created` | `comment_resolved` | `comment_unresolved` | `markup_created` | `comment_reply_created`

WebhookRegistrationResponse

OptionType
id string
createdAt Iso8601Timestamp
modifiedAt Iso8601Timestamp
deletedAt Iso8601Timestamp
url string
workspaceId string
eventTypes
enabled boolean
signingKey string