Webhooks API
Open API playground All endpoints
Configure webhooks and receive real-time events from your FreJun account.
Create a webhook
POST/api/v2/integrations/create-webhook/
Create a new webhook subscription for an event.
Returns 400 if a subscription for the same app and event already exists. POC emails default to the app creator if not provided (max 5).
Auth: Authorization: Bearer
Request body
eventrequiredstringEvent name for which the webhook is being created
callback_urlrequiredstring (uri)Callback URL for the webhook
custom_headersobject | nullCustom headers for the callback_url
poc_emailsarray of string | nullList of POC emails for the webhook (max 5)
Example request
{
"event": "string",
"callback_url": "uri",
"custom_headers": {},
"poc_emails": []
}Responses
| Status | Description |
|---|---|
201 | Successful Response |
400 | Bad Request |
401 | Unauthorized |
500 | Internal Server Error |
Example response (201)
{
"success": true,
"message": "string",
"data": {
"id": 0,
"app_id": 0,
"event": "string",
"callback_url": "string",
"custom_headers": {},
"poc_emails": [],
"active": true,
"created_at": "date-time",
"updated_at": "date-time"
}
}Retrieve a webhook
GET/api/v2/integrations/webhook/{hook_id}/
Retrieve a single webhook subscription by ID.
Returns 404 if the webhook is not found, 403 if the app doesn't own it.
Auth: Authorization: Bearer
Parameters
| Name | In | Type | Description |
|---|---|---|---|
hook_id required | path | integer |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Example response (200)
{
"success": true,
"message": "string",
"data": {
"id": 0,
"app_id": 0,
"event": "string",
"callback_url": "string",
"custom_headers": {},
"poc_emails": [],
"active": true,
"created_at": "date-time",
"updated_at": "date-time"
}
}Update a webhook
PATCH/api/v2/integrations/webhook/{hook_id}/
Update an existing webhook subscription by ID.
Only the owning app can update its subscription. Returns 404 if the webhook is not found, 403 if the app doesn't own it.
Auth: Authorization: Bearer
Parameters
| Name | In | Type | Description |
|---|---|---|---|
hook_id required | path | integer |
Request body
eventstring | nullEvent name for which the webhook is being updated
callback_urlstring (uri) | nullCallback URL for the webhook
custom_headersobject | nullCustom headers for the callback_url
poc_emailsarray of string | nullList of POC emails for the webhook (max 5)
activeboolean | nullActivate or Deactivate the webhook
Example request
{
"event": "string",
"callback_url": "uri",
"custom_headers": {},
"poc_emails": [
"string"
],
"active": true
}Responses
| Status | Description |
|---|---|
200 | Successful Response |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Example response (200)
{
"success": true,
"message": "string",
"data": {
"id": 0,
"app_id": 0,
"event": "string",
"callback_url": "string",
"custom_headers": {},
"poc_emails": [],
"active": true,
"created_at": "date-time",
"updated_at": "date-time"
}
}Delete a webhook
DELETE/api/v2/integrations/webhook/{hook_id}/
Delete a webhook subscription by ID.
Only the owning app can delete its subscription. Returns 404 if the webhook is not found, 403 if the app doesn't own it.
Auth: Authorization: Bearer
Parameters
| Name | In | Type | Description |
|---|---|---|---|
hook_id required | path | integer |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Example response (200)
{
"success": true,
"message": "string"
}List webhooks
GET/api/v2/integrations/webhooks/
List all webhook subscriptions for the authenticated app.
Auth: Authorization: Bearer
Responses
| Status | Description |
|---|---|
200 | Successful Response |
401 | Unauthorized |
500 | Internal Server Error |
Example response (200)
{
"success": true,
"message": "string",
"data": [
{
"id": 0,
"app_id": 0,
"event": "string",
"callback_url": "string",
"custom_headers": {},
"poc_emails": [],
"active": true,
"created_at": "date-time",
"updated_at": "date-time"
}
]
}