HisendHISEND Docs

Rotate api-keys secret

POST
/admin/projects/{project_id}/api-keys/{id}/rotate

Requires a user JWT with the admin role. The previous secret is invalidated; the replacement is returned once.

Authorization

AdminJWT
AuthorizationBearer <token>

User JWT; backend checks the admin role. Project API keys cannot access admin endpoints.

In: header

Path Parameters

project_id*integer
Range0 <= value
id*integer
Range0 <= value

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

reason*string

Audit reason; required for limit exceptions, lock/score changes, overrides, rotation and deletion.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.hisend.app/v1/admin/projects/0/api-keys/0/rotate" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{
  "resource": {},
  "secret": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}