Creating API keys in the management environment
With an API key in your management environment (a partner key), you can manage all your accounts via the API using a single key. You set the permissions for each key yourself. If you are looking for a key for a single individual account, please read Creating an API key.
API keys in the management environment are not enabled by default. Please contact the helpdesk to request access. Only administrators of the management environment can see the ‘API keys’ section.
Creating a new API key
You can create a maximum of 10 keys per management environment.
Enter a name and description
Under ‘Name’, enter a name. Under ‘Description’, you can enter additional remarks.
Choose the permissions
Under ‘Permissions’, tick which API calls the key is allowed to make. Nothing is ticked by default; without any ticks, the key cannot do anything yet.
Confirm and save
Enter your password and click ‘Save’. If you log in with Single Sign-On (SSO), you do not need to enter a password.
If you lose a key, you will not be able to view it again. In that case, create a new key and delete the old one.
Which permissions can you grant to a key?
A key can only make the API calls for which the permission is ticked. The permissions are divided into groups, such as subscribers, campaigns, and automations. The ‘Partner keys only’ group includes the permission to retrieve the partner’s accounts.
If your integration makes a call for which the permission is not enabled, the API will return a 403 error message containing the missing permission. Some calls never work with a partner key, such as editing the account settings.
Editing, blocking, or deleting a key
In the overview, click ‘Details’ next to a key to edit it:
- Edit the name, description, or permissions and click ‘Save’.
- Tick ‘Block this key’ and click ‘Save’ to temporarily disable the key. The key will stop working until you remove the tick.
- Click ‘Delete’ to permanently remove the key. Once you confirm, integrations that use this key will no longer work.
Using the key in the API
When using authentication with HTTP Basic Auth, you send the partner key as the username and the account_id of the account as the password:
If you want to retrieve an overview of your accounts and their account_id, call the endpoint for partner accounts with an empty password (-u KEY:). For this, your key does need the permission to retrieve the partner’s accounts:
If the API returns a 401 error message, the account_id is missing, the account_id is incorrect, the account belongs to another partner, or the key or partner is blocked.