Enrollment via manager API

The Wazuh manager API allows users to make an agent enrollment request to the Wazuh manager. This request returns a unique key for the agent, which must be manually imported to the agent.

How it works

The flow of an agent being enrolled via API is as follows:

  1. The user sends an API request with the manager API credentials to generate an authorization token (a JSON Web Token).

  2. The user sends an API request with the authorization token to the Wazuh manager. This request enrolls the agent and gets the agent key.

  3. On the agent endpoint, the user imports the key to the agent.

  4. The user configures the Wazuh manager IP address on the agent.

  5. The user restarts the agent and then the connection to the manager is established.

In this document, you will find the following information: