---
updatedAt: 2025-11-03T17:27:47.000Z
agentTools:
  projectIndex: https://docs.gupshup.io/llms.txt
---

# Define Agent

## Add Agent

### API Endpoint

```
POST https://kpi.knowlarity.com/Basic/v1/account/agent
```

### Required Parameters

| Parameters    | Description            |
| :------------ | :--------------------- |
| first\_name   | First Name of Agent    |
| last\_name    | Last Name of Agent     |
| phone         | Mobile Number of Agent |
| email         | Agent of email         |
| country\_code | country\_code of agent |

### Sample Request

```
curl -X POST \
  https://kpi.knowlarity.com/Basic/v1/account/agent \
  -H 'authorization: <authorization-key>' \
  -H 'x-api-key: <x-api-key>'
  -d '{
  "first_name": "sakshi",
  "last_name": "gupta",
  "phone": "89826XXXXX",
  "email": "1agent2@gmail.com",
  "country_code": "+91"
}'
```

##

## Get Agent

### API Endpoint

```
GET https://kpi.knowlarity.com/Basic/v1/account/agent
```

### Sample Request

```
curl -X GET \
  https://kpi.knowlarity.com/Basic/v1/account/agent \
  -H 'authorization: <authorization-key>' \
  -H 'x-api-key: <x-api-key>'
```

### Sample Response

```
{
    "meta": {
        "limit": "1000",
        "next": "",
        "offset": "0",
        "previous": "",
        "total_count": "2"
    },
    "objects": [
     "krm_agent_id": ""
        {
            "phone": "90396XXXXX",
            "country_code": "+91",
            "status": "",
            "email": "sakXXXXXXXX@knowlarity.com",
            "call_groups": [],
            "role": "",
            "wrap_up_time": [],
            "first_name": "Sakshi Gupta",
            "id": "1233857",
            "opt_in": "1",
            "last_name": "",
            "sip_url_flag": "false",
            "backup_number": "",
            "is_active": "true",
            "krm_agent_id": ""
        }
    ]
}
```

```
curl -X POST \
  https://kpi.knowlarity.com/Basic/v1/account/agent \
  -H 'authorization: <authorization-key>' \
  -H 'x-api-key: <x-api-key>'
  -d '{
  "first_name": "sakshi",
  "last_name": "gupta",
  "phone": "89826XXXXX",
  "email": "1agent2@gmail.com",
  "country_code": "+91"
}'
```

## Update Agent

### API Endpoint

```
PUT  https://kpi.knowlarity.com/Basic/v1/account/agent/{user_id}
```

### Sample Request

```
curl --location --request PUT \
  'https://kpi.knowlarity.com/Basic/v1/account/agent/<user_id>' \
  --header 'Authorization: <authorization-key>' \
  --header 'x-api-key: <x-api-key>' \
  --header 'Content-Type: application/json' \
  --data-raw '{"agent_status":"Available",
  "callcenter_role":"agent",
  "contact_number":"+91983738XXXX",
  "country_code":"+91",
  "email":"handinXXX@gmail.com",
  "first_name":"nandiadni",
  "id":1297018,
  "is_active":true,
  "is_parent":false,
  "last_name":"gupta",
  "no_answer_count":"10",
  "phone":"98373XXXXX",
  "type":"BLENDED",
  "wrap_up_time":"30",
  "agent_type":"INBOUND"
  }'
```