---
title: "Add a user to Organization"
method: POST
path: "/v1/organizations/{organizationId}/users"
tags: ["Organizations"]
---

# Add a user to Organization

`POST /v1/organizations/{organizationId}/users`

## Request

- Base URL: `https://api.tetrascience.com`
- URL: `https://api.tetrascience.com/v1/organizations/{organizationId}/users`
- Auth: API key in header `ts-auth-token` and API key in header `x-org-slug`

Add a new user to the organization or invite existing users. Assigns default roles and sends invitation emails as configured.

## Parameters

- `#/paths/~1v1~1organizations~1{organizationId}/get/parameters/0` (unresolved $ref)

## Request body

- object
  - `firstName` string
  - `lastName` string
  - `email` Email (unresolved $ref)
  - `role` 'admin' | 'member' | 'readonly'
  - `password` string
  - `status` 'active' | 'inactive' | 'locked'
  - `authType` AuthType (unresolved $ref)

## Response `201`

Added new user.

- object
  - `authType` AuthType (unresolved $ref)
  - `email` Email (unresolved $ref)
  - `firstName` string
  - `lastName` string
  - `id` Id (unresolved $ref)
  - `lastActivity` string
  - `status` 'active' | 'inactive'
  - `systemRole` string
  - `roles` object[]
    - `id` Id (unresolved $ref)
    - `orgSlug` Schema (unresolved $ref)
    - `organizationId` Id (unresolved $ref)
    - `role` string
    - `roleId` Id (unresolved $ref)
    - `status` Status (unresolved $ref)
    - `userId` Id (unresolved $ref)
    - `orgName` string
  - `tokens` object[]
    - `id` Id (unresolved $ref)
    - `userId` Id (unresolved $ref)
    - `token` string: Truncated token value
    - `expiresAt` CreatedAt (unresolved $ref)
    - `createdAt` CreatedAt (unresolved $ref)
    - `createdBy` object
      - `id` Id (unresolved $ref)
      - `firstName` string, John
      - `lastName` string, Snow
  - `password_history` object[]
  - `athenaCredentialsUpdatedAt` CreatedAt (unresolved $ref)
  - `preferences` Preferences (unresolved $ref)
  - `rowPreferences` Preferences (unresolved $ref)

## Other responses

- `400`: Bad request, details in response.
- `401`: Invalid token
- `403`: Caller is not authorized to perform this action

---

[API](https://skmtc.dev/tetrascience/apis/administration.md) - [All operations](https://skmtc.dev/tetrascience/apis/administration/llms.txt) - [OpenAPI document](https://skmtc.dev/tetrascience/apis/administration/revisions/c1c829febcc5?raw)
