Cowdidocs

Update agent

Update agent role, territory, or supervisor. Admin only.

PUT
/v1/agents/{userId}

Path Parameters

userId*string
Formatuuid

Request Body

application/json

Request to update an existing agent

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "role": "MANAGER",    "status": "ACTIVE",    "territory": "Nairobi Central",    "commission_rate": 0.07,    "base_salary": {      "value": 100000,      "currency": "KES"    }  }'
{  "code": "BAD_REQUEST",  "description": "Bad Request"}
{  "code": "UNAUTHORISED",  "description": "Unauthorised"}
{  "code": "WAITING_LIST",  "description": "User is in the waiting list"}
{  "code": "TOO_MANY_REQUESTS",  "description": "Too Many Requests"}
{  "code": "INTERNAL_SERVER_ERROR",  "description": "Internal Server Error"}