Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.teli.ai/llms.txt

Use this file to discover all available pages before exploring further.

Update User

Update user details within an organization. Only the fields you include in the request will be changed.

Endpoint

PATCH /v1/organizations/{org_id}/users/{user_id}

Authentication

X-API-Key
string
required
Your API key

Path Parameters

org_id
string
required
The organization’s unique_id
user_id
string
required
The user’s unique_id

Request Body (all fields optional)

name
string
Updated display name
email
string
Updated email address
permission
string
Permission level: "admin" or "user"
phone
string
Updated phone number
status
string
Account status (e.g., "active", "inactive")

Example Request

curl -X PATCH "https://api.teli.ai/v1/organizations/org_123/users/user_456" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Smith",
    "email": "jane@company.com",
    "permission": "admin"
  }'

Example Response

{
  "success": true,
  "message": "User updated successfully",
  "user": {
    "unique_id": "user_456",
    "name": "Jane Smith",
    "email": "jane@company.com",
    "permission": "admin",
    "phone": "+15551234567",
    "status": "active"
  },
  "powered_by": "Teli"
}

Error Responses

400
{
  "error": "No valid fields to update. Allowed: name, email, permission, phone, status",
  "success": false,
  "powered_by": "Teli"
}
404
{
  "error": "User not found",
  "success": false,
  "powered_by": "Teli"
}