GET/v1/webhooks
List all webhooks
Retrieve a paginated list of all webhooks for your organization
Requires WEBHOOKS:READ.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Query parameters
page:integeroptional
Page number of paginated results, starting at 1.
Default: 1
per_page:integeroptional
Number of items per page. Defaults to 20. Continue requesting subsequent pages until the accumulated item count reaches result_info.total_count or a page is empty.
Default: 20
search:stringoptional
Search term to filter results.
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns a list of webhooks. May also return a canonical failure envelope with success: false at HTTP200. |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthorized |
| 403 | Forbidden | Insufficient permissions |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
success:boolean
false
result:null
errors:object[]
messages:[any]
Request
GET
/v1/webhookscurl --request GET \
--url https://api.onlineornot.com/v1/webhooks \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": [
{
"id": "a1b2c3d4",
"url": "https://api.example.com/hooks/{{WEBHOOK_TOKEN}}",
"description": "Production webhook for incident notifications",
"events": [
"status_page.incident.started",
"status_page.incident.resolved"
],
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:30:00.000Z",
"status_pages": [
{
"id": "x9y8z7w6",
"name": "My Status Page"
}
],
"checks": [
{
"id": "c1d2e3f4",
"name": "API Health Check"
}
],
"heartbeats": [
{
"id": "h1i2j3k4",
"name": "Daily Backup Job"
}
]
}
],
"result_info": {
"page": 1,
"per_page": 20,
"count": 1,
"total_count": 1
},
"success": true,
"errors": [],
"messages": []
}
POST/v1/webhooks
Create a webhook
Create a new webhook to receive event notifications
Requires WEBHOOKS:EDIT.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Body parameters
url:string
Webhook URL. Use {{NAME}} to reference an environment variable.
description:stringoptional
Optional description of the webhook
events:enum[]
Event types this webhook should subscribe to
Accepted values: "status_page.incident.started" | "status_page.incident.updated" | "status_page.incident.resolved" | "uptime.down" | "uptime.up" | "heartbeat.down" | "heartbeat.up"
status_page_ids:string[]optional
IDs of status pages to associate with this webhook
check_ids:string[]optional
IDs of uptime checks to associate with this webhook
heartbeat_ids:string[]optional
IDs of heartbeats to associate with this webhook
*anonymous*:objectoptional
Responses
| Status | Meaning | Description |
|---|---|---|
| 201 | Created | Webhook created successfully |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthorized |
| 403 | Forbidden | Forbidden - Webhooks require a paid plan |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]
Request
POST
/v1/webhookscurl --request POST \
--url https://api.onlineornot.com/v1/webhooks \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"url":"https://api.example.com/webhooks/onlineornot","events":["status_page.incident.started","status_page.incident.resolved"],"status_page_ids":["x9y8z7w6"]}'
Response
{
"result": {
"id": "a1b2c3d4",
"url": "https://api.example.com/hooks/{{WEBHOOK_TOKEN}}",
"description": "Production webhook for incident notifications",
"events": [
"status_page.incident.started",
"status_page.incident.resolved"
],
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:30:00.000Z",
"status_pages": [
{
"id": "x9y8z7w6",
"name": "My Status Page"
}
],
"checks": [
{
"id": "c1d2e3f4",
"name": "API Health Check"
}
],
"heartbeats": [
{
"id": "h1i2j3k4",
"name": "Daily Backup Job"
}
]
},
"success": true,
"errors": [],
"messages": []
}
GET/v1/webhooks/{webhook_id}
Retrieve a webhook
Look up detailed information about a specific webhook
Requires WEBHOOKS:READ.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Path parameters
webhook_id:string
Webhook ID
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns the specified webhook |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthorized |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Webhook not found |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]
Request
GET
/v1/webhooks/{webhook_id}curl --request GET \
--url https://api.onlineornot.com/v1/webhooks/a1b2c3d4 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": {
"id": "a1b2c3d4",
"url": "https://api.example.com/hooks/{{WEBHOOK_TOKEN}}",
"description": "Production webhook for incident notifications",
"events": [
"status_page.incident.started",
"status_page.incident.resolved"
],
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:30:00.000Z",
"status_pages": [
{
"id": "x9y8z7w6",
"name": "My Status Page"
}
],
"checks": [
{
"id": "c1d2e3f4",
"name": "API Health Check"
}
],
"heartbeats": [
{
"id": "h1i2j3k4",
"name": "Daily Backup Job"
}
]
},
"success": true,
"errors": [],
"messages": []
}
PATCH/v1/webhooks/{webhook_id}
Modify a webhook
Update the configuration of an existing webhook
Requires WEBHOOKS:EDIT.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Path parameters
webhook_id:string
Webhook ID
Body parameters
url:stringoptional
Webhook URL. Use {{NAME}} to reference an environment variable.
description:stringoptional
Optional description of the webhook
events:enum[]optional
Event types this webhook should subscribe to
Accepted values: "status_page.incident.started" | "status_page.incident.updated" | "status_page.incident.resolved" | "uptime.down" | "uptime.up" | "heartbeat.down" | "heartbeat.up"
status_page_ids:string[]optional
IDs of status pages to associate with this webhook
check_ids:string[]optional
IDs of uptime checks to associate with this webhook
heartbeat_ids:string[]optional
IDs of heartbeats to associate with this webhook
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Webhook updated successfully |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthorized |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Webhook not found |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]
Request
PATCH
/v1/webhooks/{webhook_id}curl --request PATCH \
--url https://api.onlineornot.com/v1/webhooks/a1b2c3d4 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"url":"https://api.example.com/webhooks/new-endpoint"}'
Response
{
"result": {
"id": "a1b2c3d4",
"url": "https://api.example.com/hooks/{{WEBHOOK_TOKEN}}",
"description": "Production webhook for incident notifications",
"events": [
"status_page.incident.started",
"status_page.incident.resolved"
],
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:30:00.000Z",
"status_pages": [
{
"id": "x9y8z7w6",
"name": "My Status Page"
}
],
"checks": [
{
"id": "c1d2e3f4",
"name": "API Health Check"
}
],
"heartbeats": [
{
"id": "h1i2j3k4",
"name": "Daily Backup Job"
}
]
},
"success": true,
"errors": [],
"messages": []
}
DELETE/v1/webhooks/{webhook_id}
Delete a webhook
Permanently delete a webhook
Requires WEBHOOKS:EDIT.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Path parameters
webhook_id:string
Webhook ID
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns the deleted webhook's ID |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthorized |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Webhook not found |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]
Request
DELETE
/v1/webhooks/{webhook_id}curl --request DELETE \
--url https://api.onlineornot.com/v1/webhooks/a1b2c3d4 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": {
"id": "a1b2c3d4"
},
"success": true,
"errors": [],
"messages": []
}