TypeScript
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_email: 'jsmith@example.com',
name: '<string>',
slug: '<string>',
env: 'both'
})
};
fetch('https://api.useautumn.com/v1/platform/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"test_secret_key": "<string>",
"live_secret_key": "<string>"
}Platform (Beta)
Create Organization
Creates a new organization for a platform tenant. Reuses existing users and organizations if they already exist.
POST
/
platform
/
organizations
TypeScript
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_email: 'jsmith@example.com',
name: '<string>',
slug: '<string>',
env: 'both'
})
};
fetch('https://api.useautumn.com/v1/platform/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"test_secret_key": "<string>",
"live_secret_key": "<string>"
}Creates a new organization for a platform tenant. If a user with the provided email already exists, it will be reused. If an organization with the slug already exists for this user, it will be reused.
Authorizations
Autumn API key with Bearer prefix
Body
application/json
Email address of the organization owner. User will be created if it doesn't exist.
Display name for the organization.
Unique slug for the organization.
Environment(s) to create API keys for.
Available options:
test, live, both ⌘I