Agent

The agents API lets you retrieve and filter agents in your organization.

Get Agents

GET https://api.developer.databeaver.co/v1/agents

Returns a list of all agents in your organisation.

Query Parameters

NameTypeDescription

sortBy

string

createdAt [Default: id]

sortOrder

string

asc | desc [Default: asc]

page

number

[Default: 1]

perPage

number

[Default: 50]

city

string

City of the agent

firstName

string

First name of the agent

lastName

string

Last name of the agent

status

string

active | inactive

country

string

Country of the agent

zone

string

Zone of the agent

state

boolean

state of

Headers

NameTypeDescription

Authorization

string

Bearer API_KEY

{
    "success": true,
    "data": [
        {
            "id": "5efdcc869b03541646256fec",
            "groups": [],
            "status": "active",
            "firstName": "Test",
            "lastName": "Agent",
            "email": "test@databeaver.co",
            "phone": "08000000000",
            "location": [
                {
                    "country": "Nigeria",
                    "zone": "South West",
                    "state": "Lagos",
                    "city": "Lagos"
                }
            ],
            "createdAt": "2020-07-02T12:00:40.183Z",
            "updatedAt": "2020-07-02T12:00:40.183Z"
        },
        ...
    ],
    "_metadata": {
        "total": 1103012,
        "perPage": 10,
        "pageCount": 110302,
        "pageLinks": {
            "current": "https://api.databeaver.co/v1/agents?perPage=10&sortOrder=desc&page=1",
            "next": "https://api.databeaver.co/v1/agents?perPage=10&sortOrder=desc&page=2"
        }
    }
}

Get Agent by Id

GET https://api.developer.databeaver.co/v1/agents/:id

Returns a single agent.

Path Parameters

NameTypeDescription

id

string

Agent id

Headers

NameTypeDescription

Authorization

string

Bearer API_KEY

{
    "success": true,
    "data": {
        "id": "5efdcc869b03541646256fec",
        "groups": [],
        "status": "active",
        "firstName": "Test",
        "lastName": "Agent",
        "email": "test@databeaver.co",
        "phone": "08000000000",
        "location": [
            {
                "country": "Nigeria",
                "zone": "South West",
                "state": "Lagos",
                "city": "Lagos"
            }
        ],
        "createdAt": "2020-07-02T12:00:40.183Z",
        "updatedAt": "2020-07-02T12:00:40.183Z"
    }
}

Last updated