---
title: "Rename a key or set its daily credit cap"
method: POST
path: "/v1/keys/{keyId}"
tags: ["Keys"]
---

# Rename a key or set its daily credit cap

`POST /v1/keys/{keyId}`

## Request

- Base URL: `https://api.scripthaul.com`
- URL: `https://api.scripthaul.com/v1/keys/{keyId}`
- Auth: HTTP bearer

## Request body

- KeyCreate
  - `name` string
  - `daily_credit_cap` integer, nullable

## Response `200`

Updated

## Other responses

- `400`: Typed API error
- `401`: Typed API error
- `403`: Typed API error
- `404`: Typed API error

---

[API](https://skmtc.dev/scripthaul/apis/scripthaul-api.md) · [All operations](https://skmtc.dev/scripthaul/apis/scripthaul-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scripthaul/apis/scripthaul-api/revisions/f476d69f4a6b?raw)
