跳到主要内容

Add a user

POST /api/2.0/people/

Adds a new portal user with the first name, last name, email address, and several optional parameters specified in the request.

Request body​

isVisitor​

type: boolean

Specifies if this is a guest (true) or user (false)

Example: true

email​

type: string

User email

Example: "string"

firstname​

type: string

User first name

Example: "string"

lastname​

type: string

User last name

Example: "string"

department​

type: string[]

User department

title​

type: string

User title

Example: "string"

location​

type: string

User location

Example: "string"

sex​

type: string

User sex (male or female)

Example: "string"

birthday​

type: string

User birthday

Example: "string"

worksfrom​

type: string

User registration date. If it is not specified, then the current date will be set

Example: "string"

comment​

type: string

User comment

Example: "string"

contacts​

type: Contact[]

Contact list

files​

type: string

Avatar photo URL

Example: "string"

password​

type: string

User password

Example: "string"

passwordHash​

type: string

Password hash

Example: "string"

lead​

type: string[]

User lead

Request example​

{
"isVisitor": true,
"email": "string",
"firstname": "string",
"lastname": "string",
"department": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"title": "string",
"location": "string",
"sex": "string",
"birthday": "string",
"worksfrom": "string",
"comment": "string",
"contacts": [
{
"Type": "GTalk",
"Value": "my@gmail.com"
}
],
"files": "string",
"password": "string",
"passwordHash": "string",
"lead": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}

Returns​

Newly added user. A request that is not authenticated returns 401.

FirstName​

type: string

Example: "Mike"

LastName​

type: string

Example: "Zanyatski"

UserName​

type: string

Example: "Mike.Zanyatski"

Email​

type: string

Example: "my@domain.com"

Birthday​

type: string

Example: "2008-04-10T06-30-00.000Z"

Sex​

type: string

Example: "male"

Status​

type: "Active" | "Terminated" | "LeaveOfAbsence" | "Default" | "All"

[1 - Active, 2 - Terminated, 4 - LeaveOfAbsence, 5 - Default, 7 - All]

Example: 1

ActivationStatus​

type: "NotActivated" | "Activated" | "Pending" | "AutoGenerated"

[0 - NotActivated, 1 - Activated, 2 - Pending, 4 - AutoGenerated]

Example: 0

Terminated​

type: string

Example: "2008-04-10T06-30-00.000Z"

Department​

type: string

Example: "Marketing"

WorkFrom​

type: string

Example: "2008-04-10T06-30-00.000Z"

Groups​

type: GroupWrapperSummary[]

Location​

type: string

Example: "Palo Alto"

Notes​

type: string

Example: "Notes to worker"

Lead​

type: string

Example: "055312F1-1D71-4786-BB5B-D5910316E53C"

AvatarMedium​

type: string

Example: "url to medium avatar"

Avatar​

type: string

Example: "url to big avatar"

IsAdmin​

type: boolean

Example: false

IsLDAP​

type: boolean

Example: false

ListAdminModules​

type: string[]

IsOwner​

type: boolean

Example: false

IsVisitor​

type: boolean

Example: false

CultureName​

type: string

Example: "en-EN"

IsSSO​

type: boolean

Example: false

QuotaLimit​

type: integer

Example: 0

UsedSpace​

type: integer

Example: 0

DocsSpace​

type: integer

Example: 0

MailSpace​

type: integer

Example: 0

TalkSpace​

type: integer

Example: 0

Id​

type: string

Example: "00000000-0000-0000-0000-000000000000"

DisplayName​

type: string

Example: "Mike Zanyatski"

Title​

type: string

Example: "Manager"

AvatarSmall​

type: string

Example: "url to small avatar"

ProfileUrl​

type: string

Example: "/Products/People/Profile.aspx?user=administrator"

Response example​

{
"FirstName": "Mike",
"LastName": "Zanyatski",
"UserName": "Mike.Zanyatski",
"Email": "my@domain.com",
"Birthday": "2008-04-10T06-30-00.000Z",
"Sex": "male",
"Status": 1,
"ActivationStatus": 0,
"Terminated": "2008-04-10T06-30-00.000Z",
"Department": "Marketing",
"WorkFrom": "2008-04-10T06-30-00.000Z",
"Groups": [
{
"Name": "Group Name",
"Id": "00000000-0000-0000-0000-000000000000",
"Manager": "Jake.Zazhitski"
}
],
"Location": "Palo Alto",
"Notes": "Notes to worker",
"Lead": "055312F1-1D71-4786-BB5B-D5910316E53C",
"AvatarMedium": "url to medium avatar",
"Avatar": "url to big avatar",
"IsAdmin": false,
"IsLDAP": false,
"ListAdminModules": [
"projects,crm"
],
"IsOwner": false,
"IsVisitor": false,
"CultureName": "en-EN",
"IsSSO": false,
"QuotaLimit": 0,
"UsedSpace": 0,
"DocsSpace": 0,
"MailSpace": 0,
"TalkSpace": 0,
"Id": "00000000-0000-0000-0000-000000000000",
"DisplayName": "Mike Zanyatski",
"Title": "Manager",
"AvatarSmall": "url to small avatar",
"ProfileUrl": "/Products/People/Profile.aspx?user=administrator"
}