SecretsRuleExtensions
Snyk API reference for the SecretsRuleExtensions endpoints, including request parameters and response schemas
Secrets rule extensions adapt Snyk Secret analysis, making Snyk Secret Rules more suitable for your code. Only published secrets rule extensions with assignment would be applied to Snyk scans.
Required permissions
group.rule_extension.create
API key value must be prefixed with "Token ".
Unique identifier for group in request path
b667f176-df52-4b0a-9954-117af6b05ab7Requested API version
2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$Secrets rule extension successfully created. Secrets rule extensions will only apply once published and assigned.
Bad Request: one or more parameters are invalid. Check the input to match the expected format. See Snyk API
Unauthorized: the request requires an authentication token. See Revoke and regenerate a Snyk API token.
Forbidden: the request requires an authentication token with more or different permissions. Review token permissions and try again. See PAT permissions.
Not Found: The resource you are trying to access could not be found. Review the request and try again.
Conflict: The requested operation conflicts with the current state of the resource in some way.
Internal Server Error: An unexpected error was encountered while attempting to process the request. Try again. If the error still occurs, contact support.
POST /rest/groups/{group_id}/secrets/rule_extensions?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 101
{
"data": {
"attributes": {
"copy_from": "a6fd4971-1d47-4684-a45d-7d0a372912e0"
},
"type": "rule_extensions"
}
}{
"data": {
"attributes": {
"configuration": {
"type": "addition"
},
"created_at": "2026-04-09T10:00:00Z",
"created_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"description": "Detect AWS access key IDs in source code.",
"kind": "secrets_regex",
"published_at": "2026-04-10T09:15:00Z",
"published_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"signature": {
"regex_pattern": "(?i)AKIA[0-9A-Z]{16}"
},
"status": "published",
"updated_at": "2026-04-10T09:15:00Z",
"updated_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a"
},
"id": "b7fe5082-2e58-5795-b56e-8e1b483023f1",
"type": "rule_extensions"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/rest/groups/0188104e-7aea-4047-b383-74d8b42d7452/secrets/rule_extensions/b7fe5082-2e58-5795-b56e-8e1b483023f1"
}
}Get a list of all secrets rule extensions for the requested Group ID and its child Org(s).
Required permissions
group.rule_extension.read
API key value must be prefixed with "Token ".
Unique identifier for group in request path
b667f176-df52-4b0a-9954-117af6b05ab7Requested API version
2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$Return the page of results immediately after this cursor
v1.eyJpZCI6IjEwMDAifQo=Return the page of results immediately before this cursor
v1.eyJpZCI6IjExMDAifQo=Number of results to return per page
10Example: 10Returns a list of all secrets rule extensions for the requested Group ID.
Bad Request: one or more parameters are invalid. Check the input to match the expected format. See Snyk API
Unauthorized: the request requires an authentication token. See Revoke and regenerate a Snyk API token.
Forbidden: the request requires an authentication token with more or different permissions. Review token permissions and try again. See PAT permissions.
Not Found: The resource you are trying to access could not be found. Review the request and try again.
Internal Server Error: An unexpected error was encountered while attempting to process the request. Try again. If the error still occurs, contact support.
GET /rest/groups/{group_id}/secrets/rule_extensions?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"attributes": {
"configuration": {
"type": "addition"
},
"created_at": "2026-01-01T00:00:00.000Z",
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"description": "text",
"kind": "secrets_regex",
"published_at": "2026-01-01T00:00:00.000Z",
"published_by": "123e4567-e89b-12d3-a456-426614174000",
"signature": {
"regex_pattern": "text"
},
"status": "published",
"updated_at": "2026-01-01T00:00:00.000Z",
"updated_by": "123e4567-e89b-12d3-a456-426614174000"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "rule_extensions"
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "https://example.com/api/resource",
"last": "https://example.com/api/resource",
"next": "https://example.com/api/resource",
"prev": "https://example.com/api/resource",
"related": "https://example.com/api/resource",
"self": "https://example.com/api/resource"
}
}Update the secrets rule extension for the requested rule extension ID.
Required permissions
group.rule_extension.edit
API key value must be prefixed with "Token ".
Unique identifier for group in request path
b667f176-df52-4b0a-9954-117af6b05ab7Unique identifier for a rule extension in request path
4a994d3b-d15e-45c3-bf24-6a26a02ed9eaRequested API version
2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$Secrets rule extension updated successfully.
Bad Request: one or more parameters are invalid. Check the input to match the expected format. See Snyk API
Unauthorized: the request requires an authentication token. See Revoke and regenerate a Snyk API token.
Forbidden: the request requires an authentication token with more or different permissions. Review token permissions and try again. See PAT permissions.
Not Found: The resource you are trying to access could not be found. Review the request and try again.
Conflict: The requested operation conflicts with the current state of the resource in some way.
Internal Server Error: An unexpected error was encountered while attempting to process the request. Try again. If the error still occurs, contact support.
PATCH /rest/groups/{group_id}/secrets/rule_extensions/{rule_extension_id}?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 115
{
"data": {
"attributes": {
"status": "published"
},
"id": "b7fe5082-2e58-5795-b56e-8e1b483023f1",
"type": "rule_extensions"
}
}{
"data": {
"attributes": {
"configuration": {
"type": "addition"
},
"created_at": "2026-04-09T10:00:00Z",
"created_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"description": "Detect AWS access key IDs in source code.",
"kind": "secrets_regex",
"published_at": "2026-04-10T09:15:00Z",
"published_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"signature": {
"regex_pattern": "(?i)AKIA[0-9A-Z]{16}"
},
"status": "published",
"updated_at": "2026-04-10T09:15:00Z",
"updated_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a"
},
"id": "b7fe5082-2e58-5795-b56e-8e1b483023f1",
"type": "rule_extensions"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/rest/groups/0188104e-7aea-4047-b383-74d8b42d7452/secrets/rule_extensions/b7fe5082-2e58-5795-b56e-8e1b483023f1"
}
}Get the secrets rule extension for the requested rule extension ID.
Required permissions
group.rule_extension.read
API key value must be prefixed with "Token ".
Unique identifier for group in request path
b667f176-df52-4b0a-9954-117af6b05ab7Unique identifier for a rule extension in request path
4a994d3b-d15e-45c3-bf24-6a26a02ed9eaRequested API version
2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$Secrets rule extension retrieved successfully.
Bad Request: one or more parameters are invalid. Check the input to match the expected format. See Snyk API
Unauthorized: the request requires an authentication token. See Revoke and regenerate a Snyk API token.
Forbidden: the request requires an authentication token with more or different permissions. Review token permissions and try again. See PAT permissions.
Not Found: The resource you are trying to access could not be found. Review the request and try again.
Internal Server Error: An unexpected error was encountered while attempting to process the request. Try again. If the error still occurs, contact support.
GET /rest/groups/{group_id}/secrets/rule_extensions/{rule_extension_id}?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"attributes": {
"configuration": {
"type": "addition"
},
"created_at": "2026-04-09T10:00:00Z",
"created_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"description": "Detect AWS access key IDs in source code.",
"kind": "secrets_regex",
"published_at": "2026-04-10T09:15:00Z",
"published_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"signature": {
"regex_pattern": "(?i)AKIA[0-9A-Z]{16}"
},
"status": "published",
"updated_at": "2026-04-10T09:15:00Z",
"updated_by": "758769f2-5b3a-41eb-b7c2-20bd785be49a"
},
"id": "b7fe5082-2e58-5795-b56e-8e1b483023f1",
"type": "rule_extensions"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/rest/groups/0188104e-7aea-4047-b383-74d8b42d7452/secrets/rule_extensions/b7fe5082-2e58-5795-b56e-8e1b483023f1"
}
}Delete the secrets rule extension for the requested rule extension ID. Draft rule extensions can be deleted unconditionally. Published rule extensions can only be deleted if they have no assignments.
Required permissions
group.rule_extension.delete
API key value must be prefixed with "Token ".
Unique identifier for group in request path
b667f176-df52-4b0a-9954-117af6b05ab7Unique identifier for a rule extension in request path
4a994d3b-d15e-45c3-bf24-6a26a02ed9eaRequested API version
2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$Secrets rule extension deleted successfully.
Bad Request: one or more parameters are invalid. Check the input to match the expected format. See Snyk API
Unauthorized: the request requires an authentication token. See Revoke and regenerate a Snyk API token.
Forbidden: the request requires an authentication token with more or different permissions. Review token permissions and try again. See PAT permissions.
Not Found: The resource you are trying to access could not be found. Review the request and try again.
Internal Server Error: An unexpected error was encountered while attempting to process the request. Try again. If the error still occurs, contact support.
DELETE /rest/groups/{group_id}/secrets/rule_extensions/{rule_extension_id}?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?

