POST/v1/webhooks/{webhook_id}/move

Assign or unassign 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

Body parameters

project_id:string | null
Project ID, or null for Unassigned.

Responses

StatusMeaningDescription
200OKMoved resource and destination
400Bad RequestInvalid request
401UnauthorizedMissing or invalid credentials
403ForbiddenInsufficient permissions
404Not FoundResource or project not found
409ConflictMove would break variable references or create a name conflict
500Internal Server ErrorInternal server error

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

POST
/v1/webhooks/{webhook_id}/move
curl --request POST \
  --url https://api.onlineornot.com/v1/webhooks/a1b2c3d4/move \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"project_id":"a1b2c3d4e5f6g7h8"}'

Response

{
  "result": {
    "id": "string",
    "project_id": "a1b2c3d4e5f6g7h8"
  },
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/webhooks/delivery-summary

Read last-24-hour webhook summaries

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

webhook_ids:string

Responses

StatusMeaningDescription
200OKOwned webhook delivery history
400Bad RequestInvalid history query
401UnauthorizedUnauthorized
403ForbiddenInsufficient webhook permissions
404Not FoundWebhook or attempt not found
500Internal Server ErrorInternal server error
503Service UnavailableDelivery history unavailable

Response Schema

result:object[]
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

GET
/v1/webhooks/delivery-summary
curl --request GET \
  --url 'https://api.onlineornot.com/v1/webhooks/delivery-summary?webhook_ids=string' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": [
    {
      "delivery_count": 0,
      "error_count": 0,
      "average_response_time_ms": 0,
      "error_rate": 100,
      "webhook_id": "string",
      "buckets": [
        {
          "delivery_count": 0,
          "error_count": 0,
          "average_response_time_ms": 0,
          "error_rate": 100,
          "timestamp": "2019-08-24T14:15:22Z"
        }
      ]
    }
  ],
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/webhooks/{webhook_id}/delivery-activity

Read webhook delivery activity

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

Query parameters

period:stringoptional
Accepted values: "24h" | "7d" | "14d"
Default: "24h"

Responses

StatusMeaningDescription
200OKOwned webhook delivery history
400Bad RequestInvalid history query
401UnauthorizedUnauthorized
403ForbiddenInsufficient webhook permissions
404Not FoundWebhook or attempt not found
500Internal Server ErrorInternal server error
503Service UnavailableDelivery history unavailable

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

GET
/v1/webhooks/{webhook_id}/delivery-activity
curl --request GET \
  --url https://api.onlineornot.com/v1/webhooks/a1b2c3d4/delivery-activity \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": {
    "summary": {
      "delivery_count": 0,
      "error_count": 0,
      "average_response_time_ms": 0,
      "error_rate": 100,
      "webhook_id": "string",
      "buckets": [
        {
          "delivery_count": 0,
          "error_count": 0,
          "average_response_time_ms": 0,
          "error_rate": 100,
          "timestamp": "2019-08-24T14:15:22Z"
        }
      ]
    },
    "buckets": [
      {
        "delivery_count": 0,
        "error_count": 0,
        "average_response_time_ms": 0,
        "error_rate": 100,
        "timestamp": "2019-08-24T14:15:22Z"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/webhooks/{webhook_id}/deliveries

List webhook delivery attempts

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

Query parameters

period:stringoptional
Accepted values: "24h" | "7d" | "14d"
Default: "24h"
event_type:stringoptional
Webhook event type
Accepted values: "status_page.incident.started" | "status_page.incident.updated" | "status_page.incident.resolved" | "uptime.down" | "uptime.up" | "heartbeat.down" | "heartbeat.up"
outcome:stringoptional
Accepted values: "success" | "http_error" | "timeout" | "network_error" | "resolution_error" | "skipped"
limit:integeroptional
Default: 25
cursor:stringoptional

Responses

StatusMeaningDescription
200OKOwned webhook delivery history
400Bad RequestInvalid history query
401UnauthorizedUnauthorized
403ForbiddenInsufficient webhook permissions
404Not FoundWebhook or attempt not found
500Internal Server ErrorInternal server error
503Service UnavailableDelivery history unavailable

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

GET
/v1/webhooks/{webhook_id}/deliveries
curl --request GET \
  --url https://api.onlineornot.com/v1/webhooks/a1b2c3d4/deliveries \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": {
    "deliveries": [
      {
        "schema_version": 1,
        "webhook_id": "string",
        "event_id": "string",
        "attempt_id": "string",
        "event_type": "status_page.incident.started",
        "queued_at": "2019-08-24T14:15:22Z",
        "attempted_at": "2019-08-24T14:15:22Z",
        "completed_at": "2019-08-24T14:15:22Z",
        "outcome": "success",
        "failure_reason": "string",
        "http_status": 100,
        "response_time_ms": 0,
        "request_method": "POST"
      }
    ],
    "next_cursor": "string"
  },
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/webhooks/{webhook_id}/deliveries/{attempt_id}

Inspect a webhook delivery attempt

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
attempt_id:string

Responses

StatusMeaningDescription
200OKOwned webhook delivery history
400Bad RequestInvalid history query
401UnauthorizedUnauthorized
403ForbiddenInsufficient webhook permissions
404Not FoundWebhook or attempt not found
500Internal Server ErrorInternal server error
503Service UnavailableDelivery history unavailable

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

GET
/v1/webhooks/{webhook_id}/deliveries/{attempt_id}
curl --request GET \
  --url https://api.onlineornot.com/v1/webhooks/a1b2c3d4/deliveries/string \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": {
    "schema_version": 1,
    "webhook_id": "string",
    "event_id": "string",
    "attempt_id": "string",
    "event_type": "status_page.incident.started",
    "queued_at": "2019-08-24T14:15:22Z",
    "attempted_at": "2019-08-24T14:15:22Z",
    "completed_at": "2019-08-24T14:15:22Z",
    "outcome": "success",
    "failure_reason": "string",
    "http_status": 100,
    "response_time_ms": 0,
    "request_method": "POST",
    "request_headers": "string",
    "request_body": "string",
    "request_body_state": "captured",
    "response_headers": "string",
    "response_body": "string",
    "response_body_state": "captured"
  },
  "success": true,
  "errors": [],
  "messages": []
}

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.
project_id:anyoptional
Project ID, or unassigned to list only Unassigned resources. Omit to list all resources.

Responses

StatusMeaningDescription
200OKReturns a list of webhooks. May also return a canonical failure envelope with success: false at HTTP200.
400Bad RequestInvalid request
401UnauthorizedUnauthorized
403ForbiddenInsufficient permissions
404Not FoundProject not found
500Internal Server ErrorInternal Server Error

Response Schema

success:boolean
false
result:null
errors:object[]
messages:[any]

Request

GET
/v1/webhooks
curl --request GET \
  --url https://api.onlineornot.com/v1/webhooks \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": [
    {
      "project_id": "a1b2c3d4e5f6g7h8",
      "id": "a1b2c3d4",
      "enabled": true,
      "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

project_id:string | nulloptional
Project ID. Omit or use null to leave the resource Unassigned.
enabled:booleanoptional
Whether webhook delivery is enabled. Defaults to true on creation; omitted PATCH values preserve the current state.
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

StatusMeaningDescription
201CreatedWebhook created successfully
400Bad RequestInvalid request
401UnauthorizedUnauthorized
403ForbiddenForbidden - Webhooks require a paid plan
404Not FoundProject not found
500Internal Server ErrorInternal Server Error

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

POST
/v1/webhooks
curl --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": {
    "project_id": "a1b2c3d4e5f6g7h8",
    "id": "a1b2c3d4",
    "enabled": true,
    "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

StatusMeaningDescription
200OKReturns the specified webhook
400Bad RequestInvalid request
401UnauthorizedUnauthorized
403ForbiddenInsufficient permissions
404Not FoundWebhook not found
500Internal Server ErrorInternal 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": {
    "project_id": "a1b2c3d4e5f6g7h8",
    "id": "a1b2c3d4",
    "enabled": true,
    "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

project_id:stringoptional
*anonymous*:anyoptional
enabled:booleanoptional
Whether webhook delivery is enabled. Defaults to true on creation; omitted PATCH values preserve the current state.
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

StatusMeaningDescription
200OKWebhook updated successfully
400Bad RequestInvalid request
401UnauthorizedUnauthorized
403ForbiddenWebhook enable/disable requires paid feature access
404Not FoundWebhook not found
500Internal Server ErrorInternal 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": {
    "project_id": "a1b2c3d4e5f6g7h8",
    "id": "a1b2c3d4",
    "enabled": true,
    "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

StatusMeaningDescription
200OKReturns the deleted webhook's ID
400Bad RequestInvalid request
401UnauthorizedUnauthorized
403ForbiddenInsufficient permissions
404Not FoundWebhook not found
500Internal Server ErrorInternal 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": []
}

Was this page helpful?