Skip to content

Update Client

Update existing client settings and permission assignments.

Endpoint

/api/v1/projects/{project_id}/clients/{client_id}

Method

PUT

Path Parameters

ParameterTypeRequiredDescription
project_idstringYesUnique ID of the project
client_idstringYesUnique ID of the client

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
AuthorizationYesBearer access token: Bearer <access_token>

Request Body

FieldTypeRequiredDescription
namestringYesClient name (max 50 chars)
descriptionstringNoDescription (max 200 chars)
is_activebooleanYesActive status
permission_idsarray of stringsNoList of permission IDs

Required Permission

clients:update

Examples

curl --request PUT \
  --url https://auth.roled.io/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

CodeHTTP StatusDescription
invalid_params400Invalid or missing request parameters, headers, or body.
invalid_authorization_token401Unauthorized request. The authorization token is missing or invalid.
insufficient_permission403Insufficient permissions to access this resource.
project_not_found404The requested project could not be found.
client_not_found404The requested client could not be found.
some_permissions_not_found404The following permissions could not be found.
system_error500An unexpected error occurred. Please try again later.