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/inviteAny 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 |
- JSON
- TypeScript
{
"email": "shraddha.p@iqm.com",
"name": "Shradda Patel"
}
{
"success": true,
"data": "1 invitations sent successfully."
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: string;
};
};
};
};
function SendUserInvitations(): Promise < Responses > {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/ua/user/invite',
requestBody: {
content: {
"application/json": [
{
email: `string`,
name: `string`,
}
]
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Validate User Invite
POST /api/v3/ua/invite/validateThe 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 |
- JSON
- TypeScript
{
"inviteHash": "8HQfsQcychjhvCmuuiFvVCIgqq9cJG/gh6HgmPZXxGE4od7a7tsMmh/O9+ia2Lw0FOelX3h8jTKJXR+0hUAkGXYA0cIITS13BxyrWoeBmRTnWTKxHtS+Ff41POwt/yDMY2iHXUsG86ehmWeeIi3HNMikhH5yY6BvNFnEfxq3zIdiouD3Fp/loPO9qazxU1qxZvNOOv8FZEZTzORVnJ8+ADjyZ/Zjs1dNhSFE"
}
{
"success": true,
"data": {
"isExpired": true
}
}
More Response Samples
{
"success": false,
"errorObjects": [
{
"error": "Provided invitation has is incorrect.",
"field": "inviteHash"
}
]
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
isExpired: boolean;
};
};
};
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
field: string;
}[];
};
};
};
};
function ValidateInvite(): Promise < Responses > {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/ua/invite/validate',
requestBody: {
content: {
"application/json": {
inviteHash: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
User Sign-Up
POST /api/v3/ua/sign-upA 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 |
- JSON
- TypeScript
{
"email": "kartik.g@iqm.com",
"password": "123456"
}
{
"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
{
"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."
}
]
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
access_token: string;
refresh_token: string;
scope: string;
token_type: string;
expires_in: number;
};
};
};
};
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
reason: string;
}[];
};
};
};
};
function UserSign-up/PasswordCreation(): Promise < Responses > {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/ua/sign-up',
requestBody: {
content: {
"application/json": {
email: `string`,
password: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Login
POST /api/v3/ua/loginOnce 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 |
- JSON
- TypeScript
{
"grantType": "password",
"email": "pratik.t+ihp@iqm.com",
"password": "123456"
}
{
"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
{
"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."
}
]
}
{
"success": false,
"errorObjects": [
{
"error": "User doesn't exist or user is not allowed to provided workspace."
}
]
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: {
access_token: string;
refresh_token: string;
scope: string;
token_type: string;
expires_in: number;
owId: number;
};
};
};
};
400: {
content: {
"application/json": {
success: boolean;
data: {
status: string;
reason: string;
supportEmail: string;
};
errorObjects: {
error: string;
reason: string;
}[];
};
};
};
403: {
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
};
function Login(): Promise < Responses > {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/ua/login',
requestBody: {
content: {
"application/json": {
grantType: `string`,
email: `string`,
password: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
User Logout
POST /api/v3/ua/logoutLog a user out from the API.
- JSON
- TypeScript
{
"success": true,
"data": "User logged out successfully."
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
content: {
"application/json": {
success: boolean;
data: string;
};
};
};
};
function Logout(): Promise < Responses > {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/ua/logout',
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Change Password
POST /api/v3/ua/user/update-passwordUpdate a user's password.
Request Schema | |
---|---|
email string | User's email |
password string | User's password |
- JSON
- TypeScript
{
"email": "kartik.g@iqm.com",
"password": "123456"
}
{
"success": true,
"data": "Password changed successfully."
}
More Response Samples
{
"success": true,
"data": {
"invalidReason": "Reset password link either not valid or it is already processed.",
"isValid": false
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: string;
};
};
};
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
invalidReason: string;
isValid: boolean;
};
};
};
};
};
function UpdatePassword(): Promise < Responses > {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/ua/user/update-password',
requestBody: {
content: {
"application/json": {
email: `string`,
password: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Reset Password Email
POST /api/v3/ua/user/reset-passwordSend a link to reset a user's password to a specified email.
Request Schema | |
---|---|
email string | User's email |
- JSON
- TypeScript
{
"email": "kartik@iqm.com"
}
Response 200
{
"success": true,
"data": "Email with reset password link sent successfully."
}
More Response Samples
{
"success": false,
"errorObjects": [
{
"error": "The email is not available in the system."
}
]
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: string;
};
};
};
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
};
function ResetPasswordEmail(): Promise < Responses > {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/ua/user/reset-password',
requestBody: {
content: {
"application/json": {
email: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Update User Profile
PATCH /api/v3/ua/user/update-profileUpdate 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 |
- JSON
- TypeScript
{
"success": true,
"data": {
"userAvatar": "https://iqm-web-assets-c92d6b6cbde1-stage.s3.amazonaws.com/user-profile/444.jpg",
"message": "Profile updated successfully."
}
}
More Response Samples
{
"success": false,
"errorObjects": [
{
"error": "Profile image should not be more than 3 MB"
}
]
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
userAvatar: string;
message: string;
};
};
};
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
};
function UpdateUserProfile(): Promise < Responses > {
const options = {
method: 'PATCH',
url: 'https://app.iqm.com/api/v3/ua/user/update-profile',
requestBody?: {
content: {
"application/x-www-form-urlencoded": {
displayName: `string`,
userAvatar: `string`,
removeUserProfile: `boolean`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Get List of Users
GET /api/v3/ua/users/listGet 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) |
- JSON
- TypeScript
{
"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
}
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
userId: number;
firstName: string;
lastName: string;
email: string;
displayName: string;
status: string;
statusId: string;
userAvatar: string;
createdAt: number;
uowId: number;
customersCount: number;
organizationName: string;
invitedOn: number;
isOrganizationOwnerUser: boolean;
isModificationAllowed: boolean;
invitedByUserName: string;
invitedByUserEmail: string;
isAssignActionAllowed: boolean;
}[];
totalRecords: number;
filteredRecords: number;
}
}
};
};
};
function getUsersList(): Promise < Responses > {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/ua/users/list',
params: {
query?: {
status?: `string`,
pageNo?: `number`,
limit?: `number`,
sortBy?: `string`,
searchField?: `string`,
},
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
User App Access List
GET /api/v3/ua/user/applications/listSee 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 |
- JSON
- TypeScript
{
"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
{
"success": false,
"errorObjects": [
{
"error": "Invalid sortBy value."
}
]
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: {
data: {
appId: number;
appName: string;
appOwner: string;
appType: string;
}[];
totalRecords: number;
filteredRecords: number;
};
};
};
};
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
};
function GetUserApplicationaccesslist(): Promise < Responses > {
const options = {
method: 'GET',
url: 'https://app.iqm.com/api/v3/ua/user/applications/list',
params: {
query?: {
uowId?: `number`,
pageNo?: `number`,
limit?: `number`,
sortBy?: `string`,
searchField?: `string`,
},
},
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}
Add App Access for User
POST /api/v3/ua/user/application/addGrant 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 |
- JSON
- TypeScript
{
"userId": 431,
"appIds": "1",
"accessLevel": "Full"
}
{
"success": true,
"data": "Application access added successfully."
}
More Response Samples
{
"success": false,
"errorObjects": [
{
"error": "User doesn't exist or user is not part of the organization."
}
]
}
See TypeScript Prerequisites page for usage.
import {
getInstance
} from "prerequisites"
const axios = getInstance();
interface Responses {
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
data: string;
};
};
};
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
success: boolean;
errorObjects: {
error: string;
}[];
};
};
};
};
function AddAppaccessforUser(): Promise < Responses > {
const options = {
method: 'POST',
url: 'https://app.iqm.com/api/v3/ua/user/application/add',
requestBody: {
content: {
"application/json": {
userId: `number`,
appIds: `string`,
accessLevel: `string`,
}
}
}
};
return axios.request(options).then(({ data }: { data: Responses }) => data);
}