Relocate Members

    Changes the domain of a member in the primary position to another domain, with his/her external key, ID (primaryEmail) and organization.

    Note

    • Only for the Basic/Premium products, LINE WORKS automatically registers a member's previous email address as a sub email address when an email message is received to ensure service continuity.
    • When you edit all or part of member information, you should pass a member's previous email address using the aliasEmails parameter to continue to use it as a sub email address; otherwise, the previous email address will be deleted.
    • A member or the Admin who has already been deleted cannot be relocated to another domain.
    • External Messaging and member emails
    • A member who is authorized to enable External Messaging cannot be relocated to a domain that does not allow the feature.
      • If a member’s email that is used as an External Messaging ID is modified, the External Messaging ID is also updated.
      • If the new email contains prohibited keywords (NG WORD), add the previous email as a sub email address (sub ID for the Lite product) so that it can still be used as the External Messaging ID.
    • Custom fields that are specified on the basis of the primary position’s domain are deleted.

    API Type

    Server API

    Request URL

    https://apis.worksmobile.com/r/{API ID}/organization/v2/domains/{domainId}/users/{externalKey}/transfer

    HTTP Method

    PUT (Content-Type: application/json; charset=UTF-8)

    Path Parameters

    Parameter Type Length Required Description
    domainId Integer Y Current domain ID
    externalKey String 100 characters Y Current external key of the member

    Request Body

    Parameter Type Length Required Description
    organizations[] List Y List of domains (companies) to which the member belongs (including both the primary and secondary positions)
    organizations[].domainId Integer Y Domain ID
    organizations[].externalKey String 100 characters Y An externalKey for members.
    It can differ from the external key passed as a path parameter when the member is relocated, but must be unique in the tenant.
    You can specify different external keys for the primary and secondary positions.
    organizations[].email String 90 characters Y Account.
    Member's email address for the Basic and Premium products.
    id@group for the Lite product.
    It is the primary position's email address if "organizations[].represent" is "true."
    It can be the secondary position's email address if "organizations[].represent" is "false."
    ● localpart@domain (localpart@group for the Lite product)
    ● A localpart must start with a lowercase English letter or a number.
    ● A dot (.) cannot be the first or last character of a localpart, and two or more consecutive dots are not allowed.
    ● A localpart must be between 2 and 40 characters, and can contain lowercase English letters, numbers, dot (.), hyphen (-), and underscore (_) only.
    organizations[].represent Boolean N Indicates whether or not it is the default company.
    organizations[].levelExternalKey String 100 characters N An external key for levels.
    It is available only if "useLevel" of the "Enable Levels" API is "true." If this parameter is omitted, no level applies.
    organizations[].orgUnits[] List N Organizations List
    organizations[].orgUnits[].externalKey String 100 characters N An external key for organizations
    organizations[].orgUnits[].represent Boolean N Indicates whether or not it is the default organization.
    organizations[].orgUnits[].positionExternalKey String 100 characters N An external key for positions.
    It is available only if "usePosition" of the "Enable Positions" API is "true." If this parameter is omitted, no position applies.
    organizations[].orgUnits[].manager Boolean N Indicates whether the member is a manager or not.
    If it is true, the member becomes the manager and the previous manager, if there is, is relieved of his or her duties.
    ● Default: false
    organizations[].orgUnits[].display Boolean N Indicates whether to show the member.
    ● It indicates whether to show the member on the organization chart.
    ● Default: true
    organizations[].orgUnits[].receiveEmail Boolean N Indicates whether to enable team features.
    ● Default: true
    ● Use this parameter when you need to limit the following team features of a member for security purposes: receiving messages in the team room, sharing files and receiving organization emails.
    ● If this parameter is true, the following team features are enabled.
    - As a member of the team room (Message/Note/Calendar/Folder), the member can send/receive messages, view notes, receive shared calendar events and view folders.
    - The member can receive email messages sent to the organization.
    - The member can receive calendar events shared to the organization.
    - The member can view the organization calendar.
    - The member can view files in the drive shared to the organization.
    - The member can view boards with the permissions given to the organization.
    - The member can respond to surveys of the organization.
    - The member also becomes a member of the group which the organization belongs to.
    ● If this parameter is false, all the team features described above are disabled. Set this parameter to false if you do not allow the member to use the team features.
    preserveGroup Boolean N Indicates whether to keep the member’s group.
    ● Default: false
    ● If it is “false,” the member’s group is not kept after relocation: the member automatically gets out of the chat rooms where he or she belongs, and can no longer see previous chats.
    ● Set this parameter to “true” to keep the group after relocation.

    Request Example

    PUT https://apis.worksmobile.com/r/apiid/organization/v2/domains/123/users/EX123/transfer
    
    {
      "organizations": [
        {
          "domainId": 456,
          "externalKey": "EX123",
          "represent": true,
          "email": "david.jones@new.example.com",
          "levelExternalKey": "manager",
          "orgUnits": [
            {
              "externalKey": "CSTeam",
              "positionExternalKey": "staff"
            }
          ]
        },
        {
          "domainId": 123,
          "externalKey": "EX123",
          "represent": false,
          "email": "david.jones@example.com",
          "levelExternalKey": "100000000009970",
          "orgUnits": [
            {
              "externalKey": "Sales1",
              "positionExternalKey": "staff",
              "represent": true,
              "display": false
            }
          ]
        }
      ]
    }
    

    Response

    It returns HTTP status 200 with no response when the API call is successful.

    Error Code

    It returns an error code and message when the API call fails.
    Refer to Organization Integration REST API Error Codes for details.