Update Service Key
PATCH /service-keys/{service_key_id}Parameters
Section titled “Parameters”| Name | In | Type | Notes | |
|---|---|---|---|---|
service_key_id | path | string (uuid) | required | — |
Request body — ServiceKeyPatch
Section titled “Request body — ServiceKeyPatch”| Field | Type | Notes | |
|---|---|---|---|
name | string | null | optional | min length 1 max length 120 |
role | viewer | member | admin | owner | operator | null | optional | — |
is_active | boolean | null | optional | — |
expires_at | string (date-time) | null | optional | — |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | Successful Response | ServiceKeyView |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”curl -X PATCH https://your-deployment.example.com/service-keys/{service_key_id} \ -H "Authorization: Bearer $COBRE_TOKEN"Response — ServiceKeyView
Section titled “Response — ServiceKeyView”| Field | Type | Notes | |
|---|---|---|---|
id | string (uuid) | required | — |
name | string | required | — |
key_prefix | string | required | — |
key_last4 | string | required | — |
role | viewer | member | admin | owner | operator | required | — |
scope | workspace | organization | platform | required | — |
organization_id | string (uuid) | null | optional | — |
workspace_id | string (uuid) | null | optional | — |
is_active | boolean | required | — |
expires_at | string (date-time) | null | optional | — |
last_used_at | string (date-time) | null | optional | — |
created_at | string (date-time) | required | — |
updated_at | string (date-time) | required | — |