Overview

At a glance:

Account admins can efficiently execute various bulk actions through a dedicated API. This includes adding and deleting users, as well as retrieving user permission details. The API supports the main user management features found in the UI and includes the same error verifications.

Add users in bulk

The following table details all API parameters and properties for adding new users in bulk. See schema examples below the table.

Note

  • If any of the mandatory parameters aren't entered in the API call or they're written incorrectly, the associated user isn't added. An error message is sent through the API.
  • There's a maximum limit of 20 user additions per API call.
  • There's a maximum daily limit of 20 API calls per account.
API parameterTypeMandatoryRemarks
usernameStringThe username can include letters, numbers, spaces, and the following characters:. - _ ` [ ] ( )
emailStringEnter a valid email address.
departmentString
roleStringadmin and security roles must have unrestricted access to apps, media sources, and geos.
app_idsArray: • Empty [] • Specific apps• When empty, the user has no app access • If not included in the schema, the default is access to all apps.
allow_access_to_all_future_appsBoolean: true or falseWhen choosing true, the  app_ids mustn't be limited.
media_sourcesArray:• Empty [] • Specific media sourcesWhen empty or if not included in the schema, the default is access to all media sources.
geosArray: • Empty [] • Specific geosWhen empty or if not included in the schema, the default is access to all geos.

Schema example: full user access

This schema grants user access to all apps (including future apps), and to all media sources and geos:

"email": "my_company@my_company.com ",
"username": "Demi Smith",
"department": "MC Marketing",
"role": "marketing",
"allow_access_to_all_future_apps": true,
"media_sources": [],
"geos": []

Schema example: limited user access

This schema limits user access to apps (no future apps), media sources, and geos, according to those specified in the array:

"email": "my_company@my_company.com ",
"username": "Demi Smith",
"department": "MC Marketing",
"role": "marketing",
"allow_access_to_all_future_apps": false,
"app_ids": ["my_app1", "my_app2"],
"media_sources": ["amplitude", "airship"],
"geos": ["angola", "aruba"]

Error messages

In some cases, users can't be added. The table below describes the reasons for such cases and explanations about the error messages.

Error messageDescription
Invalid email address.The format of the email address isn't correct.
This user already exists in this account.You're trying to add a user to an account in which they already exist.
Errors about adding users to multiple accounts
This user can't be added because their status is "pending" in another account.You can't add a user to an account if in another account it's in a "pending" status.
A user from an advertiser account can't be added to agency or partner accounts.Users from advertiser accounts can't be added to agency or partner accounts.
A user from an agency or a partner account can't be added to an advertiser account.Users from agency or partner accounts can't be added to advertiser accounts.
This user is in another account that doesn't currently support users in multiple accounts.Not all accounts support multiple users. You're trying to add a user from such an account.
This account doesn't currently support adding users in multiple accounts..Not all accounts support multiple users. You're trying to add a user to such an account.
This user can't be added because they're in an account that uses SSO.Accounts with SSO authentication don't support multiple users. You're trying to add a user from such an account.
This user can't be added because this account uses SSO.Accounts with SSO authentication don't support multiple users. You're trying to add a user to such an account.
This user can't be added because they're in an account that uses 2FA.Accounts with 2FA authentication don't support multiple users. You're trying to add a user from such an account.
This user can't be added because this account uses 2FA.Accounts with 2FA authentication don't support multiple users. You're trying to add a user to such an account.
Mistakes in the API parameters
Invalid characters were used in the username.The username can include letters, numbers, spaces, and the following characters only: .-_`
The username exceeded the 100-character limit.The username can contain up to 100 characters.
The role was either misspelled or doesn’t exist.The role that was entered either doesn't exist in the list of roles in your account, or it was misspelled.
One or more app IDs were either misspelled or don’t exist in your account.You've entered one or more app IDs that either don't exist in your account or they were misspelled.
"Allow access to all future apps" can be "true" only when there is access to all app IDs.To enable users access to all future apps, you must grant them access to all apps in the account.
One or more media sources were either misspelled or don’t exist.You've entered one or more media sources that either don't exist in the Partner Marketplace or were misspelled.
One or more geos were either misspelled or don’t exist.You've entered one or more geo that either isn't in the platform or was misspelled.
Admin and Security roles must have unrestricted access to apps, media sources, and geos. These fields must be empty.Admin and Security roles must have unrestricted access to all apps, all media sources, and all geos. You were trying to add this role with restrictions on the above.
Invalid field scheme.One of the fields in the scheme doesn't follow the required format. See scheme examples.
Other issues
Something went wrong. Your request couldn’t be completed.There was a technical issue that prevented the request from being completed.
There was a problem with permissions for this account.There was an issue with the account that prevented the request from being completed.
Exceeded the limit of adding 20 users in a single API call.An API call can contain up to 20 user additions.

Get users API

Use the Get API to retrieve data on user roles and permissions in bulk.
Response example:
“users”: [
{
“username”: “Dan Smith”,
“email”: “[email protected]”,
“role”: “admin”,
“apps”: “All & future”,
“media_sources”: “All”,
“geos”: “All”,
“last_login”: “Apr 15, 2024”
}
]

Delete users in bulk

Use the DELETE API to delete users in bulk. Include in the URL path a list of user emails to delete, separated by commas.
Error messages:

Error messageDescription
Invalid email addressThe format of the email address isn’t correct.
The email doesn’t existThe email address was either misspelled or doesn’t exist in the account.
Invalid inputYour request didn’t include any email addresses.
Can’t delete account ownerAn account owner can’t be deleted. You can refer to the documentation about https://support.appsflyer.com/hc/en-us/articles/4409128270481-User-management#changing-the-account-owner.
Can’t delete your own userUsers cannot delete themselves