diff --git a/source/includes/authenticated_api/_webhook_endpoints.md b/source/includes/authenticated_api/_webhook_endpoints.md index 8cdc5ec618b..65b2d14232b 100644 --- a/source/includes/authenticated_api/_webhook_endpoints.md +++ b/source/includes/authenticated_api/_webhook_endpoints.md @@ -2,7 +2,7 @@ Webhooks can be used by software engineers to integrate ControlShift with third-party systems. They allow engineers to build software that is triggered by events that take place within ControlShift. This authenticated endpoint provides information about webhook endpoints and allows for the creation of new ones. -This is useful for customers who would like to build automated reporting to detect when webhooks have been disabled or are setup incorrectly. +This is useful for customers who would like to build automated reporting to detect when webhooks have been disabled or are setup incorrectly. ### List Webhook Endpoints @@ -35,28 +35,43 @@ Show information about all of the webhook endpoints configured for organisation. ] ``` -### Create Webhook Endpoint - -Creates a new webhook endpoint that will receive webhooks from the platform. +
-`POST /api/v1/webhook_endpoints` +### Create Webhook Endpoint +> POST /api/v1/webhook_endpoints -The request body should be a JSON block containing one `"endpoint"` object, which can have the following properties: +```json +{ + "endpoint": { + "url": "https://example.com/test1", + "basic_auth_username": "my_secret_user", + "basic_auth_password": "passw0rd", + "aws_account_id": "355687156842" + } +} +``` -Field | Type | Description | Required? -------|--------|--------------------------------------------------------------|---------- -url | string | URL webhook will be POSTed to. | yes -basic_auth_username | string | Optional. HTTP Basic Auth credential to use with your endpoint | no -basic_auth_password | string | | no -aws_account_id | string | Optional. Advanced feature. See Bulk Data API docs | no +> Response body -Successful response ```json { "status": "success", "endpoint": { - "url": "https://example.com", + "url": "https://example.com/test1", "signing_secret": "abc122" } } ``` + +Creates a new webhook endpoint that will receive webhooks from the platform. + +`POST /api/v1/webhook_endpoints` + +The request body should be a JSON block containing one `"endpoint"` object, which can have the following properties: + +Field | Type | Description | Required? +--------------------|--------|----------------------------------------------------------------|---------- +url | string | URL webhook will be POSTed to. | yes +basic_auth_username | string | Optional. HTTP Basic Auth credential to use with your endpoint | no +basic_auth_password | string | | no +aws_account_id | string | Optional. Advanced feature. See Bulk Data API docs | no