Create an enrollment API key
- Base URL
-
https://{kibana_url}
-
POST
/api/fleet/enrollment_api_keys
Auth
Create an enrollment API key for a given agent policy.
-
Privileges
fleet-agents-all
-
A required header to protect against CSRF attacks
-
expiration
string · max length: 20
-
The expiration time for the enrollment token, expressed as a duration (for example, 30d, 24h, 90m). By default, enrollment tokens never expire.
-
policy_id
string
required
-
action
enum
required
-
Values:
created
-
item
object
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.
-
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.
-
attributes
object
required