Create Org Service Account
curl --request POST \
--url https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"name": "<string>",
"roleSlug": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({slug: '<string>', name: '<string>', roleSlug: '<string>'})
};
fetch('https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts', 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"
payload = {
"slug": "<string>",
"name": "<string>",
"roleSlug": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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"
}Organizations
Create Org Service Account
Create a new service account for the organization. The client secret is returned only once.
POST
/
v2
/
orgs
/
{orgSlug}
/
service-accounts
Create Org Service Account
curl --request POST \
--url https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"name": "<string>",
"roleSlug": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({slug: '<string>', name: '<string>', roleSlug: '<string>'})
};
fetch('https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts', 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"
payload = {
"slug": "<string>",
"name": "<string>",
"roleSlug": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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"
}Authorizations
BearerAuthOrgApiKeyAuthBearerAuth & OrgApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Service account created. The client secret is 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?