openapi: 3.0.1
info:
title: Sana Assignments Users API
description: Tenant-scoped REST API for the Sana platform (Sana AI / Sana Agents and Sana Learn). All requests are authenticated with a Bearer access token obtained via the OAuth 2.0 client credentials flow and are scoped to a customer's <domain>.sana.ai tenant. The endpoints below are transcribed from Sana's public API reference and cover platform administration (users, groups, programs, courses, paths, assignments, teamspaces), reporting/insights, and standards-based integration surfaces (xAPI). SCIM 2.0 provisioning is offered at /scim/v2 and is not modeled here. AI agent/assistant capabilities are configured primarily in-product and are not exposed as a public chat-completions endpoint in this reference. No endpoints are fabricated; replace <domain> with your tenant domain.
termsOfService: https://sanalabs.com/legal
contact:
name: Sana
url: https://docs.sana.ai/api-docs/
version: '0.0'
servers:
- url: https://<domain>.sana.ai
description: Tenant-scoped base URL; replace <domain> with your Sana tenant.
security:
- bearerAuth: []
tags:
- name: Users
paths:
/api/v0/users:
get:
operationId: listUsers
tags:
- Users
summary: List all users.
responses:
'200':
description: OK
post:
operationId: createUser
tags:
- Users
summary: Create a user.
responses:
'200':
description: OK
/api/v0/users/{userId}:
parameters:
- name: userId
in: path
required: true
schema:
type: string
get:
operationId: getUser
tags:
- Users
summary: Get a user.
responses:
'200':
description: OK
patch:
operationId: updateUser
tags:
- Users
summary: Update a user.
responses:
'200':
description: OK
delete:
operationId: deleteUser
tags:
- Users
summary: Delete a user.
responses:
'200':
description: OK
/api/v0/users/{userId}/send-invite:
parameters:
- name: userId
in: path
required: true
schema:
type: string
post:
operationId: sendUserInvite
tags:
- Users
summary: Send an invite to a user.
responses:
'200':
description: OK
/api/v0/users/{userId}/invite-link:
parameters:
- name: userId
in: path
required: true
schema:
type: string
post:
operationId: createUserInviteLink
tags:
- Users
summary: Generate a new invite link for a user.
responses:
'200':
description: OK
/api/v0/users/{userId}/groups:
parameters:
- name: userId
in: path
required: true
schema:
type: string
get:
operationId: listUserGroups
tags:
- Users
summary: List a user's groups.
responses:
'200':
description: OK
/api/v0/users/{userId}/manager/{managerId}:
parameters:
- name: userId
in: path
required: true
schema:
type: string
- name: managerId
in: path
required: true
schema:
type: string
put:
operationId: setUserManager
tags:
- Users
summary: Set a user's manager.
responses:
'200':
description: OK
/api/v0/users/{userId}/manager:
parameters:
- name: userId
in: path
required: true
schema:
type: string
delete:
operationId: deleteUserManager
tags:
- Users
summary: Delete a user's manager.
responses:
'200':
description: OK
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Bearer access token obtained from POST /api/token via the OAuth 2.0 client credentials flow. Sent as: Authorization: Bearer <accessToken>.'