## Endpoint: `/api/webhook/`
**Method**: GET
**Description**: Fetch all webhooks.
### Parameters
| Parameter | Type | Required | Description | Example Value |
| --- | --- | --- | --- | --- |
| None | - | - | No parameters required | - |
### Headers
| Header | Type | Required | Description | Example Value |
| --- | --- | --- | --- | --- |
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Example Response
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": <Webhook_id>,
"customer_name": "<Customer_name>",
... WEBHOOK DETAILS ...
}
],
}
---
## Endpoint: `/api/webhook/{id}/`
**Method**: GET
**Description**: Retrieve details of a specific webhook by ID.
### Parameters
| Parameter | Type | Required | Description | Example Value |
| --- | --- | --- | --- | --- |
| id | string | Yes | Unique identifier for the webhook | 12345 |
### Headers
| Header | Type | Required | Description | Example Value |
| --- | --- | --- | --- | --- |
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Example Response
{
"id": <Webhook_id>,
"customer_name": "<Customer_name>",
"created": "2023-10-08T12:38:03.481159Z",
"updated": "2023-10-08T12:38:03.481597Z",
"active": <Status>,
"name": "<Webhook_name>",
...THE REST OF THE DETAILS...
}
---
## Endpoint: `/api/webhook/count/`
**Method**: GET
**Description**: Retrieve the total count of webhooks.
### Parameters
| Parameter | Type | Required | Description | Example Value |
| --- | --- | --- | --- | --- |
| None | - | - | No parameters required | - |
### Headers
| Header | Type | Required | Description | Example Value |
| --- | --- | --- | --- | --- |
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Example Response
{
"count": <Count_number>
}
---
## Endpoint: `/api/webhook/`
**Method**: POST
**Description**: Create a new webhook.
### Parameters
| Parameter | Type | Required | Description | Example Value |
| --- | --- | --- | --- | --- |
| None | - | - | No parameters required | - |
### Headers
| Header | Type | Required | Description | Example Value |
| --- | --- | --- | --- | --- |
| Authorization | string | Yes | Bearer token for authentication | Bearer <token> |
### Request Payload
{
"headers": "[[{Headers}]]",
"customer": {Customer_id},
"name": "{Webhook_name}",
"method": 1,
"content_type": 1,
"url": "{URL}",
"payload": "{{PAYLOAD}}",
"username": null,
"password": null,
"token": null
}
### Example Response
`The details of the request (payload)
---