Create Org Subscription
curl --request POST \
--url https://api.studio.prisme.ai/v2/orgs/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"name": "<string>",
"tier": "<string>",
"status": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({slug: '<string>', name: '<string>', tier: '<string>', status: '<string>'})
};
fetch('https://api.studio.prisme.ai/v2/orgs/subscriptions', 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/subscriptions"
payload = {
"slug": "<string>",
"name": "<string>",
"tier": "<string>",
"status": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"slug": "<string>",
"name": "<string>",
"tier": "<string>",
"status": "active",
"id": "<string>",
"plan": "<string>",
"isDefault": true,
"limits": {},
"features": {},
"billing": {},
"startedAt": "<string>",
"expiresAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}Subscriptions
Create Org Subscription
Create a new subscription template (SuperAdmin only)
POST
/
v2
/
orgs
/
subscriptions
Create Org Subscription
curl --request POST \
--url https://api.studio.prisme.ai/v2/orgs/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"name": "<string>",
"tier": "<string>",
"status": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({slug: '<string>', name: '<string>', tier: '<string>', status: '<string>'})
};
fetch('https://api.studio.prisme.ai/v2/orgs/subscriptions', 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/subscriptions"
payload = {
"slug": "<string>",
"name": "<string>",
"tier": "<string>",
"status": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"slug": "<string>",
"name": "<string>",
"tier": "<string>",
"status": "active",
"id": "<string>",
"plan": "<string>",
"isDefault": true,
"limits": {},
"features": {},
"billing": {},
"startedAt": "<string>",
"expiresAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<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.
Body
application/json
Response
Subscription created
Available options:
active, inactive, trialing, past_due, canceled Was this page helpful?