SuperTokens Users API

User management and listing

OpenAPI Specification

supertokens-users-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: SuperTokens Core Driver Interface Email Password Users API
  description: The Core Driver Interface (CDI) is the REST API exposed by the supertokens-core HTTP service. Backend SDKs (Node.js, Python, Go) use this API to communicate with the core service for authentication operations including session management, user sign-up/sign-in, email verification, password reset, social login, passwordless authentication, multi-tenancy, and user metadata management.
  version: '5.1'
  contact:
    name: SuperTokens
    url: https://supertokens.com
    email: team@supertokens.com
  license:
    name: Apache-2.0
    url: https://github.com/supertokens/supertokens-core/blob/master/LICENSE.md
servers:
- url: http://{host}:{port}
  description: SuperTokens Core service
  variables:
    host:
      default: localhost
      description: Hostname of the SuperTokens Core instance
    port:
      default: '3567'
      description: Port number of the SuperTokens Core instance
security:
- ApiKeyAuth: []
tags:
- name: Users
  description: User management and listing
paths:
  /users:
    get:
      operationId: listUsers
      summary: List Users
      description: Returns a paginated list of users with optional filtering by tenant and recipe type.
      tags:
      - Users
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          default: 100
        description: Maximum number of users to return
      - name: paginationToken
        in: query
        schema:
          type: string
        description: Pagination token from previous response
      - name: includeRecipeIds
        in: query
        schema:
          type: string
        description: Comma-separated list of recipe IDs to filter by
      responses:
        '200':
          description: Paginated user list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListUsersResponse'
  /user/remove:
    delete:
      operationId: deleteUser
      summary: Delete User
      description: Permanently deletes a user and all their session, metadata, and authentication data.
      tags:
      - Users
      parameters:
      - name: userId
        in: query
        required: true
        schema:
          type: string
        description: User ID to delete
      responses:
        '200':
          description: User deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
components:
  schemas:
    User:
      type: object
      description: A SuperTokens user object
      properties:
        id:
          type: string
          description: Unique user ID
        emails:
          type: array
          items:
            type: string
        phoneNumbers:
          type: array
          items:
            type: string
        thirdParty:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              userId:
                type: string
        timeJoined:
          type: integer
          description: Unix timestamp when user joined
        tenantIds:
          type: array
          items:
            type: string
        loginMethods:
          type: array
          items:
            type: object
    StatusResponse:
      type: object
      properties:
        status:
          type: string
          example: OK
    ListUsersResponse:
      type: object
      properties:
        status:
          type: string
        users:
          type: array
          items:
            $ref: '#/components/schemas/User'
        nextPaginationToken:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key
      description: SuperTokens Core API key (configured in config.yaml or via environment variable)