Authorization header as a Bearer token.
Create an API key
1
Open the API key screen
Log in to the Admina admin console and open Settings > API Keys.
2
Generate an API key
Click Generate a new API key.
In the “Generate a new API key” dialog, enter a name that describes the key’s purpose in API Key Name, and click Generate.
3
Save the API key
Copy the API key that appears, and save it in a secure place.
The API key appears only once, when you generate it.
You can’t view it later on the API Keys screen.
Each organization can have up to 20 API keys.
API key permissions
Login users with permission to create API keys, such as those with the Admin role, can create API keys. You can’t limit the endpoints an API key can use. Any API key can use the entire IT Management API for its organization, regardless of the creator’s role. Each API key is tied to the login user who created it. If that login user leaves the organization or is deleted, the API key stops working. Rate limits are also counted per login user who created the key (see Rate limits).Add the API key to requests
Set the API key in theAuthorization header of every request.
Find your organization ID
Most endpoints include your organization ID (organizationId) in the path.
Your organization ID appears in Organization ID on the Settings > API Keys screen.
Click Copy next to it to copy the ID.
If you specify the ID of an organization other than the one the API key belongs to, the request fails with 401.
Keep your API key secure
- Don’t write API keys in source code. Store them in environment variables or a secrets management service.
- Create a separate API key for each system or purpose, and use API Key Name to show what each key is for.
- API keys don’t expire. Delete API keys you no longer need from the API Keys screen.
- Use Last Activity on the API Keys screen to find keys that haven’t been used for a while.
- Have a login user who will stay in the organization create keys for long-term use. If the creator leaves the organization, the key stops working.
Authentication errors
If authentication fails, the API returns one of the following errors. For the response format, see Errors.api_key_creator_removed, create a new API key as a login user who belongs to the organization.
