Users

"Users" in our accelerator product refer to individuals or entities who have registered accounts and interact with the platform. Users can be administrators, developers, or end-users who utilize the platform's features and functionalities based on their assigned roles and permissions. They can create, manage, access and manipulate data objects, configure settings, and perform various actions within the platform. The "Users" feature allows for user management, authentication, and authorization, ensuring secure access and personalized experiences for each user.

User Data Model

Name
Data Type
Description

_id

ObjectId

System-generated field that indicates user identifier.

_createdAt

Date

System-generated timestamp that denotes the date and time when an user was created.

_createdBy

String

System-generated field that indicates the account who created.

_modifiedAt

Date

System-generated generated timestamp that denotes the date and time when a user was modified.

_modifiedBy

String

System-generated field that indicates the account who modified.

firstName

String

Represents the first name or given name of a user in the system.

lastName

String

Represents the last name or given name of a user in the system.

email

String

Represents the email of a user in the system.

orgs

Array

Represents the organizations a user is associated

in the system.

roles

Array

Represents the roles associated with the user

in the system.

policies

Array

Represents the policies associated with the user

in the system.

sendInvite

Boolean

Represents whether the user has the ability to send invitations to other users for the organization they are currently logged into

sendInviteRoles

Array

invitations

Array

passwordHash

Binary

passwordSalt

Binary

_externalOid

String

Example Users

{
    "_id":
        {
            "$oid":"64392c8d862be321e3598f66"
        },
    "_createdAt":
        {
            "$date":
                {
                    "$numberLong":"1681468557984"
                }
        },
    "_createdBy":"[email protected]",
    "_modifiedAt":
        {
            "$date":
                {
                    "$numberLong":"1686221383193"
                }
        },
    "_modifiedBy":"64392c8d862be321e3598f66",
    "firstName":null,
    "lastName":null,
    "email":"[email protected]",
    "orgs":["64392b37862be321e3598f58"],
    "currentOrg":"64392b37862be321e3598f58",
    "roles":["64392c4f862be321e3598f65"],
    "policies":[],
    "sendInvite":true,
    "sendInviteRoles":[],
    "invitations":
        [{
            "orgId":"64392b37862be321e3598f58",
            "invitationStatus":"accepted",
            "invitedAt":
                {
                    "$date":
                        {
                            "$numberLong":"1681468554913"
                        }
                },
            "invitedBy":"[email protected]"
        }],
    "passwordHash":
        {
            "$binary":
                {
                    "base64":"Izl+755haETxQ07JkP8gxfAFTlY9Jx8hzvPNGMrfu2YUz7EencOGNb9vHE3tUfx5eO+Ek8fz0tzZixJ9KZ2+Mg==",
                    "subType":"00"
                }
        },
    "passwordSalt":
        {
            "$binary":
                {
                    "base64":"s6bwslfl0zYbIaRTdpTnzrvyAQFUguXDaIgXitwit/btj+Cuz5O4IrvtVmTBkyB87UGlEmmg7CVw9lJRErj5WElTaswcSzoeqCrwwGLy07DerAMOiwTK7L0QGL3E59kQHUlgf5Qw8UMzUvEc9JBXmTLWX0BhpODQeU9MrM6nOXM=",
                    "subType":"00"
                }
        },
    "_externalOid":null
}

Create user

post

Sample request:

POST api/v1/CreateUser
{
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "roles": ["string"],
    "policies": ["string"],
    "password": "S@mplePass0rd"  
}
Authorizations
Body
firstNamestringRequired
lastNamestringRequired
emailstringRequiredPattern: ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$
passwordstring | nullableOptionalPattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,}$
rolesstring[]Required
policiesstring[]Required
Responses
200
Success
post
POST //api/v1/CreateUser HTTP/1.1
Host: api-qa.accelerator-platform.com
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 108

{
  "firstName": "text",
  "lastName": "text",
  "email": "text",
  "password": "text",
  "roles": [
    "text"
  ],
  "policies": [
    "text"
  ]
}

No content

Get all users

get

Sample request:

GET api/v1/GetUsers
Authorizations
Responses
200
Success
get
GET //api/v1/GetUsers HTTP/1.1
Host: api-qa.accelerator-platform.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Get a user

get

Sample request:

GET api/v1/GetUser
{
    "email": "[email protected]"
}
Authorizations
Path parameters
emailstringRequired
Responses
200
Success
get
GET //api/v1/GetUser/{email} HTTP/1.1
Host: api-qa.accelerator-platform.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Add a user

post

Sample request:

POST api/v1/Register
{
    "email": "[email protected]",
    "orgDomain": "orgdomain",
    "invitationCode": "123456",
    "password": "S@mplePass0rd"  
}
Body
emailstringRequiredPattern: ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$
orgDomainstring | nullableOptional
invitationCodestring | nullableOptional
passwordstring | nullableOptionalPattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,}$
Responses
200
Success
post
POST //api/v1/Register HTTP/1.1
Host: api-qa.accelerator-platform.com
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 77

{
  "email": "text",
  "orgDomain": "text",
  "invitationCode": "text",
  "password": "text"
}
200

Success

No content

Authorize a user

get

Sample request:

Get api/v1/[email protected]&password=S@mplePass0rd
Query parameters
emailstringOptional
passwordstringOptional
orgIdstringOptional
authTokenstringOptional
Responses
200
Success
get
GET //api/v1/Authorize HTTP/1.1
Host: api-qa.accelerator-platform.com
Accept: */*
200

Success

No content

Assign a role to a user

put
Authorizations
Path parameters
userIdstringRequired
roleIdstringRequired
Responses
200
Success
put
PUT //api/v1/AssignRoleToUser/{userId}/{roleId} HTTP/1.1
Host: api-qa.accelerator-platform.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Invite a user

post
Authorizations
Path parameters
roleIdstringRequired
Query parameters
sendInvitebooleanOptional
sendInviteRolestringOptional
Body
TypestringRequiredPattern: ^(?i)\b(sms|email)\b$
ContentTypestringRequiredPattern: ^(html|text)$
SubjectstringOptional
SenderNamestringOptionalDefault: Touchcore Projects
SenderEmailstringOptionalDefault: [email protected]
MessageBodystringOptional
RecipientListstring[]Required
CcListstring[]Optional
BccListstring[]Optional
TemplateIdstringOptional
VarsstringOptional
Filesstring · binary[]Optional
Responses
200
Success
post
POST //api/v1/InviteUser/{roleId} HTTP/1.1
Host: api-qa.accelerator-platform.com
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 271

{
  "Type": "text",
  "ContentType": "text",
  "Subject": "text",
  "SenderName": "Touchcore Projects",
  "SenderEmail": "[email protected]",
  "MessageBody": "text",
  "RecipientList": [
    "text"
  ],
  "CcList": [
    "text"
  ],
  "BccList": [
    "text"
  ],
  "TemplateId": "text",
  "Vars": "text",
  "Files": [
    "binary"
  ]
}

No content

Last updated