Create a new API user
Changed onCreates a new API user (also known as a machine user) that your application can use to authenticate with Spotnana APIs.
Use this endpoint to:
- Generate a dedicated clientId and clientSecret pair that your backend services can use to obtain access tokens.
- 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.
Role assignment:
-
With role: The API user is automatically added to the corresponding RBAC user group (TMC Admin or Company Admin) based on the specified role. Requires tmcId for TMC admin, or both orgId and tmcId for company admin.
-
Without role: The API user is created without any RBAC roles. Requires orgId. Use this option for granular permission control — assign specific RBAC groups or roles to the returned userId via the RBAC assignment endpoints.
Credential types:
- CLIENT_CREDENTIALS (default): Returns a clientId and clientSecret. Use them in POST /v2/auth/oauth2-token to obtain an access token.
- SCIM_TOKEN: Returns a SCIM bearer token instead of a client secret. Requires role set to COMPANY_ADMIN.
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.).
- If created without role: Use the returned userId with POST /v3/user-groups/{userGroupId}/members to add the user to RBAC groups, or POST /v3/users/{userId}/roles to assign roles directly.
Notes:
- Store the clientSecret or scimToken securely. They are only returned once at creation and cannot be retrieved later.
- There is a fixed limit on the number of API users per TMC. To increase this limit, contact your Spotnana representative.
Request
- Base URLhttps://api-ext-sboxmeta.partners.spotnana.com
- Authnone required
Request body
Example request
{
"tmcId": "ecc5b835-8001-430c-98f8-fedeccebe4cf",
"orgId": "ecc5b835-8001-430c-98f8-fedeccebe4cf",
"name": "My Integration Bot",
"role": "TMC_ADMIN",
"credentialType": "CLIENT_CREDENTIALS"
}Response
User created successfully
Example response
{
"clientId": "1ddj3hs95to28iag7m4hl9lv2",
"clientSecret": "1hgea74sii6os6vlkk1c7krlfgniaphbn2c56pml",
"userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"scimToken": "eyJzY29wZSI6InNjaW0iLCJjbGllbnRJZCI6Ii4uLiIsImVuY3J5cHRlZFNlY3JldCI6Ii4uLiJ9"
}Changes
- info
added the new optional request property
- info
the
request property default valueTMC_ADMINwas removed - info
added the optional property
to the response with the status
- info