Skip to main content

User Management API

Overview

With the User Management API you can perform registration operations such as signing up, logging in, and other profile configurations.

This page will go over the common endpoints associated with user management.

Learn more about User Profiles with our Help Center articles.

Authentication

Use the following header parameters for all requests:

Headers
Authentication
string required
Authentication bearer token
See Authentication Guide
X-IAA-OW-ID
integer required
Organization Worskpace ID Header

Send User Invitation

POST /api/v3/ua/user/invite

Any customer or organization can send invitations to one or more users by providing their names and emails.

Request Schema
email
string
User's email
name
string
User's name
Request Sample
{
"email": "shraddha.p@iqm.com",
"name": "Shradda Patel"
}
Response 200
{
"success": true,
"data": "1 invitations sent successfully."
}

Validate User Invite

POST /api/v3/ua/invite/validate

The invited user will receive an email with a link and a hash which can be validated.

Request Schema
inviteHash
string
Unique invite hash sent to invited user
Request Sample
{
"inviteHash": "8HQfsQcychjhvCmuuiFvVCIgqq9cJG/gh6HgmPZXxGE4od7a7tsMmh/O9+ia2Lw0FOelX3h8jTKJXR+0hUAkGXYA0cIITS13BxyrWoeBmRTnWTKxHtS+Ff41POwt/yDMY2iHXUsG86ehmWeeIi3HNMikhH5yY6BvNFnEfxq3zIdiouD3Fp/loPO9qazxU1qxZvNOOv8FZEZTzORVnJ8+ADjyZ/Zjs1dNhSFE"
}
Response 200
{
"success": true,
"data": {
"isExpired": true
}
}
More Response Samples
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Provided invitation has is incorrect.",
"field": "inviteHash"
}
]
}

User Sign-Up

POST /api/v3/ua/sign-up

A user/customer can sign up and create a password to access the API.

Request Schema
email
string
User's email
password
string
User's password
Request Sample
{
"email": "kartik.g@iqm.com",
"password": "123456"
}
Response 200
{
"success": true,
"data": {
"access_token": "d90fa7de-534c-4652-ad8f-c4f6f70461ac",
"refresh_token": "2e379c6f-959d-498f-8319-ff13ebef6bfe",
"scope": "read write",
"token_type": "bearer",
"expires_in": 35999
}
}
More Response Samples
Response 403
{
"success": false,
"errorObjects": [
{
"error": "User is not allowed to create a password.",
"reason": "User is not invited or invitation is processed or invitation is expired."
}
]
}

Login

POST /api/v3/ua/login

Once the user/customer logs in, the API will send an OAuth compliant response with OW ID which can be used for further API communications.

Request Schema
grantType
string
OAuth Grant Types
email
string
User's email
password
string
User's password
Request Sample
{
"grantType": "password",
"email": "pratik.t+ihp@iqm.com",
"password": "123456"
}
Response 200
{
"success": true,
"data": {
"access_token": "106adb25-37b0-4cab-8381-d682fe7cc3c8",
"refresh_token": "eac4c1f6-781e-4b04-baff-9c2e415d1f64",
"scope": "read write",
"token_type": "bearer",
"expires_in": 35999,
"owId": 200001
}
}
More Response Samples
Response 400
{
"success": false,
"data": {
"status": "On Hold",
"reason": "The particular account is kept on hold due to missed payment dates for last 3 months.",
"supportEmail": "support@iqm.com"
},
"errorObjects": [
{
"error": "User is not allowed to access provided customer",
"reason": "User is not associated with any active organization."
}
]
}
Response 403
{
"success": false,
"errorObjects": [
{
"error": "User doesn't exist or user is not allowed to provided workspace."
}
]
}

User Logout

POST /api/v3/ua/logout

Log a user out from the API.

Response 200
{
"success": true,
"data": "User logged out successfully."
}

Change Password

POST /api/v3/ua/user/update-password

Update a user's password.

Request Schema
email
string
User's email
password
string
User's password
Request Sample
{
"email": "kartik.g@iqm.com",
"password": "123456"
}
Response 200
{
"success": true,
"data": "Password changed successfully."
}
More Response Samples
Response 403
{
"success": true,
"data": {
"invalidReason": "Reset password link either not valid or it is already processed.",
"isValid": false
}
}

Reset Password Email

POST /api/v3/ua/user/reset-password

Send a link to reset a user's password to a specified email.

Request Schema
email
string
User's email
Request Sample
{
"email": "kartik@iqm.com"
}

Response 200

{
"success": true,
"data": "Email with reset password link sent successfully."
}
More Response Samples
Response 404
{
"success": false,
"errorObjects": [
{
"error": "The email is not available in the system."
}
]
}

Update User Profile

PATCH /api/v3/ua/user/update-profile

Update a user's profile display name and avatar.

Request Schema
displayName
string
User Name
userAvatar
string
If removeUserProfile set to true, can remain null, otherwise: Image file uploaded for profile
removeUserProfile
boolean
default: false
To remove profile image true
Response 200
{
"success": true,
"data": {
"userAvatar": "https://iqm-web-assets-c92d6b6cbde1-stage.s3.amazonaws.com/user-profile/444.jpg",
"message": "Profile updated successfully."
}
}
More Response Samples
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Profile image should not be more than 3 MB"
}
]
}

Get List of Users

GET /api/v3/ua/users/list

Get a list of users and details for a given workspace ID.

Query Parameters
status
string
Status of user
searchField
string
Search results by keyword
limit
integer
Maximum number of entries returned, default: 10
pageNo
integer
Page number for the data, default: 1
sortBy
string
Sorts by ascending (+) or descending (-), default: +displayName
Resource Properties
userId
integer
Unique user ID
firstName
string
User's first name
lastName
string
User's last name
email
string
User's email
displayName
string
User's display name
status
string
User's status
statusId
integer
Status ID
userAvatar
string
Image file uploaded for profile
createdAt
integer
Unix timestamp in Milliseconds when account was created
uowId
integer
User Organization Workspace ID
customersCount
integer
Count of customers assigned to user
organizationName
string
Organization associated with user
invitedOn
integer
Unix timestamp in Milliseconds when user was invited to create account
isOrganizationOwnerUser
boolean
User is owner of organization (true) or not (false)
isModificationAllowed
boolean
User is allowed to modify (true) or not (false)
invitedByUserName
string
Name of user that invited user
invitedByUserEmail
string
Email of user that invited user
isAssignActionAllowed
boolean
User is allowed to assign (true) or not (false)
Response 200
{
"success": true,
"data": {
"data": [
{
"userId": 7130,
"firstName": "sample adv user -2",
"lastName": "2",
"email": "sample-user@iqm.com",
"displayName": "sample adv user - 2",
"status": "active",
"statusId": 1,
"userAvatar": "https://iqm-web-assets-c92d6b6cbde1-stage.s3.amazonaws.com/avatar/K2.png",
"createdAt": 1705452608000,
"uowId": 119592,
"customersCount": 0,
"organizationName": "Adv Acc 1",
"invitedOn": 1705452608000,
"isOrganizationOwnerUser": false,
"isModificationAllowed": true,
"invitedByUserName": "User 2",
"invitedByUserEmail": "user2@iqm.com",
"isAssignActionAllowed": true
},
{
"userId": 7131,
"firstName": "sample-adv-user-3",
"email": "sample-user1@iqm.com",
"displayName": "sample-adv-user-3",
"status": "invited",
"statusId": 3,
"userAvatar": "https://iqm-web-assets-c92d6b6cbde1-stage.s3.amazonaws.com/avatar/KH.png",
"createdAt": 1705466349000,
"uowId": 119595,
"customersCount": 0,
"organizationName": " Adv Acc",
"invitedOn": 1705466349000,
"isOrganizationOwnerUser": false,
"isModificationAllowed": true,
"invitedByUserName": "User 1",
"invitedByUserEmail": "user1@iqm.com",
"isAssignActionAllowed": true
},
],
"totalRecords": 6,
"filteredRecords": 2
}
}

User App Access List

GET /api/v3/ua/user/applications/list

See what applications a user has access to, use query parameters to filter results.

Query Parameters
uowId
integer
User Organization Workspace ID
searchField
string
Search results by keyword
limit
integer
Maximum number of entries returned, default: 10
pageNo
integer
Page number for the data, default: 1
sortBy
string
Sorts by ascending (+) or descending (-), default: +appName
Response 200
{
"success": true,
"data": {
"data": [
{
"appId": 7,
"appName": "Campaigns",
"appOwner": "IQM Corporation",
"appType": "Default App"
},
{
"appId": 11,
"appName": "Conversions",
"appOwner": "IQM Corporation",
"appType": "Default App"
}
],
"totalRecords": 2,
"filteredRecords": 2
}
}
More Response Samples
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Invalid sortBy value."
}
]
}

Add App Access for User

POST /api/v3/ua/user/application/add

Grant a user access to specified apps.

Request Schema
userID
integer
User's ID
appIds
string
Application ID
accessLevel
string
Level of access granted to user
Request Sample
{
"userId": 431,
"appIds": "1",
"accessLevel": "Full"
}
Response 200
{
"success": true,
"data": "Application access added successfully."
}
More Response Samples
Response 403
{
"success": false,
"errorObjects": [
{
"error": "User doesn't exist or user is not part of the organization."
}
]
}