Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Webhooks (v1)

Snyk API reference for the Webhooks (v1) endpoints, including request parameters and response schemas

This document uses the v1 API, which will eventually be deprecated, as further Snyk developments are now focused on the REST API. For more details, see the v1 API.

Create a webhook

post

Snyk sends a ping event to the newly configured webhook so you can check you're able to receive the transports.### Required permissions

  • View Organization

  • View Outbound Webhooks

  • Create Outbound Webhooks

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
orgIdstringRequired

The organization ID to list projects for. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Body
urlstringOptional

Webhooks can only be configured for URLs using the https protocol. http is not allowed.

secretstringOptional

This is a password you create, that Snyk uses to sign our transports to you, so you be sure the notification is authentic. Your secret should: Be a random string with high entropy; Not be used for anything else; Only known to Snyk and your webhook transport consuming code;

Responses
200Success
application/json
idstringRequired
urlstringRequired
post/org/{orgId}/webhooks
POST /v1/org/{orgId}/webhooks HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 96

{
  "url": "https://my.app.com/webhook-handler/snyk123",
  "secret": "a8be22bb7bed43a3ac24de3580093560"
}
200Success
{
  "id": "d3cf26b3-2d77-497b-bce2-23b33cc15362",
  "url": "https://my.app.com/webhook-handler/snyk123"
}

List webhooks

get

Snyk sends a ping event to the newly configured webhook so you can check you're able to receive the transports

Required permissions

  • View Organization

  • View Outbound Webhooks

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
orgIdstringRequired

The organization ID to list projects for. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Responses
200Success
application/json
totalinteger · int32Required
get/org/{orgId}/webhooks
GET /v1/org/{orgId}/webhooks HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "results": [
    {
      "id": "d3cf26b3-2d77-497b-bce2-23b33cc15362",
      "url": "https://my.app.com/webhook-handler/snyk123"
    }
  ],
  "total": 1
}

Retrieve a webhook

get

Required permissions

  • View Organization

  • View Outbound Webhooks

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
orgIdstringRequired

The organization ID the project belongs to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
webhookIdstringRequired

The webhook ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Responses
200Success
application/json
idstringRequired
urlstringRequired
get/org/{orgId}/webhooks/{webhookId}
GET /v1/org/{orgId}/webhooks/{webhookId} HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "id": "d3cf26b3-2d77-497b-bce2-23b33cc15362",
  "url": "https://my.app.com/webhook-handler/snyk123"
}

Delete a webhook

delete

Required permissions

  • View Organization

  • View Outbound Webhooks

  • Remove Outbound Webhooks

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
orgIdstringRequired

The organization ID the project belongs to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
webhookIdstringRequired

The webhook ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Responses
200Success
delete/org/{orgId}/webhooks/{webhookId}
DELETE /v1/org/{orgId}/webhooks/{webhookId} HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
200Success

No content

Ping a webhook

post

Required permissions

  • View Organization

  • View Outbound Webhooks

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
orgIdstringRequired

The organization ID the project belongs to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
webhookIdstringRequired

The webhook ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Responses
200Success
post/org/{orgId}/webhooks/{webhookId}/ping
POST /v1/org/{orgId}/webhooks/{webhookId}/ping HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
200Success

No content

Last updated

Was this helpful?