Skip to main content
PUT
Upsert an user

Authorizations

X-API-Key
string
header
required

Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.

Path Parameters

id
string<uuid>
required

Record id.

Query Parameters

update
string[]
required

Columns to overwrite when the row already exists. Repeat the parameter for each column: a single comma-separated value is read as one column name and fails at the database. Without the parameter the request is rejected with 400.

Body

application/json
appUserId
string<uuid>
required

The user account behind this membership.

id
string<uuid>

Unique id of the membership.

roleId
string<uuid> | null

Role the user carries.

roleType
enum<string>
default:custom

admin grants everything. custom follows roleId.

Available options:
admin,
custom
status
enum<string>
default:active

Whether the user can sign in.

Available options:
active,
deactivated
createdAt
string<date-time>

When the record was created.

updatedAt
string<date-time>

When the record last changed.

Response

The upserted user.

value
object
required

A user account's membership in your organization, including the role it carries.