Skip to content

Webhooks

Retrieve all webhooks for a specific workspace

GET /api/workspaces/{workspaceId}/webhooks

Retrieve all webhooks for a specific workspace

Path parameters

  • page integer

    Page number which should be displayed; 0-indexed (defaults to 0)

  • limit integer

    Maximum amount of results to display per page (defaults to 20)

Returns

  • 200

    OK

Example cURL request
curl -X get \
https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/webhooks \
-H 'Authorization: Bearer <YOUR_API_TOKEN>'
Response schema
{
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"workspaceId",
"endpoint",
"events",
"enabled",
"successful",
"createdAt",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"format": "base64uuid"
},
"workspaceId": {
"type": "string",
"format": "base64uuid"
},
"endpoint": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ping",
"frontmatter"
]
}
},
"sharedSecret": {
"type": "string",
"format": "password"
},
"enabled": {
"type": "boolean"
},
"successful": {
"description": "Whether the last delivery was successful",
"type": "boolean"
},
"createdBy": {
"type": "string",
"format": "base64uuid"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
}
}

Create a new webhook

POST /api/workspaces/{workspaceId}/webhooks

Create a new webhook. Upon execution of this route, a test event (“ping”) will be sent to the endpoint. If sending the ping event fails, the webhook will still be created, but it will be disabled. Please check the response of this endpoint to see whenever enabled = false, and if that is the case, check the latest delivery to see why. Once the endpoint has been fixed, you can re-deliver the ping payload and if that works, manually re-enable the webhook again.

Path parameters

  • workspaceId string base64uuid Required

    The workspace ID

Body parameters

Webhook creation payload

  • endpoint string Required
  • events array of string Required
  • enabled boolean Required

Returns

  • 200

    OK

Example cURL request
curl -X post \
https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/webhooks \
-H 'Authorization: Bearer <YOUR_API_TOKEN>'
Response schema
{
"type": "object",
"required": [
"id",
"workspaceId",
"endpoint",
"events",
"enabled",
"successful",
"createdAt",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"format": "base64uuid"
},
"workspaceId": {
"type": "string",
"format": "base64uuid"
},
"endpoint": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ping",
"frontmatter"
]
}
},
"sharedSecret": {
"type": "string",
"format": "password"
},
"enabled": {
"type": "boolean"
},
"successful": {
"description": "Whether the last delivery was successful",
"type": "boolean"
},
"createdBy": {
"type": "string",
"format": "base64uuid"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
}

Update an existing webhook

PATCH /api/workspaces/{workspaceId}/webhooks/{webhookId}

Updates an existing webhook. Upon execution of this route, a test event (“ping”) will be sent to the endpoint. If sending the ping event fails, the webhook will still be updated, but will be disabled. Please check the response of this endpoint to see whenever enabled = false, and if that is the case (and not manually requested), check the latest delivery to see why. Once the endpoint has been fixed, you can re-deliver the ping payload and if that works, manually re-enable the webhook again.

Path parameters

  • workspaceId string base64uuid Required

    The workspace ID

  • webhookId string base64uuid Required

    ID of the Webhook

Body parameters

Webhook update payload

  • endpoint string
  • events array of string
  • regenerateSharedSecret boolean
  • enabled boolean

Returns

  • 200

    OK

Example cURL request
curl -X patch \
https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/webhooks/%7BwebhookId%7D \
-H 'Authorization: Bearer <YOUR_API_TOKEN>'
Response schema
{
"type": "object",
"required": [
"id",
"workspaceId",
"endpoint",
"events",
"enabled",
"successful",
"createdAt",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"format": "base64uuid"
},
"workspaceId": {
"type": "string",
"format": "base64uuid"
},
"endpoint": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"ping",
"frontmatter"
]
}
},
"sharedSecret": {
"type": "string",
"format": "password"
},
"enabled": {
"type": "boolean"
},
"successful": {
"description": "Whether the last delivery was successful",
"type": "boolean"
},
"createdBy": {
"type": "string",
"format": "base64uuid"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
}

Delete an existing webhook

DELETE /api/workspaces/{workspaceId}/webhooks/{webhookId}

Deletes an existing webhook

Path parameters

  • workspaceId string base64uuid Required

    The workspace ID

  • webhookId string base64uuid Required

    ID of the Webhook

Returns

  • 200

    OK

Example cURL request
curl -X delete \
https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/webhooks/%7BwebhookId%7D \
-H 'Authorization: Bearer <YOUR_API_TOKEN>'

Retrieve a list of deliveries for a specific webhook

GET /api/workspaces/{workspaceId}/webhooks/{webhookId}/deliveries

Retrieve a list of deliveries for a specific webhook

Path parameters

  • page integer

    Page number which should be displayed; 0-indexed (defaults to 0)

  • limit integer

    Maximum amount of results to display per page (defaults to 20)

Returns

  • 200

    OK

Example cURL request
curl -X get \
https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/webhooks/%7BwebhookId%7D/deliveries \
-H 'Authorization: Bearer <YOUR_API_TOKEN>'
Response schema
{
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"event",
"successful",
"timestamp"
],
"properties": {
"id": {
"type": "string",
"format": "base64uuid"
},
"event": {
"type": "string"
},
"successful": {
"type": "boolean"
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
}
}

Retrieve information about a specific delivery for a specific webhook

GET /api/workspaces/{workspaceId}/webhooks/{webhookId}/deliveries/{deliveryId}

Retrieve information about a specific delivery for a specific webhook

Path parameters

  • workspaceId string base64uuid Required

    The workspace ID

  • webhookId string base64uuid Required

    ID of the Webhook

  • deliveryId string base64uuid Required

    ID of the webhook delivery

Returns

  • 200

    OK

Example cURL request
curl -X get \
https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/webhooks/%7BwebhookId%7D/deliveries/%7BdeliveryId%7D \
-H 'Authorization: Bearer <YOUR_API_TOKEN>'
Response schema
{
"type": "object",
"required": [
"id",
"webhookId",
"event",
"requestHeaders",
"requestBody",
"sentRequestAt"
],
"properties": {
"id": {
"type": "string",
"format": "base64uuid"
},
"webhookId": {
"type": "string",
"format": "base64uuid"
},
"event": {
"type": "string"
},
"statusCode": {
"type": "number",
"format": "int32"
},
"requestHeaders": {
"type": "string"
},
"requestBody": {
"type": "string"
},
"responseHeaders": {
"type": "string"
},
"responseBody": {
"type": "string"
},
"sentRequestAt": {
"type": "string",
"format": "date-time"
},
"receivedResponseAt": {
"type": "string",
"format": "date-time"
}
}
}

Resend a specific delivery

POST /api/workspaces/{workspaceId}/webhooks/{webhookId}/deliveries/{deliveryId}/resend

Resend a specific delivery

Path parameters

  • workspaceId string base64uuid Required

    The workspace ID

  • webhookId string base64uuid Required

    ID of the Webhook

  • deliveryId string base64uuid Required

    ID of the webhook delivery

Returns

  • 200

    OK. Resend has been queued.

Example cURL request
curl -X post \
https://studio.fiberplane.com/api/workspaces/%7BworkspaceId%7D/webhooks/%7BwebhookId%7D/deliveries/%7BdeliveryId%7D/resend \
-H 'Authorization: Bearer <YOUR_API_TOKEN>'