Skip to main content
PUT
/
auth
/
provider_keys
/
:keyUuid
Update Provider Key
curl --request PUT \
  --url https://api.example.com/auth/provider_keys/:keyUuid

Update Provider Key

Update an existing AI provider API key’s credentials, base URL, label, or status.

Endpoint

PUT /auth/provider_keys/:keyUuid

Authentication

Requires JWT token authentication.

Path Parameters

ParameterTypeRequiredDescription
keyUuidstringYesThe UUID of the key to update

Request Body

All fields are optional. Only include fields you want to update.
FieldTypeDescription
provider_api_keystringNew API key value
provider_base_urlstringNew custom base URL
labelstringNew label
statusstringNew status (active, inactive, revoked)

Example Request

curl -X PUT https://api.app.shinzo.ai/auth/provider_keys/pk_abc123def456 \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Updated Production Key",
    "status": "active"
  }'

Response

{
  "uuid": "pk_abc123def456",
  "provider": "anthropic",
  "label": "Updated Production Key",
  "status": "active",
  "updated_at": "2025-01-20T14:30:00Z"
}

Status Codes

CodeDescription
200Key updated successfully
400Invalid request
401Invalid or missing JWT token
404Key not found

Notes

  • Setting status to revoked will prevent the key from being used
  • Updating the provider_api_key replaces the stored key entirely
  • The original key value is never returned