---
title: "Get all access tokens"
method: GET
path: "/api/v2/personal_access_tokens"
tags: ["Key Management"]
---

# Get all access tokens

`GET /api/v2/personal_access_tokens`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/personal_access_tokens`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

List all access tokens for the organization.

## Query parameters

- `page[size]` integer
- `page[number]` integer
- `sort` 'name' | '-name' | 'created_at' | '-created_at' | 'expires_at' | '-expires_at' | 'last_used_at' | '-last_used_at': Sorting options
- `filter` string
- `filter[owned_by]` string[]

## Response `200`

OK

- ListPersonalAccessTokensResponse: Response for a list of access tokens. Includes both personal and service access tokens.
  - `data` AccessTokenListItem[]: Array of access tokens. Includes both personal and service access tokens.
    - `attributes` PersonalAccessTokenAttributes: Attributes of an access token.
      - `created_at` string, date-time: Creation date of the access token.
      - `expires_at` string, date-time, nullable: Expiration date of the access token.
      - `last_used_at` string, date-time, nullable: Date the access token was last used.
      - `modified_at` string, date-time, nullable: Date of last modification of the access token.
      - `name` string: Name of the access token.
      - `public_portion` string: The public portion of the access token.
      - `scopes` string[]: Array of scopes granted to the access token.
    - `id` string: ID of the access token.
    - `relationships` AccessTokenListItemRelationships: Resources related to the access token entry in the mixed list response.
      - `owned_by` RelationshipToAccessTokenOwner: Relationship to the access token's owner.
        - `data` RelationshipToAccessTokenOwnerData, required: Relationship to the access token's owner.
          - `id` string, required: A unique identifier that represents the owner.
          - `type` 'users' | 'service_account', required: Owner resource type. Either a user or a service account.
    - `type` 'personal_access_tokens' | 'service_access_tokens': Resource type returned by the access tokens list endpoint. Includes both personal and service access tokens.
  - `meta` PersonalAccessTokenResponseMeta: Additional information related to the access token response.
    - `page` PersonalAccessTokenResponseMetaPage: Pagination information.
      - `total_filtered_count` integer: Total filtered access token count.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
