API Methods

Official Snyk API is available at https://snyk.docs.apiary.io/#

post
Create a webhook

https://snyk.io/api/v1/org/:orgId/webhooks
This endpoint allows you to create a webhook.
Request
Response
Request
Path Parameters
orgId
required
string
Organization ID that uniquely identifies your organization
Headers
Authorization
required
string
token API_KEY
Content-Type
required
string
application/json; charset=utf-8
Body Parameters
url
required
string
Webhook handler endpoint
secret
required
string
Webhook handler token
Response
200: OK
Webhook successfully created.
{
"id":"d3cf26b3-2d77-497b-bce2-23b33cc15362",
"url":"https://my.app.com/webhook-handler/snyk123"
}

get
List webhooks

https://snyk.io/api/v1/org/:orgId/webhooks
This endpoint allows you to get a list of all webhooks
Request
Response
Request
Path Parameters
orgId
required
string
Organization ID that uniquely identifies your organization
Headers
Authorization
required
string
token API_KEY
Content-Type
required
string
application/json; charset=utf-8
Response
200: OK
{
"results": [
{
"id":"d3cf26b3-2d77-497b-bce2-23b33cc15362",
"url":"https://my.app.com/webhook-handler/snyk123",
},
],
"total":1
}

get
Retrieve a webhook

https://snyk.io/api/v1/org/:orgId/webhooks/:webhookId
This endpoint allows you to get details for a specific webhook
Request
Response
Request
Path Parameters
webhookId
required
string
Snyk webhook ID
orgId
required
string
Organization ID that uniquely identifies your organization
Headers
Authorization
required
string
token API_KEY
Content-Type
required
string
application/json; charset=utf-8
Response
200: OK
{
"id":"d3cf26b3-2d77-497b-bce2-23b33cc15362",
"url":"https://my.app.com/webhook-handler/snyk123"
}

post
Ping a webhook

https://snyk.io/api/v1/org/:orgId/webhooks/:webhookId/ping
Request
Response
Request
Path Parameters
webhookId
required
string
Snyk webhook ID
orgId
required
string
Organization ID that uniquely identifies your organization
Headers
Authorization
required
string
token API_KEY
Content-Type
required
string
application/json; charset=utf-8
Response
200: OK
Ok

delete
Delete a webhook

https://snyk.io/api/v1/org/:orgId/webhooks/:webhookId
Request
Response
Request
Path Parameters
webhookId
required
string
Snyk webhook ID
orgId
required
string
Organization ID that uniquely identifies your organization
Headers
Authorization
required
string
token API_KEY
Content-Type
required
string
application/json; charset=utf-8
Response
200: OK
Ok