Skip to main content

Auth API

SaaSus Auth API Schema (1.0.0)

Schema

basicInfo

Basic Info

Get Basic Configurations

Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "domain_name": "dev.saasus.io",
  • "is_dns_validated": false,
  • "certificate_dns_record": {
    },
  • "cloud_front_dns_record": {
    },
  • "dkim_dns_records": [
    ],
  • "default_domain_name": "d78bh0l3saarv.cloudfront.net",
  • "from_email_address": "test@example.com",
  • "reply_email_address": "test@example.com",
  • "is_ses_sandbox_granted": false
}

Update Basic Configurations

Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior.

Authorizations:
Bearer
Request Body schema: application/json
domain_name
required
string

Domain Name

from_email_address
required
string

Sender email of authentication email

reply_email_address
string

Reply-from email address of authentication email

Responses

Request samples

Content type
application/json
{
  • "domain_name": "dev.saasus.io",
  • "from_email_address": "test@example.com",
  • "reply_email_address": "test@example.com"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Get Notification Email Templates

Get notification email templates.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "sign_up": {
    },
  • "create_user": {
    },
  • "resend_code": {
    },
  • "forgot_password": {
    },
  • "update_user_attribute": {
    },
  • "verify_user_attribute": {
    },
  • "authentication_mfa": {
    },
  • "invite_tenant_user": {
    },
  • "verify_external_user": {
    }
}

Update Notification Email Template

Update notification email template.

Authorizations:
Bearer
Request Body schema: application/json
object (MessageTemplate)
object (MessageTemplate)
object (MessageTemplate)
object (MessageTemplate)
object (MessageTemplate)
object (MessageTemplate)
object (MessageTemplate)
object (MessageTemplate)
object (MessageTemplate)

Responses

Request samples

Content type
application/json
{
  • "sign_up": {
    },
  • "create_user": {
    },
  • "resend_code": {
    },
  • "forgot_password": {
    },
  • "update_user_attribute": {
    },
  • "verify_user_attribute": {
    },
  • "authentication_mfa": {
    },
  • "invite_tenant_user": {
    },
  • "verify_external_user": {
    }
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Get Authentication Page Setting

Get the authentication screen setting information (new registration, login, password reset, etc.).

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "sign_up_page": {
    },
  • "sign_in_page": {
    },
  • "password_reset_page": {
    }
}

Authentication Page Setting

Update the authentication page setting information (new registration, login, password reset, etc.).

Authorizations:
Bearer
Request Body schema: application/json
object (CustomizePageProps)
object (CustomizePageProps)
object (CustomizePageProps)

Responses

Request samples

Content type
application/json
{
  • "sign_up_page": {
    },
  • "sign_in_page": {
    },
  • "password_reset_page": {
    }
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Get Authentication Authorization Basic Information

Get authentication authorization basic information.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{}

Update Authentication Authorization Basic Information

Update authentication authorization basic information.

Authorizations:
Bearer
Request Body schema: application/json
icon
required
string <base64>

service icon

favicon
required
string <base64>

favicon

title
required
string

service name

terms_of_service_url
required
string

terms of service URL

privacy_policy_url
required
string

privacy policy URL

google_tag_manager_container_id
required
string

Google Tag Manager container ID

Responses

Request samples

Content type
application/json
{
  • "icon": "data:image/png;base64,ZDMiIHN0UmVmOmRvY3VtZW50SUQ9Inhtc==",
  • "favicon": "data:image/png;base64,ZDMiIHN0UmVmOmRvY3VtZW50SUQ9Inhtc==",
  • "title": "SaaSus",
  • "terms_of_service_url": "http://dev.example.com/terms",
  • "privacy_policy_url": "http://dev.example.com/privacy",
  • "google_tag_manager_container_id": "GTM-XXXXXXX"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

authInfo

Auth Info

Get Authentication Info

Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{}

Update Authentication Info

Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK.

Authorizations:
Bearer
Request Body schema: application/json
callback_url
required
string

Redirect After Authentication

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Get Sign-In Information Via External Provider

Get sign-in information via external provider set in cognito.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "google": {
    }
}

Update Sign-In Information

Update the sign-in information for the external ID provider

Authorizations:
Bearer
Request Body schema: application/json
provider
required
string (ProviderName)
Value: "Google"
object (IdentityProviderProps)

Responses

Request samples

Content type
application/json
{
  • "provider": "Google",
  • "identity_provider_props": {
    }
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Get Password Requirements

Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "password_policy": {
    },
  • "device_configuration": {
    },
  • "mfa_configuration": {
    },
  • "recaptcha_props": {
    },
  • "account_verification": {
    },
  • "self_regist": {
    },
  • "identity_provider_configuration": {
    }
}

Update Password Requirements

Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols.

Authorizations:
Bearer
Request Body schema: application/json
object (PasswordPolicy)

Password Policy

object (DeviceConfiguration)

Settings for remembering trusted devices

object (MfaConfiguration)

MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved.

object (RecaptchaProps)

reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved.

object (AccountVerification)

Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved.

object (SelfRegist)

self sign-up permission

Responses

Request samples

Content type
application/json
{
  • "password_policy": {
    },
  • "device_configuration": {
    },
  • "mfa_configuration": {
    },
  • "recaptcha_props": {
    },
  • "account_verification": {
    },
  • "self_regist": {
    }
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

saasUser

SaaS User

Get Users

Get all SaaS users.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "users": [
    ]
}

Create SaaS User

Create SaaS User.

Authorizations:
Bearer
Request Body schema: application/json
email
required
string

E-mail

password
required
string

Password

Responses

Request samples

Content type
application/json
{
  • "email": "hoge@example.com",
  • "password": "@Pass#Word1"
}

Response samples

Content type
application/json
{
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "email": "hoge@example.com"
}

Get User

Get user information based on user ID.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Responses

Response samples

Content type
application/json
{
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "email": "hoge@example.com"
}

Delete User

Delete all users with matching user ID from the tenant and SaaS.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Change Password

Change user's login password.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Request Body schema: application/json
password
required
string

Password

Responses

Request samples

Content type
application/json
{
  • "password": "@Pass#Word1"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Change Email

Change user's email.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Request Body schema: application/json
email
required
string

E-mail

Responses

Request samples

Content type
application/json
{
  • "email": "hoge@example.com"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Request User Email Update

Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Request Body schema: application/json
email
required
string

Email Address

access_token
required
string (Access Token)

Responses

Request samples

Content type
application/json
{
  • "email": "hoge@example.com",
  • "access_token": "string"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Confirm User Email Update

Verify the code to confirm the user's email address update. Requires the user's access token.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Request Body schema: application/json
code
required
string (Verification Code)
access_token
required
string (Access Token)

Responses

Request samples

Content type
application/json
{
  • "code": "123456",
  • "access_token": "string"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Register Authentication Application

Register an authentication application.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Request Body schema: application/json
access_token
required
string (Access Token)

access token

verification_code
required
string (Verification Code)

verification code

Responses

Request samples

Content type
application/json
{
  • "access_token": "string",
  • "verification_code": "string"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Create secret code for authentication application registration

Create a secret code for authentication application registration.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Request Body schema: application/json
access_token
required
string (Access Token)

access token

Responses

Request samples

Content type
application/json
{
  • "access_token": "string"
}

Response samples

Content type
application/json
{
  • "secret_code": "string"
}

Get User's MFA Settings

Get the user's MFA settings.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "method": "softwareToken"
}

Update User's MFA Settings

Update user's MFA settings.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Request Body schema: application/json
enabled
required
boolean (Enable MFA)

enable MFA

method
string (MFA Method)
Value: "softwareToken"

MFA method (required if enabled is true)

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "method": "softwareToken"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Unlink external identity providers

Unlink external identity providers.

Authorizations:
Bearer
path Parameters
provider_name
required
string
Example: Google
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Sign Up

Register a new user. A temporary password will be sent to the registered email.

Authorizations:
Bearer
Request Body schema: application/json
email
required
string (Email Address)

Email Address

Responses

Request samples

Content type
application/json
{
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "email": "hoge@example.com"
}

Resend Sign Up Confirmation Email

Resend temporary password for the new registered user.

Authorizations:
Bearer
Request Body schema: application/json
email
required
string (Email Address)

Email Address

Responses

Request samples

Content type
application/json
{
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Sign Up with AWS Marketplace

Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned.

Authorizations:
Bearer
Request Body schema: application/json
email
required
string (Email Address)

Email Address

registration_token
required
string (Registration Token)

Registration Token

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "registration_token": "string"
}

Response samples

Content type
application/json
{
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "email": "hoge@example.com"
}

Confirm Sign Up with AWS Marketplace

Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned.

Authorizations:
Bearer
Request Body schema: application/json
tenant_name
string (Tenant Name)

Tenant name

access_token
required
string (Access Token)

Access token

registration_token
required
string (Registration Token)

Registration Token

Responses

Request samples

Content type
application/json
{
  • "tenant_name": "string",
  • "access_token": "string",
  • "registration_token": "string"
}

Response samples

Content type
application/json
{
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "billing_info": {
    },
  • "name": "Anti-Pattern Inc.",
  • "attributes": {
    },
  • "back_office_staff_email": "hoge@example.com",
  • "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "using_next_plan_from": 1640995200,
  • "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "proration_behavior": "create_prorations",
  • "delete_usage": true,
  • "plan_histories": [
    ]
}

Link an existing tenant with AWS Marketplace

Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned.

Authorizations:
Bearer
Request Body schema: application/json
tenant_id
required
string (Tenant ID)

Tenant ID

access_token
required
string (Access Token)

Access token

registration_token
required
string (Registration Token)

Registration Token

Responses

Request samples

Content type
application/json
{
  • "tenant_id": "string",
  • "access_token": "string",
  • "registration_token": "string"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

tenantUser

Tenant User

Get Users

Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "users": [
    ]
}

Get User Info

Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object.

Authorizations:
Bearer
path Parameters
user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Responses

Response samples

Content type
application/json
{
  • "users": [
    ]
}

Get Tenant Users

Get all the users belonging to the tenant. Id is unique.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Responses

Response samples

Content type
application/json
{
  • "users": [
    ]
}

Create Tenant User

Create a tenant user. If attributes is empty, the additional attributes will be created empty.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Request Body schema: application/json
email
required
string

E-mail

required
object

Attribute information (Get information set by defining user attributes in the SaaS development console)

Responses

Request samples

Content type
application/json
{
  • "email": "hoge@example.com",
  • "attributes": {
    }
}

Response samples

Content type
application/json
{
  • "id": "f94bfffc-8be2-11ec-b41a-0242ac120004",
  • "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "tenant_name": "saasus",
  • "email": "hoge@example.com",
  • "attributes": {
    },
  • "envs": [
    ]
}

Get Tenant User

Get one tenant user by specific ID.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Responses

Response samples

Content type
application/json
{
  • "id": "f94bfffc-8be2-11ec-b41a-0242ac120004",
  • "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "tenant_name": "saasus",
  • "email": "hoge@example.com",
  • "attributes": {
    },
  • "envs": [
    ]
}

Update Tenant User Attribute

Update tenant user attributes.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Request Body schema: application/json
required
object

Attribute information (Get information set by defining user attributes in the SaaS development console)

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "attributes": {
    }
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Delete Tenant User

Delete a user from the tenant.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Create Tenant User Role

Create roles on tenant users.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

env_id
required
integer (Id)
Example: 1

Env ID

Request Body schema: application/json
role_names
required
Array of strings

Role Info

Responses

Request samples

Content type
application/json
{
  • "role_names": [
    ]
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Remove Role From Tenant User

Remove a role from a tenant user.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

user_id
required
string
Example: f94bfffc-8be2-11ec-b41a-0242ac120004

User ID

env_id
required
integer (Id)
Example: 1

Env ID

role_name
required
string
Example: admin

Role name

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

userAttribute

Additional User Attributes

Get User Attributes

Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "user_attributes": [
    ]
}

Create User Attributes

Create additional user attributes to be kept on the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition.

Authorizations:
Bearer
Request Body schema: application/json
attribute_name
required
string

Attribute Name

display_name
required
string

Display Name

attribute_type
required
string (AttributeType)
Enum: "string" "number" "bool" "date"

Type (date can be set to YYYY-MM-DD format.)

Responses

Request samples

Content type
application/json
{
  • "attribute_name": "birthday",
  • "display_name": "Birthday",
  • "attribute_type": "string"
}

Response samples

Content type
application/json
{
  • "attribute_name": "birthday",
  • "display_name": "Birthday",
  • "attribute_type": "string"
}

Delete User Attribute

Delete user attributes kept on the SaaSus Platform.

Authorizations:
Bearer
path Parameters
attribute_name
required
string
Example: birthday

Attribute Name

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

tenantAttribute

Additional Tenant Attributes

Get Tenant Attributes

Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "tenant_attributes": [
    ]
}

Create Tenant Attribute

Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API.

Authorizations:
Bearer
Request Body schema: application/json
attribute_name
required
string

Attribute Name

display_name
required
string

Display Name

attribute_type
required
string (AttributeType)
Enum: "string" "number" "bool" "date"

Type (date can be set to YYYY-MM-DD format.)

Responses

Request samples

Content type
application/json
{
  • "attribute_name": "birthday",
  • "display_name": "Birthday",
  • "attribute_type": "string"
}

Response samples

Content type
application/json
{
  • "attribute_name": "birthday",
  • "display_name": "Birthday",
  • "attribute_type": "string"
}

Delete Tenant Attribute

Deletes tenant attributes managed by SaaSus Platform.

Authorizations:
Bearer
path Parameters
attribute_name
required
string
Example: birthday

Attribute Name

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

role

Role

Get Roles

Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "roles": [
    ]
}

Create Role

Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong.

Authorizations:
Bearer
Request Body schema: application/json
role_name
required
string

role name

display_name
required
string

role display name

Responses

Request samples

Content type
application/json
{
  • "role_name": "admin",
  • "display_name": "管理者"
}

Response samples

Content type
application/json
{
  • "role_name": "admin",
  • "display_name": "管理者"
}

Delete Role

Delete role.

Authorizations:
Bearer
path Parameters
role_name
required
string
Example: admin

Role name

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

tenant

Tenant

Get Tenants

Get tenants managed by SaaSus Platform.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "tenants": [
    ]
}

Create Tenant

Create a tenant managed by the SaaSus Platform.

Authorizations:
Bearer
Request Body schema: application/json
name
required
string

tenant name

required
object

attribute info

back_office_staff_email
required
string

administrative staff email address

Responses

Request samples

Content type
application/json
{
  • "name": "Anti-Pattern Inc.",
  • "attributes": {
    },
  • "back_office_staff_email": "hoge@example.com"
}

Response samples

Content type
application/json
{
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "billing_info": {
    },
  • "name": "Anti-Pattern Inc.",
  • "attributes": {
    },
  • "back_office_staff_email": "hoge@example.com",
  • "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "using_next_plan_from": 1640995200,
  • "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "proration_behavior": "create_prorations",
  • "delete_usage": true,
  • "plan_histories": [
    ]
}

Get Tenant Details

Get the details of tenant managed on the SaaSus Platform.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Responses

Response samples

Content type
application/json
{
  • "current_plan_period_start": 1672531200,
  • "current_plan_period_end": 1675209600,
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "billing_info": {
    },
  • "name": "Anti-Pattern Inc.",
  • "attributes": {
    },
  • "back_office_staff_email": "hoge@example.com",
  • "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "using_next_plan_from": 1640995200,
  • "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "proration_behavior": "create_prorations",
  • "delete_usage": true,
  • "plan_histories": [
    ]
}

Update Tenant Details

Update SaaSus Platform tenant details.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Request Body schema: application/json
name
required
string

tenant name

required
object

attribute info

back_office_staff_email
required
string

administrative staff email address

Responses

Request samples

Content type
application/json
{
  • "name": "Anti-Pattern Inc.",
  • "attributes": {
    },
  • "back_office_staff_email": "hoge@example.com"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Delete Tenant

Delete SaaSus Platform tenant.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Update Tenant Plan Information

Update SaaSus Platform tenant plan information.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Request Body schema: application/json
next_plan_id
string (Uuid)
using_next_plan_from
integer

Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.)

next_plan_tax_rate_id
string (Uuid)
proration_behavior
string (Proration Behavior When Changing Plans)
Enum: "create_prorations" "none" "always_invoice"

If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all.

delete_usage
boolean (Proration Behavior When Changing Plans)

If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled.

Responses

Request samples

Content type
application/json
{
  • "next_plan_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "using_next_plan_from": 1640995200,
  • "next_plan_tax_rate_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "proration_behavior": "create_prorations",
  • "delete_usage": true
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Update Tenant Billing Information

Update SaaSus Platform tenant billing information.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Request Body schema: application/json
name
required
string

Tenant name for billing

required
object (Tenant Billing Address)
invoice_language
required
string (InvoiceLanguage)
Enum: "ja-JP" "en-US"

Language of invoice

Responses

Request samples

Content type
application/json
{
  • "name": "株式会社テストテナント",
  • "address": {
    },
  • "invoice_language": "ja-JP"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Get identity provider per tenant

Get sign-in information via external identity provider per tenant.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Responses

Response samples

Content type
application/json
{}

Update identity provider per tenant

Update sign-in information via external identity provider per tenant.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Request Body schema: application/json
provider_type
required
string (ProviderType)
Value: "SAML"
SAML Identity Provider (object) (Tenant Identity Provider)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Stripe Initial Setting

Set Stripe initial information via billing

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Delete Customer and Product From Stripe

Delete customer and product from Stripe.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Delete all information related to rate plans

Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

saasusTenant

SaaSus Tenant

env

Environment Info

Get Env Info

Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "envs": [
    ]
}

Create Env Info

Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation.

Authorizations:
Bearer
Request Body schema: application/json
id
required
integer (Id)
name
required
string

env name

display_name
string

env display name

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "saasus_dev",
  • "display_name": "SaaSus dev"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "saasus_dev",
  • "display_name": "SaaSus dev"
}

Get Env Details

Get environment details.

Authorizations:
Bearer
path Parameters
env_id
required
integer (Id)
Example: 1

Env ID

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "saasus_dev",
  • "display_name": "SaaSus dev"
}

Update Env Info

Update env info.

Authorizations:
Bearer
path Parameters
env_id
required
integer (Id)
Example: 1

Env ID

Request Body schema: application/json
name
required
string

env name

display_name
string

env display name

Responses

Request samples

Content type
application/json
{
  • "name": "saasus_dev",
  • "display_name": "SaaSus dev"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Delete Env Info

Delete env info. Env with id 3 cannot be deleted.

Authorizations:
Bearer
path Parameters
env_id
required
integer (Id)
Example: 1

Env ID

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

credential

Authentication/Authorization Info

Get Authentication/Authorization Information

Get ID token, access token, and refresh token using a temporary code or a refresh token.

Authorizations:
Bearer
query Parameters
code
string (Uuid)
Example: code=69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Temp Code

auth-flow
string
Enum: "tempCodeAuth" "refreshTokenAuth"

Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth

refresh-token
string

Refresh Token

Responses

Response samples

Content type
application/json
{
  • "id_token": "string",
  • "access_token": "string",
  • "refresh_token": "string"
}

Save Authentication/Authorization Information

Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance.

Authorizations:
Bearer
Request Body schema: application/json
id_token
required
string (ID Token)

ID token

access_token
required
string (Access Token)

Access token

refresh_token
string (Refresh Token)

Refresh token

Responses

Request samples

Content type
application/json
{
  • "id_token": "string",
  • "access_token": "string",
  • "refresh_token": "string"
}

Response samples

Content type
application/json
{
  • "code": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775"
}

invitation

Invitation

Get Tenant Invitations

Get a list of invitations to the tenant.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Responses

Response samples

Content type
application/json
{}

Create Tenant Invitation

Create an invitation to the tenant.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Request Body schema: application/json
email
required
string (Email Address)

Email address of the user to be invited

access_token
required
string (Access Token)

Access token of the user who creates an invitation

required
Array of objects (Invited User Environment Information)

Responses

Request samples

Content type
application/json
{
  • "email": "test@example.com",
  • "access_token": "string",
  • "envs": [
    ]
}

Response samples

Content type
application/json
{}

Get Tenant Invitation

Get invitation information for the tenant.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

invitation_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Invitation ID

Responses

Response samples

Content type
application/json
{}

Delete Tenant Invitation

Delete an invitation for the tenant.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

invitation_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Invitation ID

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

Get Invitation Validity

Get the validity of an invitation to the tenant.

Authorizations:
Bearer
path Parameters
invitation_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Invitation ID

Responses

Response samples

Content type
application/json
{
  • "is_valid": true
}

Validate Invitation

Validate an invitation to the tenant.

Authorizations:
Bearer
path Parameters
invitation_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Invitation ID

Request Body schema: application/json
access_token
string (Access Token)

Access token of the invited user

email
string (Email Address)

Email address of the invited user

password
string (Password)

Password of the invited user

Responses

Request samples

Content type
application/json
{
  • "access_token": "string",
  • "email": "test@example.com",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

error

Testing Purpose Error

Return Internal Server Error

This endpoint is used for testing purposes. Returns a server error with status code 500.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "string",
  • "message": "string",
  • "data": {
    }
}

userInfo

Get User Info

User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it.

Authorizations:
Bearer
query Parameters
token
required
string

ID Token

Responses

Response samples

Content type
application/json
{
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "email": "hoge@example.com",
  • "tenants": [
    ]
}