GET/v1/webhooks

List all webhooks

Retrieve a paginated list of all webhooks for your organization

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Query parameters

page:stringoptional
Page number of paginated results.
Default: "1"
per_page:stringoptional
Number of items per page.
Default: "20"

Responses

StatusMeaningDescription
200OKReturns a list of webhooks
401UnauthorizedUnauthorized
500Internal Server ErrorInternal Server Error

Response Schema

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

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": [
    {
      "id": "a1b2c3d4",
      "url": "https://api.example.com/webhooks/onlineornot",
      "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"
        }
      ]
    }
  ],
  "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

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Body parameters

url:string(uri)
Webhook endpoint URL
description:stringoptional
Optional description of the webhook
events:string[]
Event types this webhook should subscribe to
status_page_ids:string[]optional
IDs of status pages to associate with this webhook

Responses

StatusMeaningDescription
201CreatedWebhook created successfully
401UnauthorizedUnauthorized
403ForbiddenForbidden - Webhooks require a paid plan
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"]}'

Response

{
  "result": {
    "id": "a1b2c3d4",
    "url": "https://api.example.com/webhooks/onlineornot",
    "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"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/webhooks/{webhook_id}

Retrieve a webhook

Look up detailed information about a specific webhook

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Path parameters

webhook_id:string
Webhook ID

Responses

StatusMeaningDescription
200OKReturns the specified webhook
401UnauthorizedUnauthorized
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": {
    "id": "a1b2c3d4",
    "url": "https://api.example.com/webhooks/onlineornot",
    "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"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

PATCH/v1/webhooks/{webhook_id}

Modify a webhook

Update the configuration of an existing webhook

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Path parameters

webhook_id:string
Webhook ID

Body parameters

url:string(uri)optional
Webhook endpoint URL
description:stringoptional
Optional description of the webhook
events:string[]optional
Event types this webhook should subscribe to
status_page_ids:string[]optional
IDs of status pages to associate with this webhook

Responses

StatusMeaningDescription
200OKWebhook updated successfully
401UnauthorizedUnauthorized
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": {
    "id": "a1b2c3d4",
    "url": "https://api.example.com/webhooks/onlineornot",
    "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"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

DELETE/v1/webhooks/{webhook_id}

Delete a webhook

Permanently delete a webhook

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Path parameters

webhook_id:string
Webhook ID

Responses

StatusMeaningDescription
200OKReturns the deleted webhook's ID
401UnauthorizedUnauthorized
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?