For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETGet API key permission options
      • GETList API keys
      • POSTCreate API key
      • GETGet aggregate API key analytics
      • GETReveal test key plaintext
      • GETGet API key
      • PUTUpdate API key
      • DELDelete API key
      • POSTRegenerate API key
      • GETGet API key analytics
Dashboard
LogoLogo
Runtype APIAPI Keys

Regenerate API key

POST
/v1/api-keys/:id/regenerate
POST
/v1/api-keys/:id/regenerate
$curl -X POST https://api.runtype.com/v1/api-keys/id/regenerate \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "apiKey": {
3 "id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
4 "name": "Production API Key",
5 "keyPrefix": "prod_9f8e7d",
6 "searchHint": "prod_9f8e7d",
7 "permissions": [
8 "read:projects",
9 "write:deployments",
10 "manage:api-keys"
11 ],
12 "isActive": true,
13 "updatedAt": "2024-01-15T09:30:00Z"
14 },
15 "plainKey": "sk_live_4f3b2a1c9d8e7f6a5b4c3d2e1f0a9b8c",
16 "warning": "This is the only time the plaintext API key will be shown. Please store it securely."
17}
Issue a new plaintext value for an existing API key. The previous key value is invalidated. Cannot be called via another API key.
Was this page helpful?
Previous

Get API key analytics

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Response

Regenerated API key
apiKeyobject
plainKeystring
warningstring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error