const { result, error } =await unkey.keys.updateRemaining({ keyId: "xyz_AS5HDkXXPot2MMoPHD8jnL", value: 300, op: "set"});if (error) { // handle potential network or bad request error // a link to our docs will be in the `error.docs` field console.error(error.message); return;}console.log(result)
Copy
Ask AI
{ "result": { "remaining": 300 }}
Keys
Update Remaining
Update the remaining usage of a key.
Copy
Ask AI
const { result, error } =await unkey.keys.updateRemaining({ keyId: "xyz_AS5HDkXXPot2MMoPHD8jnL", value: 300, op: "set"});if (error) { // handle potential network or bad request error // a link to our docs will be in the `error.docs` field console.error(error.message); return;}console.log(result)
Copy
Ask AI
{ "result": { "remaining": 300 }}
Copy
Ask AI
const { result, error } =await unkey.keys.updateRemaining({ keyId: "xyz_AS5HDkXXPot2MMoPHD8jnL", value: 300, op: "set"});if (error) { // handle potential network or bad request error // a link to our docs will be in the `error.docs` field console.error(error.message); return;}console.log(result)