---
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

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
