Rotate Org Service Account Secret
curl --request POST \
--url https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/rotate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "<string>",
"userId": "<string>",
"orgSlug": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"roleSlug": "<string>",
"scopes": [
"<string>"
],
"disabled": true,
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"clientSecret": "<string>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Organizations
Rotate Org Service Account Secret
Rotate a service account’s client secret. The new secret is shown only once.
POST
/
v2
/
orgs
/
{orgSlug}
/
service-accounts
/
{saSlug}
/
rotate
Rotate Org Service Account Secret
curl --request POST \
--url https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/rotate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "<string>",
"userId": "<string>",
"orgSlug": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"roleSlug": "<string>",
"scopes": [
"<string>"
],
"disabled": true,
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"clientSecret": "<string>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuthBearerAuth & OrgApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
New secret generated. Shown only once.
Synthetic user ID used in JWT sub (sa:{orgSlug}:{slug})
Organization role assigned to this service account
Optional scope restrictions (empty means all permissions from roleSlug)
The raw client secret (sas_{orgSlug}_{uuid}). Shown only once.
Was this page helpful?