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

Policies

Snyk API reference for the Policies endpoints, including request parameters and response schemas

This document uses the REST API. For more details, see the Authentication for API page.

Create a new org-level policy

post

Create a new org-level policy.

Org level Policy APIs Access Notice: Org level Policy APIs are only available for use with Code Consistent Ignores. For information about how to enable Code Consistent Ignores see this documentation.

Required permissions

  • Create Ignores (org.project.ignore.create)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
Body
Responses
201

A single policy is returned if it is successfully created.

application/vnd.api+json
post/orgs/{org_id}/policies
POST /rest/orgs/{org_id}/policies?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 414

{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "expires": "2024-03-16T00:00:00Z",
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "action_type": "ignore",
      "conditions_group": {
        "conditions": [
          {
            "field": "snyk/asset/finding/v1",
            "operator": "includes",
            "value": "text"
          }
        ],
        "logical_operator": "and"
      },
      "name": "text",
      "source": "api"
    },
    "meta": {
      "key1": "value1",
      "key2": {
        "sub_key": "sub_value"
      },
      "key3": [
        "array_value1",
        "array_value2"
      ]
    },
    "type": "policy"
  }
}
{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "expires": "2024-03-16T00:00:00Z",
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "action_type": "ignore",
      "conditions_group": {
        "conditions": [
          {
            "field": "snyk/asset/finding/v1",
            "operator": "includes",
            "value": "text"
          }
        ],
        "logical_operator": "and"
      },
      "created_at": "2024-03-16T00:00:00Z",
      "created_by": {
        "actor_source": "snyk_user",
        "email": "text",
        "external_id": "text",
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "origin": "bitbucket_cloud"
      },
      "name": "text",
      "review": "pending",
      "updated_at": "2024-03-16T00:00:00Z"
    },
    "id": "f16c31b5-6129-4571-add8-d589da9be524",
    "type": "policy"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://example.com/api/this_resource"
  }
}

Get org-level policies

get

Get all policies for the requested organisation.

Org level Policy APIs Access Notice: Org level Policy APIs are only available for use with Code Consistent Ignores. For information about how to enable Code Consistent Ignores see this documentation.

Required permissions

  • View Ignores (org.project.ignore.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
starting_afterstringOptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringOptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
limitinteger · int32 · min: 10 · max: 100Optional

Number of results to return per page

Default: 10Example: 10
searchstringOptional

Search keyword for searching fields ignored_by.name, ignored_by.email, ignore_type in policy_rules

order_bystring · enumOptional

The column name to sort on

Possible values:
order_directionstring · enumOptional

Sorting direction ASC/DESC

Possible values:
expires_beforestring · date-timeOptional

Select only policies with an expiry strictly before the given time.

Example: 2024-03-16T00:00:00Z
expires_afterstring · date-timeOptional

Select only policies with an expiry strictly past the given time.

Example: 2024-03-16T00:00:00Z
expires_neverbooleanOptional

Select only policies that never expire.

Example: true
Responses
200

The policies for the requested organisation.

application/vnd.api+json
get/orgs/{org_id}/policies
GET /rest/orgs/{org_id}/policies?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "attributes": {
        "action": {
          "data": {
            "expires": "2024-03-16T00:00:00Z",
            "ignore_type": "wont-fix",
            "reason": "text"
          }
        },
        "action_type": "ignore",
        "conditions_group": {
          "conditions": [
            {
              "field": "snyk/asset/finding/v1",
              "operator": "includes",
              "value": "text"
            }
          ],
          "logical_operator": "and"
        },
        "created_at": "2024-03-16T00:00:00Z",
        "created_by": {
          "actor_source": "snyk_user",
          "email": "text",
          "external_id": "text",
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "name": "text",
          "origin": "bitbucket_cloud"
        },
        "name": "text",
        "review": "pending",
        "updated_at": "2024-03-16T00:00:00Z"
      },
      "id": "f16c31b5-6129-4571-add8-d589da9be524",
      "type": "policy"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Update an org-level policy

patch

Update the org-level policy.

Org level Policy APIs Access Notice: Org level Policy APIs are only available for use with Code Consistent Ignores. For information about how to enable Code Consistent Ignores see this documentation.

Required permissions

  • Edit Ignores (org.project.ignore.edit)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

policy_idstring · uuidRequired

Policy ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
Body
Responses
200

A single policy is returned if it is successfully updated.

application/vnd.api+json
patch/orgs/{org_id}/policies/{policy_id}
PATCH /rest/orgs/{org_id}/policies/{policy_id}?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 439

{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "expires": "2024-03-16T00:00:00Z",
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "conditions_group": {
        "conditions": [
          {
            "field": "snyk/asset/finding/v1",
            "operator": "includes",
            "value": "text"
          }
        ],
        "logical_operator": "and"
      },
      "name": "text",
      "review": "pending"
    },
    "id": "f16c31b5-6129-4571-add8-d589da9be524",
    "meta": {
      "key1": "value1",
      "key2": {
        "sub_key": "sub_value"
      },
      "key3": [
        "array_value1",
        "array_value2"
      ]
    },
    "type": "policy"
  }
}
{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "expires": "2024-03-16T00:00:00Z",
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "action_type": "ignore",
      "conditions_group": {
        "conditions": [
          {
            "field": "snyk/asset/finding/v1",
            "operator": "includes",
            "value": "text"
          }
        ],
        "logical_operator": "and"
      },
      "created_at": "2024-03-16T00:00:00Z",
      "created_by": {
        "actor_source": "snyk_user",
        "email": "text",
        "external_id": "text",
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "origin": "bitbucket_cloud"
      },
      "name": "text",
      "review": "pending",
      "updated_at": "2024-03-16T00:00:00Z"
    },
    "id": "f16c31b5-6129-4571-add8-d589da9be524",
    "type": "policy"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://example.com/api/this_resource"
  }
}

Get an org-level policy

get

Get a specific org-level policy based on its ID.

Org level Policy APIs Access Notice: Org level Policy APIs are only available for use with Code Consistent Ignores. For information about how to enable Code Consistent Ignores see this documentation.

Required permissions

  • View Ignores (org.project.ignore.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

policy_idstring · uuidRequired

Policy ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
Responses
200

The requested policy.

application/vnd.api+json
get/orgs/{org_id}/policies/{policy_id}
GET /rest/orgs/{org_id}/policies/{policy_id}?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "expires": "2024-03-16T00:00:00Z",
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "action_type": "ignore",
      "conditions_group": {
        "conditions": [
          {
            "field": "snyk/asset/finding/v1",
            "operator": "includes",
            "value": "text"
          }
        ],
        "logical_operator": "and"
      },
      "created_at": "2024-03-16T00:00:00Z",
      "created_by": {
        "actor_source": "snyk_user",
        "email": "text",
        "external_id": "text",
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "origin": "bitbucket_cloud"
      },
      "name": "text",
      "review": "pending",
      "updated_at": "2024-03-16T00:00:00Z"
    },
    "id": "f16c31b5-6129-4571-add8-d589da9be524",
    "type": "policy"
  },
  "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"
  }
}

Delete an org-level policy

delete

Delete an existing org-level policy.

Org level Policy APIs Access Notice: Org level Policy APIs are only available for use with Code Consistent Ignores. For information about how to enable Code Consistent Ignores see this documentation.

Required permissions

  • Remove Ignores (org.project.ignore.delete)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

policy_idstring · uuidRequired

Policy ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
Responses
204

The operation completed successfully with no content

delete/orgs/{org_id}/policies/{policy_id}
DELETE /rest/orgs/{org_id}/policies/{policy_id}?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*

No content

List org policy events (Early Access)

get

Retrieve the event history for the given policy.

Org level Policy APIs Access Notice: Access to our Org level Policy APIs is currently restricted via "snykCodeConsistentIgnores" and "ignoreApprovalWorkflow" feature flags and will result in a 403 Forbidden error without the flag enabled. Please contact your account representative for eligibility requirements.

Required permissions

  • View Ignores (org.project.ignore.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

policy_idstring · uuidRequired

Policy ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
starting_afterstringOptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringOptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
limitinteger · int32 · min: 10 · max: 100Optional

Number of results to return per page

Default: 10Example: 10
Responses
200

The requested policy.

application/vnd.api+json
get/orgs/{org_id}/policies/{policy_id}/events
GET /rest/orgs/{org_id}/policies/{policy_id}/events?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "attributes": {
        "changes": {
          "new_action": {
            "data": {
              "expires": "2024-03-16T00:00:00Z",
              "ignore_type": "wont-fix",
              "reason": "text"
            }
          },
          "new_conditions_group": {
            "conditions": [
              {
                "field": "snyk/asset/finding/v1",
                "operator": "includes",
                "value": "text"
              }
            ],
            "logical_operator": "and"
          },
          "new_name": "text",
          "new_review": "pending",
          "old_action": {
            "data": {
              "expires": "2024-03-16T00:00:00Z",
              "ignore_type": "wont-fix",
              "reason": "text"
            }
          },
          "old_conditions_group": {
            "conditions": [
              {
                "field": "snyk/asset/finding/v1",
                "operator": "includes",
                "value": "text"
              }
            ],
            "logical_operator": "and"
          },
          "old_name": "text",
          "old_review": "pending"
        },
        "comment": "text",
        "created_at": "2024-03-16T00:00:00Z",
        "created_by": {
          "actor_source": "snyk_user",
          "email": "text",
          "external_id": "text",
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "name": "text",
          "origin": "bitbucket_cloud"
        },
        "type": "approve"
      },
      "id": "f16c31b5-6129-4571-add8-d589da9be524",
      "type": "policy_event"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Create a new group level policy (Early Access)

post

Create one new group level policy.

Group level Policy APIs Access Notice: Access to our Group level Policy APIs is currently restricted via "use-group-policy-apis" feature flag and will result in a 403 Forbidden error without the flag enabled. Please contact your account representative for eligibility requirements.

Required permissions

  • Create Policies (group.policy.create)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
group_idstring · uuidRequired

Group ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
Body
Responses
201

A single policy is returned if it is successfully created.

application/vnd.api+json
post/groups/{group_id}/policies
POST /rest/groups/{group_id}/policies?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 270

{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "action_type": "ignore",
      "conditions_group": {
        "conditions": [
          {
            "field": "exploit-maturity",
            "operator": "includes",
            "value": [
              "mature"
            ]
          }
        ],
        "logical_operator": "and"
      },
      "name": "text"
    },
    "type": "policy"
  }
}
{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "action_type": "ignore",
      "conditions_group": {
        "conditions": [
          {
            "field": "exploit-maturity",
            "operator": "includes",
            "value": [
              "mature"
            ]
          }
        ],
        "logical_operator": "and"
      },
      "created_at": "2024-03-16T00:00:00Z",
      "created_by": {
        "email": "text",
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text"
      },
      "name": "text",
      "updated_at": "2024-03-16T00:00:00Z"
    },
    "id": "f16c31b5-6129-4571-add8-d589da9be524",
    "type": "policy"
  },
  "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"
  }
}

Get group level policies (Early Access)

get

Get all policies for the requested group

Group level Policy APIs Access Notice: Access to our Group level Policy APIs is currently restricted via "use-group-policy-apis" feature flag and will result in a 403 Forbidden error without the flag enabled. Please contact your account representative for eligibility requirements.

Required permissions

  • View Policies (group.policy.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
group_idstring · uuidRequired

Group ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
starting_afterstringOptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringOptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
limitinteger · int32 · min: 10 · max: 100Optional

Number of results to return per page

Default: 10Example: 10
Responses
200

The group policies for the requested group

application/vnd.api+json
get/groups/{group_id}/policies
GET /rest/groups/{group_id}/policies?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "attributes": {
        "action": {
          "data": {
            "ignore_type": "wont-fix",
            "reason": "text"
          }
        },
        "action_type": "ignore",
        "conditions_group": {
          "conditions": [
            {
              "field": "exploit-maturity",
              "operator": "includes",
              "value": [
                "mature"
              ]
            }
          ],
          "logical_operator": "and"
        },
        "created_at": "2024-03-16T00:00:00Z",
        "created_by": {
          "email": "text",
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "name": "text"
        },
        "name": "text",
        "updated_at": "2024-03-16T00:00:00Z"
      },
      "id": "f16c31b5-6129-4571-add8-d589da9be524",
      "type": "policy"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Update a group-level policy (Early Access)

patch

Update the group-level policy.

Group level Policy APIs Access Notice: Access to our Group level Policy APIs is currently restricted via "use-group-policy-apis" feature flag and will result in a 403 Forbidden error without the flag enabled. Please contact your account representative for eligibility requirements.

Required permissions

  • Edit Policies (group.policy.edit)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
group_idstring · uuidRequired

Group ID

policy_idstring · uuidRequired

Policy ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
Body
Responses
200

A single group policy is returned if it is successfully updated.

application/vnd.api+json
patch/groups/{group_id}/policies/{policy_id}
PATCH /rest/groups/{group_id}/policies/{policy_id}?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 314

{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "action_type": "ignore",
      "conditions_group": {
        "conditions": [
          {
            "field": "exploit-maturity",
            "operator": "includes",
            "value": [
              "mature"
            ]
          }
        ],
        "logical_operator": "and"
      },
      "name": "text"
    },
    "id": "f16c31b5-6129-4571-add8-d589da9be524",
    "type": "policy"
  }
}
{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "ignore_type": "wont-fix",
          "reason": "text"
        }
      },
      "action_type": "ignore",
      "conditions_group": {
        "conditions": [
          {
            "field": "exploit-maturity",
            "operator": "includes",
            "value": [
              "mature"
            ]
          }
        ],
        "logical_operator": "and"
      },
      "created_at": "2024-03-16T00:00:00Z",
      "created_by": {
        "email": "text",
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text"
      },
      "name": "text",
      "updated_at": "2024-03-16T00:00:00Z"
    },
    "id": "f16c31b5-6129-4571-add8-d589da9be524",
    "type": "policy"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://example.com/api/this_resource"
  }
}

Delete an group-level policy (Early Access)

delete

Delete an existing group-level policy.

Group level Policy APIs Access Notice: Access to our Group level Policy APIs is currently restricted via "use-group-policy-apis" feature flag and will result in a 403 Forbidden error without the flag enabled. Please contact your account representative for eligibility requirements.

Required permissions

  • Delete Policies (group.policy.delete)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
group_idstring · uuidRequired

Group ID

policy_idstring · uuidRequired

Policy ID

Query parameters
versionstringRequired

Requested API version

Example: 2026-03-25Pattern: ^(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))?))$
Responses
204

The operation completed successfully with no content

delete/groups/{group_id}/policies/{policy_id}
DELETE /rest/groups/{group_id}/policies/{policy_id}?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?