Webhooks

List all webhooks

get

Retrieves all webhook configurations for the current account. Returns detailed information about each webhook including: - Webhook ID and name - URL endpoint - Subscribed events - Active/inactive status - Creation and last update timestamps - Delivery statistics (success/failure counts)

Only webhooks belonging to the authenticated user's account are returned. Requires owner role to view webhook configurations.
Authorizations
Responses
200

List of webhooks.

application/json
get
GET /sfp/api/webhooks HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Deploy to Production",
    "event": "release.published",
    "provider": "github",
    "config": {
      "url": "text",
      "method": "get",
      "headers": {},
      "filter": {}
    },
    "timeout": 10000,
    "retryCount": 3,
    "retryDelay": 60000,
    "status": "active",
    "lastDeliveryAt": "2025-01-22T07:42:09.000Z",
    "errorCount": 0,
    "createdBy": "[email protected]",
    "createdAt": "2025-01-22T07:42:09.000Z",
    "updatedAt": "2025-01-22T07:42:09.000Z"
  }
]

Create a new webhook

post

Creates a new webhook configuration for receiving notifications about system events. Webhooks allow external systems to be notified when specific events occur within the SFP platform.

The webhook configuration includes:
- URL endpoint to receive HTTP POST requests
- Events to subscribe to (e.g., deployment.started, deployment.completed)
- Optional headers for authentication
- Active/inactive status
- Retry configuration for failed deliveries

Each webhook is associated with the creating account and can only be managed by users with owner role in that account.
Authorizations
Body
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: octocat/hello-world
webhookUrlstringRequired

URL where GitHub should send webhook events

Example: https://example.com/webhook
Responses
201

The webhook has been successfully created.

application/json
post
POST /sfp/api/webhooks HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 206

{
  "name": "Simple Webhook",
  "event": "user.created",
  "provider": "http",
  "config": {
    "url": "https://api.example.com/webhook",
    "method": "post",
    "headers": {
      "Content-Type": "application/json",
      "X-API-Key": "your-api-key"
    }
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Deploy to Production",
  "event": "release.published",
  "provider": "github",
  "config": {
    "url": "text",
    "method": "get",
    "headers": {},
    "filter": {}
  },
  "timeout": 10000,
  "retryCount": 3,
  "retryDelay": 60000,
  "status": "active",
  "lastDeliveryAt": "2025-01-22T07:42:09.000Z",
  "errorCount": 0,
  "createdBy": "[email protected]",
  "createdAt": "2025-01-22T07:42:09.000Z",
  "updatedAt": "2025-01-22T07:42:09.000Z"
}

Get a webhook by ID

get

Retrieves detailed information about a specific webhook configuration. Returns comprehensive webhook details including: - Complete configuration (URL, headers, events) - Delivery statistics and recent delivery history - Active/inactive status and last state change - Retry configuration and backoff settings

This endpoint is useful for debugging webhook delivery issues or verifying webhook configuration. Requires owner role.
Authorizations
Path parameters
idstringRequired

Webhook ID

Responses
200

The webhook configuration.

application/json
get
GET /sfp/api/webhooks/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Deploy to Production",
  "event": "release.published",
  "provider": "github",
  "config": {
    "url": "text",
    "method": "get",
    "headers": {},
    "filter": {}
  },
  "timeout": 10000,
  "retryCount": 3,
  "retryDelay": 60000,
  "status": "active",
  "lastDeliveryAt": "2025-01-22T07:42:09.000Z",
  "errorCount": 0,
  "createdBy": "[email protected]",
  "createdAt": "2025-01-22T07:42:09.000Z",
  "updatedAt": "2025-01-22T07:42:09.000Z"
}

Delete a webhook

delete

Permanently deletes a webhook configuration. This action: - Stops all future event deliveries to this webhook - Cancels any pending retries for failed deliveries - Removes the webhook configuration from the system - Retains historical delivery logs for audit purposes

This operation cannot be undone. The webhook must belong to the authenticated user's account. Requires owner role.
Authorizations
Path parameters
idstringRequired

Webhook ID

Responses
204

The webhook has been successfully deleted.

delete
DELETE /sfp/api/webhooks/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*

No content

Update a webhook

patch

Updates an existing webhook configuration. All fields are optional - only provided fields will be updated. Common updates include: - Changing the endpoint URL - Adding/removing subscribed events - Updating authentication headers - Enabling/disabling the webhook - Modifying retry configuration

The webhook must belong to the authenticated user's account. Updates take effect immediately for new event deliveries. Requires owner role.
Authorizations
Path parameters
idstringRequired

Webhook ID

Body
namestringOptional

A human-readable name for the webhook

Example: Deploy to Production
eventstringOptional

The event that triggers this webhook

Example: release.published
configall ofOptional

Provider-specific configuration

Example: {"repository":"owner/repo","workflow":"deploy.yml","ref":"main"}
timeoutnumberOptional

Timeout in milliseconds

Example: 10000
retryCountnumberOptional

Number of retry attempts

Example: 3
retryDelaynumberOptional

Delay between retries in milliseconds

Example: 60000
statusstring · enumOptional

Current status of the webhook

Example: activePossible values:
Responses
200

The webhook has been successfully updated.

application/json
patch
PATCH /sfp/api/webhooks/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 145

{
  "config": {
    "url": "https://new-api.example.com/webhook",
    "method": "post",
    "headers": {
      "Content-Type": "application/json",
      "X-New-Header": "new-value"
    }
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Deploy to Production",
  "event": "release.published",
  "provider": "github",
  "config": {
    "url": "text",
    "method": "get",
    "headers": {},
    "filter": {}
  },
  "timeout": 10000,
  "retryCount": 3,
  "retryDelay": 60000,
  "status": "active",
  "lastDeliveryAt": "2025-01-22T07:42:09.000Z",
  "errorCount": 0,
  "createdBy": "[email protected]",
  "createdAt": "2025-01-22T07:42:09.000Z",
  "updatedAt": "2025-01-22T07:42:09.000Z"
}

Queue a payload for delivery to a webhook

post

Manually queues a custom payload for delivery to a specific webhook. This endpoint is useful for: - Testing webhook connectivity and payload handling - Replaying failed deliveries with corrected data - Sending custom notifications outside normal event flow

The payload is queued for asynchronous delivery and will follow the webhook's retry configuration if delivery fails. Returns a delivery ID for tracking. Requires owner or application role.
Authorizations
Path parameters
idstringRequired

Webhook ID

Body
payloadobjectRequired

The payload to deliver to the webhook endpoint

Example: {"event":"deployment","environment":"production","status":"success"}
Responses
202

Webhook delivery has been queued

application/json
post
POST /sfp/api/webhooks/{id}/deliver HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "payload": {
    "event": "user.notification",
    "message": "Hello World",
    "timestamp": "2025-08-09T05:56:43.260Z"
  }
}
202

Webhook delivery has been queued

{
  "success": true,
  "statusCode": 1,
  "error": "text",
  "duration": 1,
  "message": "text",
  "providerDetails": {
    "method": "get",
    "url": "text",
    "headers": {},
    "filtered": true,
    "queued": true,
    "deliveryId": "text",
    "notFound": true,
    "eventName": "text",
    "webhookId": "text",
    "reason": "text",
    "response": {}
  }
}

Queue webhooks for an event

post

Triggers webhook deliveries for all active webhooks subscribed to a specific event. This endpoint: - Finds all active webhooks subscribed to the specified event - Queues the payload for delivery to each matching webhook - Processes deliveries asynchronously with configured retry policies - Returns delivery IDs for tracking each webhook delivery

This is the primary mechanism for event-driven webhook notifications in the system. Useful for manual event triggering or system integrations. Requires owner or application role.
Authorizations
Body
eventstringRequired

The event that triggers the webhooks

Example: document.created
payloadobjectRequired

The event payload

Example: {"id":"doc123","name":"example.md","type":"markdown","createdBy":"[email protected]"}
Responses
202

Webhook deliveries have been queued

application/json
post
POST /sfp/api/webhooks/trigger HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 109

{
  "event": "user.created",
  "payload": {
    "userId": "123",
    "action": "created",
    "timestamp": "2025-08-09T05:56:43.260Z"
  }
}
202

Webhook deliveries have been queued

[
  {
    "success": true,
    "statusCode": 1,
    "error": "text",
    "duration": 1,
    "message": "text",
    "providerDetails": {
      "method": "get",
      "url": "text",
      "headers": {},
      "filtered": true,
      "queued": true,
      "deliveryId": "text",
      "notFound": true,
      "eventName": "text",
      "webhookId": "text",
      "reason": "text",
      "response": {}
    }
  }
]

Was this helpful?