Update User Account
Update an existing user account's details.
Request
http
PATCH /v1/admin/users/:id
Authorization: Bearer {admin_key}
Content-Type: application/jsonPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | User account ID |
Body Parameters
All fields are optional - only include fields you want to update.
| Parameter | Type | Description |
|---|---|---|
name | string | User or company name |
external_id | string | Your customer ID |
email | string | Contact email |
metadata | object | Custom key-value data (replaces existing) |
billing_plan | string | Billing plan identifier |
Example Request
bash
curl -X PATCH "https://api.insight.iagon.com/v1/admin/users/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corporation", "metadata": {"tier": "enterprise", "upgraded_at": "2026-01-26"}, "billing_plan": "enterprise"}'Response
Success (200 OK)
json
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"admin_key_id": "660e8400-e29b-41d4-a716-446655440001",
"admin_entity_name": "YourCompany",
"external_id": "cust_abc123",
"name": "Acme Corporation",
"email": "api@acme.com",
"metadata": {
"tier": "enterprise",
"upgraded_at": "2026-01-26"
},
"created_at": "2026-01-26T12:00:00Z",
"updated_at": "2026-01-26T15:30:00Z",
"status": "active",
"billing_plan": "enterprise"
},
"message": "User account updated successfully"
}Error Responses
404 Not Found:
json
{
"success": false,
"error": "User account not found"
}Notes
- Only updates fields that are provided in the request
- The
metadatafield is replaced entirely if provided (not merged) - The
updated_attimestamp is automatically set - You can only update users created by your admin key
