POST Webhook Subscribers
Overview
The following table contains important information about the POST method in regards to the managing process of adding a webhook subscriber.
| POST Webhook Subscribers | |
|---|---|
| Method | POST | 
| URL or Endpoint | /api/v1/projects/ projectId/webhook-subscriber | 
| Parameters | subscriberId, projectId | 
| Body | Check request body below. | 
The description of the URL parameters is as follows:
| URL Parameter Name | Mandatory | Type | Description | 
|---|---|---|---|
| projectId | No | string | Unique Id of the project. | 
Request Body
{
  "name": "string",
  "description": "string",
  "url": "string",
  "active": true,
  "secret": "string"
}
Information about the fields that appear when you receive the response are displayed in the table below.
| Parameter Name | Mandatory | Type | Description | 
|---|---|---|---|
| name | Yes | string | Name of he webhook subscriber | 
| description | No | string | Description | 
| url | Yes | string | The url of the webhook | 
| active | No | bool | The activity status of the webhook subscriber | 
Response
{
  "id": 0,
  "url": "string",
  "name": "string",
  "description": "string",
  "active": true,
  "secret": "string"
}
Information about the fields that appear when you receive the response are displayed in the table below.
| Field Name | Type | Description | 
|---|---|---|
| id | integer | The unique Id of the webhook subscriber | 
| url | string | The url of the webhook subscriber | 
| name | string | Name of the webhook subscriber | 
| description | string | Description | 
| active | bool | The activity status of the webhook subsecriber | 
| secret | string | Ensures that the payload URL receives POST requests from GitHub. | 
If the action is successful, the service sends back an HTTP 200 or 201 response.
Errors
For information about the errors that are common to all actions, see Common Errors:
- HTTP Status Code 400: Bad Request 
- HTTP Status Code 401: Unauthorized 
- HTTP Status Code 403: Forbidden 
- HTTP Status Code 404: Result Not Found 
- HTTP Status Code 500: Internal Server Error 
- HTTP Status Code 503: Backend Fetch Failed