Securing Zammad API access with tokens

Zammad's REST API can read and change tickets, users and settings, so every integration needs a scoped, expiring credential under its own identity. This page covers the token options, the setup order and the operational routine that keeps them tight.

On this page

Why securing Zammad API access with tokens comes before the first integration

The fix is scoped personal access tokens, issued to dedicated users, with password access switched off for API calls. Most integrations that touch a Zammad helpdesk, such as ticket sync with another system, reporting jobs or a chat bot, need to read or change tickets, users and organizations through the REST API. In many production helpdesks the shortcut is a shared admin login or a long-lived credential that nobody owns, and that credential can then do far more than the integration needs. A leaked token or script with broad rights exposes every ticket, customer record and admin setting it can reach, and nothing in the logs will tell the reader which integration made a given change. The time to close this gap is before the first integration goes live, because retrofitting it later means finding every script and service that already depends on the old credential.

The REST API exposes most of what agents and administrators do in the browser, so the credential behind it sets the real blast radius. Teams should decide, for each integration, which objects it must read or write, which roles and group permissions its user needs, how long the credential should live, and who rotates it when a person leaves or a server is rebuilt. Those decisions also determine whether a service account can be used safely at all. The exact token options, expiry settings and password-access controls depend on the Zammad version in use, so confirm them against the release notes for that version before writing the policy. The Zammad releases page is the place to check which release is current and which security fixes apply to the line you run.

Before the first integration, the reader should inventory every existing credential that calls the API, record the user behind it and its permissions, and confirm whether the team's Zammad version lets it disable password-based API access. Any integration still using an administrator login should be scheduled for a dedicated user and token in a test environment first. This work is easier to do now, while only a few scripts depend on the API, and it gives the reader a clear audit trail of which integration holds which access from day one.

Token and authentication options for Zammad integrations and when each fits

This table compares the four ways an integration can reach Zammad's REST API, with the fit, main risk, lifetime control and admin settings to confirm for each. Read it by matching your integration to a row, then checking the lifetime and permission settings in your own Zammad version before you issue anything.

OptionBest fitMain riskLifetime control and what to confirm
Personal access token for a named userA person's own script or tool that should act with that person's permissionsToken inherits all of the user's rights and stays valid if the person changes roleSet scope and expiry when creating the token; confirm the permission options and expiry behavior in the Zammad admin documentation
Dedicated service user with its own tokenScheduled jobs, monitoring hooks or connectors that run without a person behind themOver-permissioned service accounts become a broad target if the token leaksAssign only the groups and roles the integration needs; confirm how service accounts are created and whether they consume agent licenses
OAuth application for third-party appsThird-party apps that act on behalf of users who sign in and approve accessConsent can be granted more broadly than needed, and the app holds ongoing accessReview granted applications and their scopes regularly; confirm the OAuth settings, token lifetimes and how to revoke access in the admin documentation
HTTP basic authentication with passwordsLegacy clients that cannot send tokens; treat as a temporary exception onlyPasswords are reused, rarely rotated and bypass 2FA-oriented controls in many setupsNo token expiry; confirm whether password access can be turned off for the API and plan a move to tokens before disabling it

How to set up scoped API tokens in Zammad step by step

This sequence replaces shared administrator credentials with a dedicated service user and narrowly scoped, expiring tokens for each integration, and confirms that each token reaches only the endpoints it needs. The result is an integration access model you can review, rotate and revoke one integration at a time.

  1. Inventory each integration and its required actions

    List every system that calls the Zammad REST API, such as a monitoring job, a ticket sync script or a reporting tool. For each one, record the endpoints it uses, the HTTP methods it needs (read, create, update), the objects it touches (tickets, users, organizations) and the groups whose tickets it must see. Ask the integration owner to confirm this list from the code or configuration, not from memory. The step is done when every integration has a written list of actions and no integration is marked as needing administrator rights without a stated reason.

  2. Create a dedicated service user per integration

    In the Zammad admin interface, create one agent or user account for each integration, named after the integration so audit entries are easy to read. Do not reuse a personal account or an existing administrator. Assign only the role and group permissions that match the inventory from the previous step. Check the result by signing in as the service user in a test session and confirming that it can see the groups it needs and no others. Record the owner of each service account so someone is accountable for it.

  3. Create a token with the narrowest permissions

    Open the service user's profile and create a personal access token. Give it only the permission scopes that correspond to the actions in the inventory, and set an expiry date so the token cannot run indefinitely. Copy the token value when it is shown, because it is not displayed again. Confirm the scopes and expiry on the token list before you leave the page. The step is done when the token exists with a named purpose, a stated expiry and no scope beyond the integration's list.

  4. Store the token in the integration's secret store

    Place the token in the secret mechanism that the integration already uses, such as a secrets manager, an encrypted CI variable or a protected environment file with restricted file permissions. Remove any copy from tickets, chat threads, wikis, shell history and source repositories. Confirm that only the integration's runtime identity can read the secret. The step is done when the token is absent from every location except the secret store and the integration can read it at runtime.

  5. Test that the token cannot reach other endpoints

    Call the API with the token for an action the scope allows, and confirm it succeeds. Then call it for an endpoint outside the scope, such as a user administration route or a group the service user should not see, and confirm that Zammad refuses it. Repeat the refused call with no token and with a token from a different integration. Record each request and response in your test notes. The step is done when every allowed call succeeds and every out-of-scope call fails, because a failing out-of-scope call is the evidence that the scope is working.

  6. Turn off password access for API calls

    Where your Zammad version lets you restrict API authentication, disable password-based API access for integrations so that only tokens, or an OAuth application where you use one, are accepted. Confirm the setting name and its behavior in the Zammad admin documentation for your installed version before changing it, because the available options depend on the release. Test by sending one API call with the service user's password, which should fail, and one call with the token, which should succeed. The step is done when the password call is refused and the token call still works.

  7. Document ownership and the rotation date

    Write a short register entry for each token that names the integration, the service user, the scopes, the expiry date, the secret location and the person responsible for rotation. Set a reminder before each expiry so that replacement happens in a planned window rather than after a failure. Ask your security team to confirm that the register matches the admin interface. The step is done when every active token has a complete register entry and a named owner.

How an integration request reaches Zammad's API through a token

The request starts in the integration network, where the integration service holds a personal access token or a dedicated service user's token. It crosses the trust boundary into the Zammad network through the reverse proxy, which forwards it to the Zammad application. Zammad checks the token's scope, expiry, the user's role and group permissions before any query reaches PostgreSQL. A denied request stops at the application and is never executed, so check the rejection in the logs as well as the data returned.

Token-authenticated API request path, with the trust boundary and the denial point marked.

Security risks of Zammad API tokens and the controls that reduce them

A Zammad API token carries the permissions of the user who created it, so its security depends on who owns it, what it can reach, how long it lives and where it is stored. The cards below pair each common failure with the control that reduces it, so you can review your current integrations against the same list.

Over-scoped tokens inherited from an administrator

A token created by an administrator acts with that administrator's rights, which can include system settings, user management and data across every group. Anyone who obtains the token inherits all of it. Use a dedicated service user with only the roles and group access the integration needs, then confirm the token cannot reach admin screens or groups outside its purpose by testing it with a few representative API calls.

Zammad security docs

Tokens with no expiry

A token that never expires stays valid long after the integration changes, the project ends or the developer who set it up moves on. Each token should have a defined expiry matched to its purpose, and a named owner who is responsible for renewing it. Ask whether your Zammad version lets you set expiry on every token type you plan to use, and record the expiry date in your integration inventory.

Tokens stored in code or logs

Tokens pasted into scripts, configuration files committed to version control, CI variables visible to too many people, or request logs that record authorization headers all expose the same credential. Keep tokens in your secrets manager, inject them at runtime, and configure proxies and application logging so Authorization headers are not written in plain text. Scan repositories and CI logs for the token prefix you use before going live.

Password-based API calls that bypass 2FA

Basic authentication with a username and password lets a script act as a user without the second factor that protects the web login. If integrations can authenticate with passwords, a stolen password becomes API access. Turn off password access for API use in your Zammad settings, and confirm with a test request that a password-only call is refused while the token call succeeds.

Shared tokens across several integrations

When one token serves a ticketing sync, a reporting job and a chat bot, you cannot revoke one without breaking the others, and logs cannot show which system made a change. Issue one token per integration, name each token after its system and purpose, and record which team owns it. Separate tokens also make rotation a single, scoped task instead of a coordinated outage.

Tokens left active after offboarding

Tokens often outlive the person who created them, especially when the creator is a named employee rather than a service user. Deactivating the account does not always answer the question of which tokens still exist, so review tokens during every offboarding and rotation cycle. Make revocation part of your leaver checklist, and ask your team to confirm how Zammad handles tokens tied to an inactive user before you rely on it.

How to rotate Zammad API tokens without breaking integrations

Rotate tokens by overlap, not by replacement. The safe routine is to issue a replacement personal access token while the old one is still valid, update the integration's stored secret, confirm a successful API call with the new token, and only then revoke the old one. Each step gives you a way back if something in the integration reads the credential from a place you did not expect, such as a scheduled job, a webhook receiver or a secrets store that caches values. Record the change in your own change log with the token's name, the owning integration, the permissions granted, the new expiry date and the date the old token was revoked. Keep that record outside Zammad so that it survives an admin account being removed.

Set an interval your team will actually keep. Choose a rotation cadence based on how many integrations hold tokens, who maintains them and how often their owners change, and write it down as your own internal policy. A rotation schedule that is skipped twice is worse than a longer one that is followed. Review the token list under the admin API settings as part of the same routine, and remove tokens belonging to integrations that no longer exist. For emergencies, such as a token pasted into a ticket or a departed employee's laptop, have a runbook that revokes first and rebuilds second: revoke the affected token, restore the integration with a new token from a secure channel, then check the audit log for calls made with the compromised credential. Confirm with your Zammad version's documentation how token activity is logged before you rely on that check.

Limits to confirm before relying on token controls in your environment

The token controls described on this page depend on what your installed Zammad version actually provides. Check each item below against the Zammad releases page and the admin documentation for your own release line, rather than assuming a feature exists because a neighboring version has it.

Token permissions and expiry options

Confirm which permission scopes you can assign to a personal access token and whether an expiry date is required or optional in your version. Create a test token with the narrowest scope your integration needs, then call an endpoint outside that scope to confirm it is refused. If expiry cannot be set, plan a manual rotation schedule and record it in your change calendar.

Admin security docs

Disabling password access for the API

Find out whether your version lets you turn off password-based authentication for API calls, so that only tokens or OAuth work. If the setting is missing or only partly applies, treat any integration that still sends a username and password as an open path. Test it with a plain basic authentication request from an account that has a known password.

How audit logging records API actions

Confirm whether API calls made with a token appear in the admin audit log, and whether the entry shows which token or service user made the change. Make a harmless test change through the API and check the log entry. Without that attribution, you cannot tell an integration action from a staff action during an investigation.

OAuth application registration and scope

Check how OAuth applications are registered in your version, who may create them, and which scopes they can request. Review every registered application and remove any that no longer have an owner. Confirm that a revoked application stops working immediately, since OAuth clients often hold longer-lived access than a personal token.

Security fix coverage for your release line

Compare your installed version with the Zammad releases page to see whether your release line has received recent security fixes. Zammad has published security releases for more than one line in parallel, so do not assume that a newer minor version is the only one that matters. If your line has no recent fix, plan an upgrade before you depend on the token controls for external access.

Zammad releases

Questions teams ask about securing Zammad API access

How long does it take to secure Zammad API access?

The duration depends mainly on how many integrations use the API and how many of them authenticate with a password today. A team with a short list of well-understood integrations can move each one to a personal access token or dedicated service user in a few focused sessions, while an environment with many scripts, reporting jobs and third-party connectors needs more time for discovery and testing. No duration is fixed by the product. Ask any partner for a timeline that is tied to a written inventory of integrations, the number of environments to test in, and the change window you have for each cutover. Treat any figure given without that inventory as a guess.

Can our own team secure Zammad API access without a partner?

Yes, if you have an administrator who knows Zammad's permission model and someone who owns each integration. The core tasks are creating personal access tokens with limited permissions and expiry dates, replacing password-based calls, creating dedicated service users where a system needs a steady identity, and documenting rotation. The harder part is usually finding every caller of the API, including scripts nobody remembers, so an internal team should start with log review and a conversation with each system owner. A partner adds value mostly when the environment is large, when the integrations are custom, or when you want an independent check before a customer or auditor review.

What do we need to provide before work on Zammad API access starts?

Expect to provide three things: an inventory of every system that calls the Zammad API, admin access to the instance with the right to create users, groups and tokens, and a staging copy of Zammad where integrations can be tested before production changes. The inventory should list the owner, the purpose, the account used today, the endpoints called and the expected frequency. Admin access should be granted through a named account with two-factor authentication. A staging copy matters because turning off password access can break a quiet integration, and you want to find that before users do. Confirm who signs off on each cutover.

What does a partner quote for API token hardening depend on?

A quote should follow from a written scope, not from a general description of Zammad. The main drivers are the number of integrations and their complexity, whether any are custom or depend on a third-party product, how many environments need testing, whether OAuth applications are in scope, and whether the work includes documentation and a rotation procedure your team can run afterwards. Ask for the deliverables in writing: an integration inventory, the token and service user design, a cutover plan, a rollback plan and the rotation runbook. If you also want vendor support, Zammad lists self-hosted support subscriptions named Business at 2,999 EUR per year, Enterprise at 5,999 EUR per year and Corporation at 9,999 EUR per year on its pricing page. Those cover vendor support, not the work described here.

Will existing integrations break when password access is turned off?

They can, and that is the main operational risk of this work. Any script, middleware or connector that authenticates with a username and password will fail once password-based API access is disabled or that account is changed. The safe approach is to find those callers first from logs and the integration inventory, move each one to a personal access token or a dedicated service user with only the permissions it needs, test it in staging, and then switch off the old method. Keep a dated change record for each integration so a failed job can be traced quickly. Some integrations may not let you change the credential easily, so confirm with each vendor how they store and update API credentials before you plan the cutover.

How often should Zammad API tokens be reviewed and rotated?

Review tokens on a fixed schedule set by your security policy, and rotate them when the owner changes, when an integration is retired, or when a credential may have been exposed. Each token should have an expiry date and a named owner, so that expired or orphaned tokens are visible during a regular review. Check which tokens are still in use against the audit and access logs, remove those with no recent activity, and confirm that the permissions still match the job. Write the procedure down so that someone other than the original author can run it. Zammad's own documentation and release notes are the place to confirm how token management appears in the version you run.

Do dedicated service users or OAuth applications work better for integrations?

Neither is always better, and the right choice depends on what the integration does and who it acts for. A dedicated service user suits background jobs and system-to-system calls that should not be tied to a person, provided its role and group permissions are narrow and it cannot sign in interactively. OAuth applications suit cases where a user authorizes a third-party app to act on their behalf, because access is granted and revoked per user. Personal access tokens work for a single owner's scripts with a clear expiry. Decide per integration, record the reason, and confirm with your administrator how each option is configured in the Zammad release you run.

What DeployOpen reviews when hardening Zammad API access

DeployOpen starts by inventorying every system that calls the Zammad REST API. The inventory covers ticket sync jobs, reporting tools, monitoring checks, chat and form connectors, and any scripts an administrator runs by hand. For each caller, the review records what it reads and writes, which Zammad objects it touches, how often it runs, and who owns it. This is the input for every later decision, because a token cannot be scoped sensibly until the team knows what the integration actually needs. Most unmanaged setups turn up callers nobody remembers, and those are often the ones holding broad permissions.

With the inventory agreed, DeployOpen works with the client's Zammad and identity administrators to define dedicated service users, one per integration or per trust boundary, and to set the roles and group permissions each service user receives. The team then decides which callers get personal access tokens with an expiry date, which need an OAuth application instead, and where password-based API access should be switched off. Token rotation is agreed as a written procedure: who issues a replacement, where the new value is stored, how the old one is revoked, and how the change is confirmed in the audit trail. The client's administrators make the final calls on every permission, since they own the production system.

The security review then tests API access the way an attacker or a misconfigured integration would. This covers whether a token can reach objects outside its intended group, whether expired or revoked tokens are refused, whether password access is actually closed, and whether service user activity is traceable. Findings come with specific fixes and a retest. Testing of the API and tokens as part of an external security assessment is covered on the penetration testing page for self-hosted Zammad. All of this work is scoped in writing before it starts, so the client knows which callers, environments and test cases are included.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.