---
title: "Adds a user (creating one if needed) to a specific existing tenant inside an app with a specified role. Idempotent: an existing user already in the tenant is returned as-is (password is refreshed). POST /account/test/playwright/add-user-to-tenant Headers: x-playwright-api-key: <your-api-key> Body: { workspaceId, tenantId, email, password?, role?: 'ADMIN'|'MEMBER', firstName?, lastName? } Returns: { userId, email, tenantUserId, tenantId, role, created, token } - token is a fresh Bearer access token for the user, ready for SDK login. - created=true if the tenantUser was created, false if it already existed."
method: POST
path: "/account/test/playwright/add-user-to-tenant"
tags: ["account"]
---

# Adds a user (creating one if needed) to a specific existing tenant inside an app with a specified role. Idempotent: an existing user already in the tenant is returned as-is (password is refreshed). POST /account/test/playwright/add-user-to-tenant Headers: x-playwright-api-key: <your-api-key> Body: { workspaceId, tenantId, email, password?, role?: 'ADMIN'|'MEMBER', firstName?, lastName? } Returns: { userId, email, tenantUserId, tenantId, role, created, token } - token is a fresh Bearer access token for the user, ready for SDK login. - created=true if the tenantUser was created, false if it already existed.

`POST /account/test/playwright/add-user-to-tenant`

## Request

- Base URL: `https://api.thebridge.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.thebridge.dev/account/test/playwright/add-user-to-tenant`
- Auth: none declared

## Request body

- AddUserToTenantRequestDto

## Response `201`

---

[API](https://skmtc.dev/thebridge/apis/bridge-api.md) · [All operations](https://skmtc.dev/thebridge/apis/bridge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thebridge/apis/bridge-api/revisions/290fffcb3d80?raw)
