openapi: 3.0.1 info: title: Scalekit Admin Portal Authentication API description: Scalekit is the authentication platform for B2B SaaS and AI agents. The REST API provides programmatic access to enterprise Single Sign-On (SAML / OIDC connections), SCIM directory provisioning, organizations, users and memberships, organization roles, machine-to-machine (M2M) authentication, and agent / MCP connected accounts and tool execution. The API base URL is per-environment; access tokens are obtained via the OAuth 2.0 client credentials grant and passed as Bearer tokens. termsOfService: https://www.scalekit.com/legal/terms-of-service contact: name: Scalekit Support url: https://www.scalekit.com email: support@scalekit.com version: '1.0' servers: - url: https://{environment}.scalekit.com description: Production environment (per-tenant subdomain) variables: environment: default: your-subdomain description: Your Scalekit environment subdomain. - url: https://{environment}.scalekit.dev description: Development environment (per-tenant subdomain) variables: environment: default: your-subdomain description: Your Scalekit development environment subdomain. security: - bearerAuth: [] tags: - name: Authentication description: OAuth 2.0 client credentials token issuance. paths: /oauth/token: post: operationId: createToken tags: - Authentication summary: Issue an access token (client credentials) description: Exchange a client_id and client_secret for a short-lived Bearer access token using the OAuth 2.0 client credentials grant. The returned token authorizes all subsequent management API calls. security: [] requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/TokenRequest' responses: '200': description: Access token issued. content: application/json: schema: $ref: '#/components/schemas/TokenResponse' '401': $ref: '#/components/responses/Unauthorized' components: responses: Unauthorized: description: Authentication failed or access token missing/expired. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: TokenResponse: type: object properties: access_token: type: string token_type: type: string example: Bearer expires_in: type: integer description: Lifetime in seconds. Error: type: object properties: code: type: string message: type: string details: type: array items: type: object TokenRequest: type: object required: - grant_type - client_id - client_secret properties: grant_type: type: string enum: - client_credentials client_id: type: string client_secret: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: OAuth 2.0 client-credentials access token passed as a Bearer token. oauth2ClientCredentials: type: oauth2 flows: clientCredentials: tokenUrl: https://{environment}.scalekit.com/oauth/token scopes: {}