Skip to content

Create a workspace or service user, optionally setting an initial local password for a workspace user.

POST
/api/workspace/users
curl --request POST \
--url https://example.com/api/workspace/users \
--header 'Content-Type: application/json' \
--data '{ "UserName": "example", "Email": "example", "FirstName": "example", "LastName": "example", "UserType": 0, "RoleIds": [ "example" ], "UserId": "example", "EmailConfirmed": true, "IsBlocked": true, "ExtendedData": { "additionalProperty": "example" }, "Password": "example" }'
  • None
access_token
string

Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.

Request payload to create a workspace user.

object
UserName

Exact Unicode login name. Lookup uniqueness uses trim, NFC, and invariant uppercase.

string
nullable
Email

Optional email address.

string
nullable
FirstName

First name (required).

string
nullable
LastName

Last name.

string
nullable
UserType
integer format: int32
Allowed values: 0 1 2
RoleIds

Optional role identifiers to assign.

Array<string>
nullable
UserId

Optional caller-supplied stable user identifier.

string
nullable
EmailConfirmed

Whether the optional email is confirmed.

boolean
IsBlocked

Whether the created user is blocked.

boolean
ExtendedData

Optional non-secret integration metadata.

object
key
additional properties
string
Password

Optional initial local password. Supported only for workspace users; omit it for passwordless provisioning and service users.

string
nullable

OK

Media typeapplication/json
object
Data

Detailed representation of a workspace user.

object
Id

User identifier.

string
nullable
UserName

Exact stored Unicode login name.

string
nullable
Email

Optional email address.

string
nullable
FirstName

First name.

string
nullable
LastName

Last name.

string
nullable
UserType
integer format: int32
Allowed values: 0 1 2
IsBlocked

Whether the user is blocked from signing in.

boolean
IsDeleted

Whether the user is soft deleted.

boolean
Avatar

Avatar presentation values for a workspace user.

object
Initials

Initials derived from the user name.

string
nullable
BackgroundColor

Hex color for the avatar background.

string
nullable
TextColor

Hex color for the avatar text.

string
nullable
CreatedAt

Creation timestamp.

string format: date-time
DeletedAt

Deletion timestamp, if deleted.

string format: date-time
nullable
OriginalUserName

Original user name before deletion.

string
nullable
OriginalEmail

Original email before deletion.

string
nullable
Roles

Roles assigned to the user.

Array<object>
nullable

Summary of a workspace role.

object
Id

Role identifier.

string
nullable
Name

Role display name.

string
nullable
Description

Role description.

string
nullable
AutoAssign

Whether the role is auto-assigned to new users.

boolean
IsSystem

Whether the role is a protected system role.

boolean
UserCount

Number of users assigned to this role.

integer format: int32
PermissionCount

Number of permissions assigned to this role.

integer format: int32
Tags

Tag names assigned to the role.

Array<string>
nullable
ExtendedData

Non-secret integration metadata.

object
key
additional properties
string
HasLocalPassword

Whether local password authentication is available.

boolean
ExternalIdentity

Safe current external identity state attached to a local user projection.

object
LinkId
string
nullable
ProviderKind
integer format: int32
Allowed values: 1 2
ProviderDisplayName
string
nullable
Status
integer format: int32
Allowed values: 1 2 3 4 5
Profile

Provider-owned profile metadata. It is never an authorization input.

object
Email
string
nullable
GivenName
string
nullable
FamilyName
string
nullable
DisplayName
string
nullable
Phone
string
nullable
DiagnosticCode
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12
LastSynchronizedAtUtc
string format: date-time
nullable
EmailConfirmed

Whether the optional email address has been confirmed.

boolean
RowVersion

Opaque concurrency token.

string
nullable
ExtendedData

Non-secret integration metadata.

object
key
additional properties
string
DisplayName

Canonical display name.

string
nullable
WorkerAssociation

Current Work Schedule association projected into a user read model.

object
Worker

Field-safe reference to the Worker associated with a workspace user.

object
EntityDefinitionId
string
nullable
Id
string
nullable
Number
string
nullable
DisplayName
string
nullable
Availability
string
nullable
AssociationVersion
string
nullable
NamesManagedByWorker
boolean
CanRead
boolean
CanManage
boolean
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"UserType": 0,
"ExternalIdentity": {
"ProviderKind": 1,
"Status": 1,
"DiagnosticCode": 0
}
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Bad Request

Media typeapplication/json
object
Data

Detailed representation of a workspace user.

object
Id

User identifier.

string
nullable
UserName

Exact stored Unicode login name.

string
nullable
Email

Optional email address.

string
nullable
FirstName

First name.

string
nullable
LastName

Last name.

string
nullable
UserType
integer format: int32
Allowed values: 0 1 2
IsBlocked

Whether the user is blocked from signing in.

boolean
IsDeleted

Whether the user is soft deleted.

boolean
Avatar

Avatar presentation values for a workspace user.

object
Initials

Initials derived from the user name.

string
nullable
BackgroundColor

Hex color for the avatar background.

string
nullable
TextColor

Hex color for the avatar text.

string
nullable
CreatedAt

Creation timestamp.

string format: date-time
DeletedAt

Deletion timestamp, if deleted.

string format: date-time
nullable
OriginalUserName

Original user name before deletion.

string
nullable
OriginalEmail

Original email before deletion.

string
nullable
Roles

Roles assigned to the user.

Array<object>
nullable

Summary of a workspace role.

object
Id

Role identifier.

string
nullable
Name

Role display name.

string
nullable
Description

Role description.

string
nullable
AutoAssign

Whether the role is auto-assigned to new users.

boolean
IsSystem

Whether the role is a protected system role.

boolean
UserCount

Number of users assigned to this role.

integer format: int32
PermissionCount

Number of permissions assigned to this role.

integer format: int32
Tags

Tag names assigned to the role.

Array<string>
nullable
ExtendedData

Non-secret integration metadata.

object
key
additional properties
string
HasLocalPassword

Whether local password authentication is available.

boolean
ExternalIdentity

Safe current external identity state attached to a local user projection.

object
LinkId
string
nullable
ProviderKind
integer format: int32
Allowed values: 1 2
ProviderDisplayName
string
nullable
Status
integer format: int32
Allowed values: 1 2 3 4 5
Profile

Provider-owned profile metadata. It is never an authorization input.

object
Email
string
nullable
GivenName
string
nullable
FamilyName
string
nullable
DisplayName
string
nullable
Phone
string
nullable
DiagnosticCode
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12
LastSynchronizedAtUtc
string format: date-time
nullable
EmailConfirmed

Whether the optional email address has been confirmed.

boolean
RowVersion

Opaque concurrency token.

string
nullable
ExtendedData

Non-secret integration metadata.

object
key
additional properties
string
DisplayName

Canonical display name.

string
nullable
WorkerAssociation

Current Work Schedule association projected into a user read model.

object
Worker

Field-safe reference to the Worker associated with a workspace user.

object
EntityDefinitionId
string
nullable
Id
string
nullable
Number
string
nullable
DisplayName
string
nullable
Availability
string
nullable
AssociationVersion
string
nullable
NamesManagedByWorker
boolean
CanRead
boolean
CanManage
boolean
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"UserType": 0,
"ExternalIdentity": {
"ProviderKind": 1,
"Status": 1,
"DiagnosticCode": 0
}
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Forbidden

Media typeapplication/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}