16.02.2026

How to Create Zabbix API Tokens in Zabbix 6.4 for Automation and Integrations

Zabbix is a powerful open-source monitoring solution that enables you to monitor and manage IT infrastructure. The Zabbix API allows for programmatic interaction with the Zabbix server, facilitating automation and integration. In this tutorial, we will walk you through the process of creating a Zabbix API token, which grants access to the API's functionality.


Zabbix is developed and maintained by the Zabbix team and community. Using official features such as API tokens ensures compatibility with supported versions and follows recommended security practices for monitoring and automation.

Prerequisites

Creating tokens

Access the Zabbix web interface using your preferred web browser and enter your login credentials to access the Zabbix dashboard.

Now you have two ways: you can either manage the tokens yourself or give Zabbix users the rights to create tokens for themselves.

If you want to create tokens by yourself you will need to go Administration → General → API tokens.

Here you can see through the list of the tokens created for your Zabbix, disable or enable them if needed, or check the expiration date.

Click "create API token".

Fill in the lines, hit add and you will see something like this:

Don’t forget to save the token somewhere safe, or you won’t be able to see it after the creation.

If you want the users to be able to create tokens for themselves - edit their user group permissions: Make access to API enable, also you can whitelist, or blacklist the API methods of your choosing here.

After that the user will be able to see or create his token in this menu.

Testing with cURL:

To test the API token, you can use cURL, a command-line tool for making HTTP requests.

Launch your terminal or command prompt to execute cURL commands.

Use the following cURL command template to make an API request:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_TOKEN" -d '{"jsonrpc":"2.0","method":"user.login","params":{"user":"YOUR_USERNAME","password":"YOUR_PASSWORD"},"id":1}' http://YOUR_ZABBIX_SERVER/api_jsonrpc.php

Make sure to replace the following placeholders with your actual information:

Copy and paste the constructed cURL command into your terminal or command prompt. Press Enter to execute the command.

Check the response returned by the Zabbix API. It should indicate the success or failure of your API request. You will receive something like this if everything is right:

Conclusion:

API tokens are the recommended authentication method for working with the Zabbix API in modern environments. By using API tokens instead of usernames and passwords, you improve security, simplify automation, and gain better control over access permissions.

In this guide, we covered how to create and manage API tokens in Zabbix 6.4, assign permissions for individual users or groups, and test API access using cURL. These tokens can be safely integrated into scripts, monitoring automation, CI/CD pipelines, and third-party tools without exposing sensitive credentials.

For advanced use cases, consider regularly rotating API tokens, limiting allowed API methods, and monitoring token usage to maintain a secure and reliable monitoring infrastructure.

FAQ: Zabbix API Tokens