> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shinzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Provider Key

> Update an existing AI provider API key.

# Update Provider Key

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

## Authentication

Requires JWT token authentication.

<ParamField path="keyUuid" type="string" required>The UUID of the key to update</ParamField>
<ParamField body="provider_api_key" type="string">New API key value</ParamField>
<ParamField body="provider_base_url" type="string">New custom base URL</ParamField>
<ParamField body="label" type="string">New label</ParamField>
<ParamField body="status" type="string">New status (`active`, `inactive`, `revoked`)</ParamField>

## Example Request

```bash theme={null}
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

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

## Status Codes

| Code  | Description                  |
| ----- | ---------------------------- |
| `200` | Key updated successfully     |
| `400` | Invalid request              |
| `401` | Invalid or missing JWT token |
| `404` | Key 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
