> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Register a user

> Pre-register a user in the current tenant. Optionally sends an invite email if the auth provider is managed by TrueFoundry.



## OpenAPI

````yaml /openapi.json post /api/svc/v1/users/register
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: app.truefoundry.com
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Metrics
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: Logs
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
paths:
  /api/svc/v1/users/register:
    post:
      tags:
        - Users
      summary: Register a user
      description: >-
        Pre-register a user in the current tenant. Optionally sends an invite
        email if the auth provider is managed by TrueFoundry.
      operationId: User.registerUsers
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterUsersRequest'
      responses:
        '200':
          description: The user has been successfully registered.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterUsersResponse'
        '401':
          description: Unauthorized. User does not have permission to register users.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
        '409':
          description: Conflict. Email is reserved for internal use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
        '422':
          description: Unprocessable Entity. Invalid email.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
      security:
        - jwt: []
components:
  schemas:
    RegisterUsersRequest:
      type: object
      properties:
        email:
          type: string
          description: Email address of the user to register.
          example: user@example.com
        sendInviteEmail:
          type: boolean
          description: When true, sends an invite email to the user after registration.
          default: false
          nullable: true
        skipIfUserExists:
          type: boolean
          description: >-
            When true, silently skips registration if the user already exists
            instead of returning an error.
          default: false
          nullable: true
        dryRun:
          type: boolean
          default: false
          description: When true, validates the request without persisting changes.
          nullable: true
        acceptInviteClientURL:
          type: string
          description: >-
            URL the user is redirected to when they accept the invite. Required
            when sendInviteEmail is true.
          example: https://app.example.com/invite-accept
          nullable: true
      required:
        - email
      title: RegisterUsersRequest
      x-fern-type-name: RegisterUsersRequest
    RegisterUsersResponse:
      type: object
      properties: {}
      title: RegisterUsersResponse
      x-fern-type-name: RegisterUsersResponse
    HttpError:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP Status Code
        message:
          type: string
          description: Error Message
        code:
          oneOf:
            - type: integer
            - type: string
          description: Error code
          nullable: true
        details:
          type: array
          description: Error details
          items:
            type: object
          nullable: true
      required:
        - statusCode
        - message
      title: HttpError
      x-fern-type-name: HttpError
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````