Onboard a new Customer
Invite or approve a new Customer with this in-depth tutorial using IQM's API.
About IQM Customers
Customers can be invited or signed up to the IQM platform as Workspaces or Advertisers.
- Workspaces have app access and permissions that allow them manage multiple accounts within their agency on the same platform.
- Advertisers are individually managed and may have limited permissions or app access. Insertion orders and campaigns are created at the Advertiser level.
For an overview of IQM's organization hierarchy review the IQM platform overview.
More resources
Before you begin
To create a new Customer, the following are required:
- An account on the IQM platform
- See Getting started section to create an account and request a Client ID and Client Secret
- User must have login access to the Organization and access to the Customer app
- The Organization must be a Workspace, and X-IAA-OW-ID must be that Workspace's ID. Advertiser organizations can't invite or approve Customers (the API returns 403).
Log in
POSTTo log in, send the Authorization: Basic header with your Base64-encoded Client ID and Client Secret, and send the request body as form data (application/x-www-form-urlencoded). The response contains an OAuth access token.
To find the Organization Workspace IDs that you have access to, use Get list of accessible Organizations.
For further information see OAuth token.
| Headers | |
|---|---|
Authorization string required | Basic followed by your Base64-encoded client_id:client_secret. See Sign up and authenticate. |
Content-Type string required | application/x-www-form-urlencoded. Send the request body as form data. |
| Request schema | |
|---|---|
grant_type string required | password for login. See OAuth Grant Types. |
username string required | User account email. |
password string required | User account password. |
- JSON
curl -i --location 'https://api.iqm.com/api/v3/ua/oauth/token' \
--header 'accept: application/json, text/plain, */*' \
--header 'Authorization: Basic <base64 of client_id:client_secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=user@iqm.com' \
--data-urlencode 'password=<your password>'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0...",
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIn0...",
"scope": "read write",
"token_type": "bearer",
"expires_in": 86399
}
More responses
{
"success": false,
"errorObjects": [
{
"error": "Bad Credentials or invalid grant type"
}
]
}
{
"error": "Client details are not provided."
}
Authentication
Use the following header parameters for all requests after logging in:
| Headers | |
|---|---|
Authorization string required | Bearer followed by the access_token from the login response. See Sign up and authenticate. |
X-IAA-OW-ID integer required | Organization Workspace ID header. |
Onboard a new Customer using the IQM API
This tutorial covers how to invite or approve a new Customer using the IQM API.
A new Customer can be onboarded in two different ways:
- An existing Organization can invite a Customer to the platform.
- A new Customer can sign up on the Workspace's sign-up page, and the Workspace approves them. Sign-up isn't available through the API.
Once a Customer has accepted their invitation and the onboarding process is complete other Customer actions can be performed. This tutorial covers a few examples. The rest of the possible Customer actions are documented in the Workspace API.
Invite or approve a Customer
Invite a Customer
POSTAn Organization already a part of the IQM platform can initiate an invite to create a new Organization for their Customer.
Up to 10 invites are allowed per request. An invite missing email, name, or ownerUserName, or with an invalid email, isn't sent, and its email is listed as failed in the response.
Upon invite, Customer status is invited. Once the invitation is accepted, the Customer's status is active and the onboarding process is complete.
| Request schema | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
email string required | Customer email. Must be a valid email address. | |||||||||||||
name string required | Customer name. | |||||||||||||
password string | Sets the Customer's password directly. The account is activated right away and no invitation email is sent. | |||||||||||||
ownerUserName string required | Name of the Customer Organization's owner. | |||||||||||||
verticalId integer | Vertical type ID. | |||||||||||||
logoUrl string | Logo URL. | |||||||||||||
customerOperationDetails object | Customer operations details (Workspace only). | |||||||||||||
| ||||||||||||||
customerTypeId integer | Customer type ID. |
customerPaymentTypeId integer | Customer payment type ID. |
countryId integer | Country ID. |
adOpsAssigneeUserIds array of integers | User IDs assigned by the IQM AdOps Team. |
sellerAssigneeUserIds array of integers | User IDs assigned by the client/seller team. |
labelIds array of integers | Label ID. |
Response properties
successfulEmails array of strings | Invites successfully sent to specified emails. |
failedEmails array of strings | Invites failed to send to specified emails. |
message string | Success message. Returned only when at least one invitation is sent. |
- JSON
[
{
"email": "user1@iqm.com",
"name": "ORG - 1",
"password": "password@123",
"ownerUserName": "User-1",
"verticalId": 1,
"logoUrl": "https://d3jme5si7t6llb.cloudfront.net/assets/202753/Pd7Xx26_1721991655891.png",
"customerOperationDetails": {
"customerTypeId": 2,
"customerPaymentTypeId": 2,
"countryId": 30100001,
"adOpsAssigneeUserIds": [],
"sellerAssigneeUserIds": [
7184
],
"labelIds": [
7,
8,
9
]
}
}
]
{
"success": true,
"data": {
"successfulEmails": [
"user1@iqm.com"
],
"failedEmails": [],
"message": "1 invitations sent successfully."
}
}
More responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to invite.",
"reason": "Only admin or IHB customers can invite."
}
]
}
Approve a Customer
PATCHCustomers who sign up on the Workspace's sign-up page start with a pending status. Approve the Customer and add app access.
| Request schema | |
|---|---|
owId integer | Organization Workspace ID. |
appIds string | Comma separated Application IDs to add or revoke Customer access to. |
Response properties
data string | Success message. |
- JSON
{
"owId": 134562,
"appIds": "2,5,6,7,9,10,11"
}
{
"success": true,
"data": "Customer approved successfully."
}
More responses
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to access provided customer"
}
]
}
More Customer actions
Assign Customer to user
POSTAssign a Customer to an existing user. uowIds must contain exactly one user; more than one returns a 422. You can't assign Customers to yourself or to the Organization owner (403).
| Request schema | |
|---|---|
owIds string | Comma-separated Customer Organization Workspace IDs to assign to the user. |
uowIds string | User Organization Workspace ID of the user to assign the Customers to. Only one user per request. |
Response properties
success boolean | Indicates all requested changes were made: true. If any Customer can't be assigned, success is false, errorObjects explains why, and data still lists the changes that were made. | |||||||||||
data object | Result of the assignment. | |||||||||||
| ||||||||||||
message string | Success message. Returned only when at least one change was made. |
successfulCustomerIds array of integers | Customer Organization Workspace IDs assigned to the user. |
successfulLogInAccessOwIds array of integers | Customer Organization Workspace IDs the user was given login access to. |
successfulRemoveOwIds array of integers | Customer Organization Workspace IDs removed from the user. |
successfulRemoveLogInAccessOwIds array of integers | Customer Organization Workspace IDs the user's login access was removed from. |
- JSON
{
"owIds": "170,58,167,900",
"uowIds": "166"
}
{
"success": true,
"data": {
"message": "Access has been modified successfully.",
"successfulCustomerIds": [
170,
58,
167,
900
],
"successfulLogInAccessOwIds": [],
"successfulRemoveOwIds": [],
"successfulRemoveLogInAccessOwIds": []
}
}
Add Customer app access
POSTAdd Customer access to specified apps.
| Request schema | |
|---|---|
owId integer | Organization Workspace ID. |
appIdsstring | Comma separated Application IDs to add or revoke Customer access to. |
accessLevel string optional | Gives Customer Full or Limited access to added applications. Default: Full. |
Response properties
data string | Success message. |
- JSON
{
"owId": 2,
"appIds": "1,2",
"accessLevel": "Full"
}
{
"success": true,
"data": "Application access added successfully."
}