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

Collection

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

Create a collection

post

Create a collection

Required permissions

  • Create Collections (org.collection.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

Returned collection

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

{
  "data": {
    "attributes": {
      "name": "text"
    },
    "type": "resource"
  }
}
{
  "data": {
    "attributes": {
      "is_generated": true,
      "name": "text"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "relationships": {
      "created_by_user": {
        "data": {
          "id": "331ede0a-de94-456f-b788-166caeca58bf",
          "type": "user"
        }
      },
      "org": {
        "data": {
          "id": "331ede0a-de94-456f-b788-166caeca58bf",
          "type": "org"
        }
      }
    },
    "type": "resource"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://example.com/api/this_resource"
  }
}

Get collections

get

Return a list of organization's collections with issues counts and projects count.

Required permissions

  • View Collections (org.collection.read)

  • View Project history (org.project.snapshot.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
sortstring · enumOptional

Return collections sorted by the specified attributes

Possible values:
directionstring · enumOptional

Return collections sorted in the specified direction

Default: DESCPossible values:
namestring · max: 255Optional

Return collections which names include the provided string

is_generatedbooleanOptional

Return collections where is_generated matches the provided boolean

Responses
200

Returns a list of collections

application/vnd.api+json
get/orgs/{org_id}/collections
GET /rest/orgs/{org_id}/collections?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "attributes": {
        "is_generated": true,
        "name": "text"
      },
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "meta": {
        "issues_critical_count": 10,
        "issues_high_count": 10,
        "issues_low_count": 10,
        "issues_medium_count": 10,
        "projects_count": 7
      },
      "relationships": {
        "created_by_user": {
          "data": {
            "id": "331ede0a-de94-456f-b788-166caeca58bf",
            "type": "user"
          }
        },
        "org": {
          "data": {
            "id": "331ede0a-de94-456f-b788-166caeca58bf",
            "type": "org"
          }
        }
      },
      "type": "resource"
    }
  ],
  "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"
  }
}

Edit a collection

patch

Edit a collection

Required permissions

  • Edit Collections (org.collection.edit)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

collection_idstring · uuidRequired

Unique identifier for a collection

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

Returned collection

application/vnd.api+json
patch/orgs/{org_id}/collections/{collection_id}
PATCH /rest/orgs/{org_id}/collections/{collection_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: 101

{
  "data": {
    "attributes": {
      "name": "text"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "type": "resource"
  }
}
{
  "data": {
    "attributes": {
      "is_generated": true,
      "name": "text"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "relationships": {
      "created_by_user": {
        "data": {
          "id": "331ede0a-de94-456f-b788-166caeca58bf",
          "type": "user"
        }
      },
      "org": {
        "data": {
          "id": "331ede0a-de94-456f-b788-166caeca58bf",
          "type": "org"
        }
      }
    },
    "type": "resource"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://example.com/api/this_resource"
  }
}

Get a collection

get

Get a collection

Required permissions

  • View Collections (org.collection.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

collection_idstring · uuidRequired

Unique identifier for a collection

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

Returned collection

application/vnd.api+json
get/orgs/{org_id}/collections/{collection_id}
GET /rest/orgs/{org_id}/collections/{collection_id}?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "attributes": {
      "is_generated": true,
      "name": "text"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "relationships": {
      "created_by_user": {
        "data": {
          "id": "331ede0a-de94-456f-b788-166caeca58bf",
          "type": "user"
        }
      },
      "org": {
        "data": {
          "id": "331ede0a-de94-456f-b788-166caeca58bf",
          "type": "org"
        }
      }
    },
    "type": "resource"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://example.com/api/this_resource"
  }
}

Delete a collection

delete

Delete a collection

Required permissions

  • Delete Collections (org.collection.delete)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

collection_idstring · uuidRequired

Unique identifier for a collection

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

Collection was deleted successfully

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

No content

Add projects to a collection

post

Add projects to a collection by specifying an array of project ids

Required permissions

  • Edit Collections (org.collection.edit)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

collection_idstring · uuidRequired

Unique identifier for a collection

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
204

successfully adding projects to a collection

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

{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "type": "project"
    }
  ]
}

No content

Get projects from the specified collection

get

Return a list of organization's projects that are from the specified collection.

Required permissions

  • View Collections (org.collection.read)

  • View Projects (org.project.read)

  • View Project history (org.project.snapshot.read)

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

collection_idstring · uuidRequired

Unique identifier for a collection

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
sortstring · enumOptional

Return projects sorted by the specified attributes

Possible values:
directionstring · enumOptional

Return projects sorted in the specified direction

Default: DESCPossible values:
target_idstring · uuid[] · max: 25Optional

Return projects that belong to the provided targets

Responses
200

Returns a list of projects from the specified collection

application/vnd.api+json
get/orgs/{org_id}/collections/{collection_id}/relationships/projects
GET /rest/orgs/{org_id}/collections/{collection_id}/relationships/projects?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "meta": {
        "imported": "2021-05-29T09:50:54.014Z",
        "issues_critical_count": 10,
        "issues_high_count": 10,
        "issues_low_count": 10,
        "issues_medium_count": 10,
        "last_tested_at": "2021-05-29T09:50:54.014Z"
      },
      "relationships": {
        "target": {
          "data": {
            "id": "331ede0a-de94-456f-b788-166caeca58bf",
            "type": "target"
          }
        }
      },
      "type": "resource"
    }
  ],
  "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"
  }
}

Remove projects from a collection

delete

Remove projects from a collection by specifying an array of project ids

Required permissions

  • Edit Collections (org.collection.edit)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

collection_idstring · uuidRequired

Unique identifier for a collection

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
204

successfully removing projects from a collection

delete/orgs/{org_id}/collections/{collection_id}/relationships/projects
DELETE /rest/orgs/{org_id}/collections/{collection_id}/relationships/projects?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 73

{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "type": "project"
    }
  ]
}

No content

Last updated

Was this helpful?