POST
/
{organizationId}
/
users
curl --request POST \
  --url https://app.formbricks.com/api/v2/organizations/{organizationId}/users \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "isActive": true,
  "name": "John Doe",
  "email": "example@example.com",
  "role": "member",
  "teams": [
    "team1",
    "team2"
  ]
}'
{
  "id": "<string>",
  "createdAt": "2021-01-01T00:00:00.000Z",
  "updatedAt": "2021-01-01T00:00:00.000Z",
  "lastLoginAt": "2021-01-01T00:00:00.000Z",
  "isActive": true,
  "name": "John Doe",
  "email": "example@example.com",
  "role": "member",
  "teams": [
    "team1",
    "team2"
  ]
}

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Path Parameters

organizationId
string
required

The ID of the organization

Body

application/json
The user to create
name
string
required

The name of the user

Minimum length: 1
Example:

"John Doe"

email
string
required

The email of the user

Maximum length: 255
Example:

"example@example.com"

role
enum<string>
required

The role of the user in the organization

Available options:
owner,
manager,
member
Example:

"member"

isActive
boolean

Whether the user is active

Example:

true

teams
string[]

The list of teams the user is a member of

Example:
["team1", "team2"]

Response

201 - application/json
User created successfully.
id
string

The ID of the user

createdAt
string

The date and time the user was created

Example:

"2021-01-01T00:00:00.000Z"

updatedAt
string

The date and time the user was last updated

Example:

"2021-01-01T00:00:00.000Z"

lastLoginAt
string

The date and time the user last logged in

Example:

"2021-01-01T00:00:00.000Z"

isActive
boolean

Whether the user is active

Example:

true

name
string

The name of the user

Minimum length: 1
Example:

"John Doe"

email
string

The email of the user

Maximum length: 255
Example:

"example@example.com"

role
enum<string>

The role of the user in the organization

Available options:
owner,
manager,
member
Example:

"member"

teams
string[]

The list of teams the user is a member of

Example:
["team1", "team2"]

Was this page helpful?