---
title: "Reset the API key for a user (accessible to self, same-organization Admins, or Secretariat)"
method: PUT
path: "/org/{shortname}/user/{username}/reset_secret"
tags: ["Users"]
---

# Reset the API key for a user (accessible to self, same-organization Admins, or Secretariat)

`PUT /org/{shortname}/user/{username}/reset_secret`

<h2>Access Control</h2>  <p>Authenticated users can reset their own API secret. Organization admins can reset users in their organization. Secretariat users can reset any user's API secret.</p>  <h2>Expected Behavior</h2>  <p><b>Regular User:</b> Resets user's own API secret</p>  <p><b>Admin User:</b> Resets any user's API secret in the Admin's organization</p>  <p><b>Secretariat:</b> Resets any user's API secret</p>

## Path parameters

- `shortname` string, required
- `username` string, required

## Headers

- `CVE-API-ORG` string, required
- `CVE-API-USER` string, required
- `CVE-API-KEY` string, required

## Response `200`

Returns the new API key

- ResetSecretResponseJson — unresolved $ref

## Other responses

- `400` — Bad Request
- `401` — Not Authenticated
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/cveproject/apis/cve-services-api.md) · [All operations](https://skmtc.dev/cveproject/apis/cve-services-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cveproject/cve-services-api/revisions/a0323331d921/schema)
