v1
latestOpenAPI 3.1.02026-08-0651316.6 KBAPI User
Create a new API user
Creates a new API user (also known as a machine user) that your application can use to authenticate with Spotnana APIs. Each API user is scoped to a specific TMC and role, giving you control over what level of access the credentials grant.
Use this endpoint to:
- Generate a dedicated clientId and clientSecret pair that your backend services can use to obtain access tokens.
- Assign either a TMC admin or a company admin role to scope what the API user can do across your organization.
- Create a SCIM API user by setting credentialType to SCIM_TOKEN with role set to COMPANY_ADMIN. This returns a SCIM bearer token instead of a client secret.
Next steps:
- For CLIENT_CREDENTIALS (default): Use the clientId and clientSecret in the POST /v2/auth/oauth2-token endpoint to obtain an access token.
- For SCIM_TOKEN: Use the returned scimToken as the Bearer token in the Authorization header for SCIM API requests (/v2/scim/Users, etc.).
Notes:
- Store the clientSecret or scimToken securely. They are only returned once at creation and cannot be retrieved later.
- You can create up to 5 API users per TMC. To increase this limit, contact your Spotnana representative.
- Only a TMC admin can use this endpoint to create API users.
- SCIM_TOKEN credential type requires role to be COMPANY_ADMIN.
post/v2/api-users
Request body
Example request
{
"tmcId": "ecc5b835-8001-430c-98f8-fedeccebe4cf",
"orgId": "ecc5b835-8001-430c-98f8-fedeccebe4cf",
"role": "TMC_ADMIN",
"credentialType": "CLIENT_CREDENTIALS"
}Response
User created successfully
Example response
{
"clientId": "1ddj3hs95to28iag7m4hl9lv2",
"clientSecret": "1hgea74sii6os6vlkk1c7krlfgniaphbn2c56pml",
"scimToken": "eyJzY29wZSI6InNjaW0iLCJjbGllbnRJZCI6Ii4uLiIsImVuY3J5cHRlZFNlY3JldCI6Ii4uLiJ9"
}