Skip to main content
POST
Add team member

Overview

Add a new or existing user to a tenant. If the user doesn’t exist, a new account will be created automatically.

Authorization

  • User must be authenticated with a valid Bearer token
  • User must have ADMIN role in the specified tenant

Behavior

  • If the email doesn’t exist in the system, creates a new user account
  • If the user exists, adds them to the tenant with the specified role
  • Sets is_active to true and updates last_active_at
  • Fires a UserRegistered event for webhook integrations

Validation Rules

  • email: Required, must be a valid email format
  • role: Required, must be either “ADMIN” or “MEMBER”

Example Usage

Error Responses

Already a Member (400)

Validation Error (422)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenantId
integer
required

Tenant ID

Body

application/json
email
string<email>
required
role
enum<string>
required
Available options:
ADMIN,
MEMBER

Response

200 - application/json

Member added

message
string