Update Client
Update existing client settings and permission assignments.
Endpoint
/api/v1/projects/{project_id}/clients/{client_id}Method
PUT
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Unique ID of the project |
client_id | string | Yes | Unique ID of the client |
Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
Authorization | Yes | Bearer access token: Bearer <access_token> |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Client name (max 50 chars) |
description | string | No | Description (max 200 chars) |
is_active | boolean | Yes | Active status |
permission_ids | array of strings | No | List of permission IDs |
Required Permission
clients:update
Examples
curl --request PUT \
--url https://auth.roled.id/api/v1/projects/2JUSLUee46xG6iEwG8JwPc/clients/2JUdYi26caQ2pMgQweYJrk \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJo...' \
--header 'Content-Type: application/json' \
--data '{
"name": "Read Only Client",
"description": "Read-only access for reporting service with enhanced reporting capabilities",
"is_active": true,
"permission_ids": [
"2JUUyotLUr7SuBqkzjRbTc",
"2JUUyotLUrApxL7zcx7Xoy",
"2JRjbZKS7f4oRkDaAD4gAF",
"2JRjbZKS7fJAfNjgShH3TE",
"2JRjbZKS7h72qSpPAJBuSj",
"2JRjbZKS7feihqSQx5D8yf"
]
}'Error Codes
| Code | HTTP Status | Description |
|---|---|---|
invalid_params | 400 | Missing or invalid request params, headers, or body |
invalid_authorization_token | 401 | Missing or invalid authorization token |
insufficient_permission | 403 | Insufficient permission |
project_not_found | 404 | Project not found |
client_not_found | 404 | Client not found |
some_permissions_not_found | 404 | One or more specified permission IDs not found |
system_error | 500 | Internal server error |