---
title: "Get enrollment API keys"
method: GET
path: "/api/fleet/enrollment_api_keys"
tags: ["Fleet enrollment API keys"]
---

# Get enrollment API keys

`GET /api/fleet/enrollment_api_keys`

**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/enrollment_api_keys</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

List all enrollment API keys.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup.

## Query parameters

- `page` number
- `perPage` number
- `kuery` string

## Response `200`

Successful response

- KibanaHTTPAPIsGetEnrollmentApiKeysResponse
  - `items` KibanaHTTPAPIsEnrollmentApiKey[], required
    - `active` boolean, required — When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.
    - `api_key` string, required — The enrollment API key (token) used for enrolling Elastic Agents.
    - `api_key_id` string, required — The ID of the API key in the Security API.
    - `created_at` string, required
    - `expire_at` string — The expiration date of the enrollment token as an ISO 8601 date string. Absent when the token never expires.
    - `hidden` boolean
    - `id` string, required
    - `name` string — The name of the enrollment API key.
    - `policy_id` string — The ID of the agent policy the Elastic Agent will be enrolled in.
  - `list` KibanaHTTPAPIsEnrollmentApiKey[], required
    - `active` boolean, required — When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.
    - `api_key` string, required — The enrollment API key (token) used for enrolling Elastic Agents.
    - `api_key_id` string, required — The ID of the API key in the Security API.
    - `created_at` string, required
    - `expire_at` string — The expiration date of the enrollment token as an ISO 8601 date string. Absent when the token never expires.
    - `hidden` boolean
    - `id` string, required
    - `name` string — The name of the enrollment API key.
    - `policy_id` string — The ID of the agent policy the Elastic Agent will be enrolled in.
  - `page` number, required
  - `perPage` number, required
  - `total` number, required

## Other responses

- `400` — Bad Request

## Changes

- **2026-07-30** `607cb6954f14` — 2 info
  - added the optional property `items/items/expire_at` to the response with the `200` status
  - added the optional property `list/items/expire_at` to the response with the `200` status

[Change history](https://skmtc.dev/elastic/apis/kibana-apis/changes/api/fleet/enrollment_api_keys/get.md)

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/elastic/kibana-apis/revisions/d3fa2d005f9b/schema)
