Get agents list


Get agents list of an account.


Settings:

URL

https://partners.99digital.co.il/api/online/getAgents

Method

JSON via POST

Header

Authorization: Bearer {{access_token}}

*The access_token can be received from settings->get access token API.


Body:

Parameter

Description / Example

accountID

The accountID you wish to get the agents list

server

server subdomain hosting the account (default is: online)

if not set, "online" will be used.


Response:

{
    "status": "OK",
    "reason": 1,
    "accountID": 1,
    "server": 1,     
    "totalagents": 2,
    "list": [
        {
            "id": 1,
            "create_time": 1748168139,
            "email": "emailone@business.com",
            "agent_name": "agent name",
            "role": "Admin",            
            "two_factor_type": "sms",
            "two_factor_phone": "+972501234567",
            "two_factor_email": null
        },
        {
            "id": 2,
            "create_time": 1748168139,
            "email": "emailtwo@business.com",
            "agent_name": "agent name 2",
            "role": "Marketing",            
            "two_factor_type": "email",
            "two_factor_phone": null,
            "two_factor_email": "my@example.com"
        }
    ]
}


Response-Explain:

Parameter

Description

status

OK or FAIL

"OK" means the request was successful.

"Fail" means error.

totalAgents

The total number of agents in the selected account

list

array of the following table []:

name

explanation

create_time

The UNIX time that this account was created

id

Agent ID

email

email of the agent

agent_name

Agent name

role

Agent role

two_factor_type

If 2FA is enabled to login to the account, it will show either 'sms' or 'emai'. otherwise, it will show NULL

two_factor_phone

if 'two_factor_type' is set to 'sms'. here is the SMS phone number

two_factor_email

if 'two_factor_type' is set to 'emai'. here is the EMAIL address

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

Wrong credentials

3

Access token does not exist or expired, please generate another one from Settings - Get access token API

13

you need to use POST method.

33

accountID is invalid or wrong

34

server is invalid or wrong