POST/users
ユーザーを登録する。
SSOを使用する場合、「使用中」ステータスでユーザーが登録され、すぐサービスを利用可能。
SSOを使用しない場合、「登録待ち」ステータスでユーザーが登録される。パスワード作成方法として、「管理者が作成」または「ユーザーが作成」を選択可能(既定:ユーザーが作成)
注意
- ユーザーの登録/更新/部分更新/配置転換 API は、同じユーザーに対しては同時に呼び出してはならず、順番通りに呼び出すことを推奨します。
Authorization URL - https://auth.worksmobile.com/oauth2/v2.0/authorize
Token URL - https://auth.worksmobile.com/oauth2/v2.0/token
Refresh URL - https://auth.worksmobile.com/oauth2/v2.0/token
user
directory
Header | type | Description |
---|---|---|
Authorization | string | Bearer {token} required |
Content-Type | string | application/json required example : application/json |
Property | Type | Description |
---|---|---|
domainId | integer | ドメインID required format : int32 |
userExternalKey | string | ユーザーのExternalKey 「%」、「\」、「#」、「/」、「?」の特殊文字は利用できない。 maxLength : 100 nullable : true |
string | ログインID = メールアドレス
required maxLength : 90 | |
userName | object (userName) | 名前情報 required |
i18nNames | array (UserI18nName) | 多言語名リスト minItems : 0 |
nickName | string | ニックネーム
maxLength : 100 nullable : true |
privateEmail | string | 個人メールアドレス
maxLength : 256 nullable : true |
aliasEmails | array (string) | サブメールアドレスリスト
minItems : 0 maxItems : 10 |
employmentTypeId | string | 利用権限タイプID
nullable : true |
searchable | boolean | サジェストへの表示フラグ(既定値: true) default : true |
passwordConfig | object (passwordConfig) | 初期ログインパスワード設定(既定値: MEMBER) nullable : true |
organizations | array (UserOrganization) | ユーザーが所属するドメインリスト(原職、兼職含む) minItems : 0 |
telephone | string | 電話番号 maxLength : 100 pattern : ^(?=.*[0-9])[0-9+\-*#PTpt()\u3000]{0,100} nullable : true |
cellPhone | string | 携帯電話番号 maxLength : 100 pattern : ^(?=.*[0-9])[0-9+\-*#PTpt()\u3000]{0,100} nullable : true |
fax | string | FAX番号
maxLength : 100 pattern : ^(?=.*[0-9])[0-9+\-*#PTpt()\u3000]{0,100} nullable : true |
location | string | 勤務先 maxLength : 100 nullable : true |
task | string | 担当業務 maxLength : 100 nullable : true |
messenger | object (messenger) | SNSタイプモデル nullable : true |
birthdayCalendarType | string | 誕生日の日付タイプ
Allowed values : SOLAR, LUNAR nullable : true |
birthday | string | 生年月日(YYYY-MM-DD) maxLength : 10 nullable : true |
locale | string | 多言語コード Allowed values : ja_JP, ko_KR, en_US, zh_CN, zh_TW |
hiredDate | string | 入社日(YYYY-MM-DD) maxLength : 10 nullable : true |
timeZone | string | example : Europe/Berlin |
customFields | array (UserCustomField) |
minItems : 0 maxItems : 50 |
relations | array (UserRelation) | 関係者連絡先リスト minItems : 0 maxItems : 10 |
Property | Type | Description |
---|---|---|
lastName | string | 姓
maxLength : 80 nullable : true |
firstName | string | 名
maxLength : 80 nullable : true |
phoneticLastName | string | 姓のフリガナ(カタカナのみ許可) maxLength : 100 nullable : true |
phoneticFirstName | string | 名のフリガナ(カタカナのみ許可) maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
language | string | 多言語コード Allowed values : ja_JP, ko_KR, en_US, zh_CN, zh_TW |
firstName | string | 多言語の名
maxLength : 100 nullable : true |
lastName | string | 多言語の姓
maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
passwordCreationType | string | パスワード作成方法
default : MEMBER Allowed values : ADMIN, MEMBER |
password | string | パスワード |
Property | Type | Description |
---|---|---|
domainId | integer | ドメインID required format : int32 |
primary | boolean | 代表ドメインフラグ 代表を設定しない場合、自動的に一番最初の値が代表に設定されます。 required |
userExternalKey | string | ユーザーのExternalKey 「%」、「\」、「#」、「/」、「?」の特殊文字は利用不可。 maxLength : 100 nullable : true |
string | メールアドレス maxLength : 90 | |
levelId | string | 職級ID
nullable : true |
orgUnits | array (orgUnit) | 組織リスト minItems : 0 maxItems : 20 |
Property | Type | Description |
---|---|---|
orgUnitId | string | 組織ID
required |
primary | boolean | 代表組織フラグ required |
positionId | string | 役職ID
nullable : true |
isManager | boolean | 組織長フラグ(既定値: false) default : false |
visible | boolean | ユーザー公開フラグ(既定値: true) default : true |
useTeamFeature | boolean | チーム機能の利用フラグ(既定値: true)
default : true |
Property | Type | Description |
---|---|---|
protocol | string | SNSタイプ
required Allowed values : LINE, FACEBOOK, TWITTER, CUSTOM |
customProtocol | string | カスタムSNSタイプ
maxLength : 100 |
messengerId | string | SNS ID required minLength : 1 maxLength : 100 |
Property | Type | Description |
---|---|---|
customFieldId | string | カスタムフィールドを識別できる値
required |
value | string | カスタムフィールドテキスト
maxLength : 100 nullable : true |
link | string | カスタムフィールドリンク
カスタムフィールドタイプが
maxLength : 300 nullable : true |
Property | Type | Description |
---|---|---|
relationUserId | string | 関係者連絡先ユーザーID |
relationName | string | 関係性 maxLength : 50 |
example
1{
2 "domainId": 10000001,
3 "userExternalKey": "USER_EXT_01",
4 "email": "localpart@example.com",
5 "userName": {
6 "lastName": "ワークス",
7 "firstName": "太郎"
8 },
9 "nickName": "nickname",
10 "privateEmail": "private.works@example.com",
11 "searchable": true,
12 "organizations": [
13 {
14 "domainId": 10000001,
15 "primary": true,
16 "email": "localpart@example.com",
17 "levelId": "levelaa7-b824-4937-66af-042f1f43cefa",
18 "orgUnits": [
19 {
20 "orgUnitId": "orgunitf-f27f-4af8-27e1-03817a911417",
21 "primary": true,
22 "positionId": "position-7027-4a02-b838-6f52b5e38db7",
23 "isManager": true,
24 "visible": true,
25 "useTeamFeature": true
26 }
27 ]
28 }
29 ],
30 "telephone": "031-1234-5678",
31 "cellPhone": "090-1234-5678",
32 "fax": "031-2345-6789",
33 "location": "green building",
34 "task": "mytask",
35 "messenger": {
36 "protocol": "LINE",
37 "messengerId": "lineid"
38 },
39 "birthdayCalendarType": "SOLAR",
40 "birthday": "2000-01-01",
41 "locale": "ja_JP",
42 "hiredDate": "2020-01-01",
43 "timeZone": "Asia/Tokyo",
44 "customFields": [
45 {
46 "customFieldId": "customfd-fc09-4a57-ab38-03dc6c425e09",
47 "value": "カスタム値"
48 }
49 ],
50 "relations": [
51 {
52 "relationUserId": "userfd-fc09-4a57-ab38-03dc6c425e09",
53 "relationName": "Manager"
54 }
55 ]
56}
OK
Property | Type | Description |
---|---|---|
domainId | integer | ドメインID required format : int32 |
userId | string | ユーザーID
readOnly : true |
userExternalKey | string | ユーザーのExternalKey 「%」、「\」、「#」、「/」、「?」の特殊文字は利用できない。 maxLength : 100 nullable : true |
isAdministrator | boolean | ドメイン管理者フラグ readOnly : true |
isPending | boolean | 登録待ちステータスフラグ readOnly : true |
isSuspended | boolean | 一時停止ステータスフラグ readOnly : true |
isDeleted | boolean | 削除ステータスフラグ readOnly : true |
leaveOfAbsence | object (leaveOfAbsence) | readOnly : true |
suspendedReason | string | 一時停止理由
Allowed values : MASTER, LOGIN_FAIL, readOnly : true nullable : true |
string | ログインID = メールアドレス
required maxLength : 90 | |
userName | object (userName) | 名前情報 required |
i18nNames | array (UserI18nName) | 多言語名リスト minItems : 0 |
nickName | string | ニックネーム
maxLength : 100 nullable : true |
privateEmail | string | 個人メールアドレス
maxLength : 256 nullable : true |
aliasEmails | array (string) | サブメールアドレスリスト
minItems : 0 maxItems : 10 |
employmentTypeId | string | 利用権限タイプID
nullable : true |
employmentTypeExternalKey | string | 利用権限タイプのExternalKey maxLength : 100 readOnly : true nullable : true |
employmentTypeName | string | 利用権限タイプ名 readOnly : true nullable : true |
searchable | boolean | サジェストへの表示フラグ(既定値: true) default : true |
passwordConfig | object (passwordConfig) | 初期ログインパスワード設定(既定値: MEMBER) nullable : true |
organizations | array (UserOrganization) | ユーザーが所属するドメインリスト(原職、兼職含む) minItems : 0 |
telephone | string | 電話番号 maxLength : 100 pattern : ^(?=.*[0-9])[0-9+\-*#PTpt()\u3000]{0,100} nullable : true |
cellPhone | string | 携帯電話番号 maxLength : 100 pattern : ^(?=.*[0-9])[0-9+\-*#PTpt()\u3000]{0,100} nullable : true |
fax | string | FAX番号
maxLength : 100 pattern : ^(?=.*[0-9])[0-9+\-*#PTpt()\u3000]{0,100} nullable : true |
location | string | 勤務先 maxLength : 100 nullable : true |
task | string | 担当業務 maxLength : 100 nullable : true |
messenger | object (messenger) | SNSタイプモデル nullable : true |
birthdayCalendarType | string | 誕生日の日付タイプ
Allowed values : SOLAR, LUNAR nullable : true |
birthday | string | 生年月日(YYYY-MM-DD) maxLength : 10 nullable : true |
locale | string | 多言語コード Allowed values : ja_JP, ko_KR, en_US, zh_CN, zh_TW |
hiredDate | string | 入社日(YYYY-MM-DD) maxLength : 10 nullable : true |
timeZone | string | example : Europe/Berlin |
customFields | array (UserCustomField) |
minItems : 0 maxItems : 50 |
relations | array (UserRelation) | 関係者連絡先リスト minItems : 0 maxItems : 10 |
Property | Type | Description |
---|---|---|
startTime | string | 休職の開始日時(YYYY-MM-DDThh:mm:ssTZD) nullable : true |
endTime | string | 休職の終了日時(YYYY-MM-DDThh:mm:ssTZD) nullable : true |
isLeaveOfAbsence | boolean | 休職中フラグ |
Property | Type | Description |
---|---|---|
lastName | string | 姓
maxLength : 80 nullable : true |
firstName | string | 名
maxLength : 80 nullable : true |
phoneticLastName | string | 姓のフリガナ(カタカナのみ許可) maxLength : 100 nullable : true |
phoneticFirstName | string | 名のフリガナ(カタカナのみ許可) maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
language | string | 多言語コード Allowed values : ja_JP, ko_KR, en_US, zh_CN, zh_TW |
firstName | string | 多言語の名
maxLength : 100 nullable : true |
lastName | string | 多言語の姓
maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
passwordCreationType | string | パスワード作成方法
default : MEMBER Allowed values : ADMIN, MEMBER |
password | string | パスワード |
Property | Type | Description |
---|---|---|
domainId | integer | ドメインID required format : int32 |
primary | boolean | 代表ドメインフラグ 代表を設定しない場合、自動的に一番最初の値が代表に設定されます。 required |
userExternalKey | string | ユーザーのExternalKey 「%」、「\」、「#」、「/」、「?」の特殊文字は利用不可。 maxLength : 100 nullable : true |
string | メールアドレス maxLength : 90 | |
levelId | string | 職級ID
nullable : true |
levelExternalKey | string | 職級のExternalKey maxLength : 100 readOnly : true nullable : true |
levelName | string | 職級名 readOnly : true nullable : true |
executive | boolean | 役員フラグ readOnly : true |
organizationName | string | 会社名 readOnly : true |
orgUnits | array (orgUnit) | 組織リスト minItems : 0 maxItems : 20 |
Property | Type | Description |
---|---|---|
orgUnitId | string | 組織ID
required |
orgUnitExternalKey | string | 組織のExternalKey maxLength : 100 readOnly : true nullable : true |
orgUnitName | string | 組織名 readOnly : true |
orgUnitEmail | string | 組織のメールアドレス readOnly : true |
primary | boolean | 代表組織フラグ required |
positionId | string | 役職ID
nullable : true |
positionExternalKey | string | 役職のExternalKey maxLength : 100 readOnly : true nullable : true |
positionName | string | 役職名 readOnly : true nullable : true |
isManager | boolean | 組織長フラグ(既定値: false) default : false |
visible | boolean | ユーザー公開フラグ(既定値: true) default : true |
useTeamFeature | boolean | チーム機能の利用フラグ(既定値: true)
default : true |
Property | Type | Description |
---|---|---|
protocol | string | SNSタイプ
required Allowed values : LINE, FACEBOOK, TWITTER, CUSTOM |
customProtocol | string | カスタムSNSタイプ
maxLength : 100 |
messengerId | string | SNS ID required minLength : 1 maxLength : 100 |
Property | Type | Description |
---|---|---|
customFieldId | string | カスタムフィールドを識別できる値
required |
customFieldExternalKey | string | カスタムフィールドExternalKey maxLength : 100 readOnly : true nullable : true |
value | string | カスタムフィールドテキスト
maxLength : 100 nullable : true |
link | string | カスタムフィールドリンク
カスタムフィールドタイプが
maxLength : 300 nullable : true |
Property | Type | Description |
---|---|---|
relationUserId | string | 関係者連絡先ユーザーID |
relationName | string | 関係性 maxLength : 50 |
externalKey | string | externalKey maxLength : 100 readOnly : true nullable : true |
example
1{
2 "domainId": 10000001,
3 "userId": "userf7da-f82c-4284-13e7-030f3b4c756x",
4 "userExternalKey": "USER_EXT_01",
5 "isAdministrator": false,
6 "isPending": false,
7 "isSuspended": false,
8 "isDeleted": false,
9 "suspendedReason": null,
10 "email": "localpart@example.com",
11 "userName": {
12 "lastName": "ワークス",
13 "firstName": "太郎",
14 "phoneticLastName": null,
15 "phoneticFirstName": null
16 },
17 "i18nName": [],
18 "nickName": "nickname",
19 "privateEmail": "private.works@example.com",
20 "aliasEmails": [],
21 "employmentTypeId": null,
22 "employmentTypeName": null,
23 "searchable": true,
24 "organizations": [
25 {
26 "domainId": 10000001,
27 "primary": true,
28 "userExternalKey": null,
29 "email": "localpart@example.com",
30 "levelId": "levelaa7-b824-4937-66af-042f1f43cefa",
31 "levelExternalKey": null,
32 "levelName": "一般社員",
33 "executive": false,
34 "organizationName": "org",
35 "orgUnits": [
36 {
37 "orgUnitId": "orgunitf-f27f-4af8-27e1-03817a911417",
38 "orgUnitExternalKey": null,
39 "orgUnitEmail": "team01@example.com",
40 "orgUnitName": "組織",
41 "primary": true,
42 "positionId": "position-7027-4a02-b838-6f52b5e38db7",
43 "positionExternalKey": null,
44 "positionName": "社員",
45 "isManager": true,
46 "visible": true,
47 "useTeamFeature": true
48 }
49 ]
50 }
51 ],
52 "telephone": "031-1234-5678",
53 "cellPhone": "090-1234-5678",
54 "fax": "031-2345-6789",
55 "location": "green building",
56 "task": "mytask",
57 "messenger": {
58 "protocol": "LINE",
59 "messengerId": "lineid"
60 },
61 "birthdayCalendarType": "SOLAR",
62 "birthday": "2000-01-01",
63 "locale": "ja_JP",
64 "hiredDate": "2020-01-01",
65 "timeZone": "Asia/Tokyo",
66 "leaveOfAbsence": {
67 "startTime": null,
68 "endTime": null,
69 "isLeaveOfAbsence": false
70 },
71 "customFields": [
72 {
73 "customFieldId": "customfd-fc09-4a57-ab38-03dc6c425e09",
74 "value": "カスタム値",
75 "link": null
76 }
77 ],
78 "relations": [
79 {
80 "relationUserId": "userfd-fc09-4a57-ab38-03dc6c425e09",
81 "relationName": "Manager",
82 "externalKey": "ExternalKeyValue"
83 }
84 ]
85}
Bad Request
Conflict