Skip to content

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

eventrequiredstring

Event name for which the webhook is being created

callback_urlrequiredstring (uri)

Callback URL for the webhook

custom_headersobject | null

Custom headers for the callback_url

poc_emailsarray of string | null

List of POC emails for the webhook (max 5)

Example request
{
  "event": "string",
  "callback_url": "uri",
  "custom_headers": {},
  "poc_emails": []
}

Responses

StatusDescription
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

NameInTypeDescription
hook_id requiredpathinteger

Responses

StatusDescription
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

NameInTypeDescription
hook_id requiredpathinteger

Request body

eventstring | null

Event name for which the webhook is being updated

callback_urlstring (uri) | null

Callback URL for the webhook

custom_headersobject | null

Custom headers for the callback_url

poc_emailsarray of string | null

List of POC emails for the webhook (max 5)

activeboolean | null

Activate or Deactivate the webhook

Example request
{
  "event": "string",
  "callback_url": "uri",
  "custom_headers": {},
  "poc_emails": [
    "string"
  ],
  "active": true
}

Responses

StatusDescription
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

NameInTypeDescription
hook_id requiredpathinteger

Responses

StatusDescription
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

StatusDescription
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"
    }
  ]
}