---
title: "Edit Agent"
method: POST
path: "/api/editAgent"
tags: ["Manage Agents"]
---

# Edit Agent

`POST /api/editAgent`

## Request

- Base URL: `https://your-instance.stats.pbx.commpeak.com`
- URL: `https://your-instance.stats.pbx.commpeak.com/api/editAgent`
- Auth: API key in header `X-API-KEY`

### Edit Agent Details

This endpoint allows you to edit agent details.

#### Request Body

- `userExtension` (Required) - The extension number to dial to reach this user.
    
- `displayName` (Required) - The CallerID name for calls from this user will be set to this name. Only enter the name, NOT the number.
    
- `format` - The format of the response.
    
- `desksName` - Desks names to add, can add more than one (e.g., desk1, desk2, desk3).
    

#### Response

- `success` - Indicates the success status of the request.
    
- `message` - Provides additional information or error message.
    

#### Example

``` json
{
    "success": "",
    "message": ""
}

 ```

## Request body `application/x-www-form-urlencoded`

- object
  - `desksName` string
  - `displayName` string
  - `format` string
  - `userExtension` string

## Response `200`

successful

- object
  - `message` string
  - `success` string

## Other responses

- `400`: Error: Bad Request
- `401`: Unauthorized

---

[API](https://skmtc.dev/commpeak/apis/pbx-stats-api.md) - [All operations](https://skmtc.dev/commpeak/apis/pbx-stats-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/pbx-stats-api/revisions/2f599eb625f8?raw)
