Skip to content
StraventaDocs
Now in Sandbox.

Rotate the service-account API key

POST
/v1/admin/service-accounts/{id}/rotate-key

Permission-gated on tenant.service_accounts.write (the same permission as create-key and revoke-key). Invalidates every active key and inserts a fresh one atomically. The returned plaintext is shown exactly once. No request body is required.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT Bearer access token. Clock skew tolerance is ±60 seconds.

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST https://sandbox.505pay.link/v1/admin/service-accounts/{id}/rotate-key \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string"
}
{
  "error": "unauthenticated",
  "message": "missing or invalid bearer token",
  "request_id": "req_01abc123"
}
{
  "error": "permission_denied",
  "message": "caller does not hold the required permission",
  "request_id": "req_01abc124"
}
{
  "error": "not_found",
  "message": "the requested resource was not found",
  "request_id": "req_01abc125"
}
{
  "error": "rate_limited",
  "message": "too many requests",
  "request_id": "req_01abc127"
}

Was this page helpful?