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

PersonalAccessToken

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

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

List personal access tokens

get

List personal access tokens

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Query parameters
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
starting_afterstringOptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
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

Return the personal access tokens associated with the calling principal

application/vnd.api+json
get/self/personal_access_tokens
GET /rest/self/personal_access_tokens?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "attributes": {
        "created_at": "2021-07-01T00:00:00Z",
        "expires_at": "2021-07-01T00:00:00Z",
        "label": "my token",
        "tenant_id": "550e8400-e29b-41d4-a716-446655440000"
      },
      "id": "01HSBP9DKDK39KWZQV84PSPRHY",
      "type": "personal_access_token"
    }
  ],
  "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"
  },
  "meta": {
    "max_active_tokens": 1,
    "max_expiry_days": 1
  }
}

Deletes a personal access token

delete

Delete a personal access token

Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
personal_access_token_idstring · ulidRequired

The personal access token id

Example: 01HSBP9DKDK39KWZQV84PSPRHY
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/self/personal_access_tokens/{personal_access_token_id}
DELETE /rest/self/personal_access_tokens/{personal_access_token_id}?version=2026-03-25 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?