Return a JSON object that lists the users that are a part of the same company as the user specified by {userId}.

  • Maximum of 50 emails in request, 51st and greater emails in request are ignored.
  • Only user object of found emails are included in response.
  • All emails are queried not just primary email.

URL Parameters

None.

Body Parameters

NameDescriptionJSON typeRequiredDefault Value
Array of email strings (Max: 50).array of stringsYes

Authentication

JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator

Authorization

OAuthAuthorizer

Example Request

URL

POST https://spacesapis.zang.io/api/users/me/colleaguesbulk

Headers

Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZCI6ImFneHpmbTl1WlhOdVlUSXdNVFJ5RVFzU0JGVnpaWElZZ0lEQXMtX25fUW9NIiwidmVyIjoiMi4wIn0.SqZpw1uPIebqW3qlDsm0-DWYFKEH0SgPwtD-tSESWOF-5hLkZMqJH28ooWux2S7s9riIew7pTVPnZpTgJa5zHcEAG0gXSEJVOqmpGp_4ufM8YtZoZMpBFjyAkwyAt-ILkGUYIo0GU5WyzMPLV8YLXfgdfgOgkE2MGGOajBkjPmC2Db3pA0D0M9k-21EL1gwWBC5YIq0PDAkgulegwl6khRmB8irJQ-dfg-d-KV9eYfFpsCdJKRGzSfqg"

Or

Authorization: "bearer f746696f5de4528u128ae2f274eea253e8a7943a"

Body

[
    "user1@fakecompany.com",
    "user2@fakecompany.com",
    "user3@fakecompany.com",
    "user4@fakecompany.com",
    "user5@fakecompany.com",
    "user6@fakecompany.com" //does not exist
]

Example Response

{
    "data": [
        {
            "_id": "585988477b40f9a576053aa3",
            "displayname": "John Smith1",
            "picturefile": "pictures/pfpic_juser1_977ffaaf-6b90-4e08-acde-06c66955bef1",
            "emails": [
                {
                    "primary": true,
                    "value": "user1@fakecompany.com"
                }
            ],
            "phone_numbers": [],
            "name": {
                "pronunciation_url": "",
                "pronunciation": "",
                "middlename": "",
                "honorific_suffix": "",
                "honorific_prefix": "",
                "givenname": "John",
                "formatted": "",
                "familyname": "User1"
            },
            "username": "user1@fakecompany.com",
            "accountId": "ag9zfm9uZXNuYXRlc3RpbmdyEQsSBFVzZXIYgIFAqMHf1AgJ",  //userId from Zang Accounts
            "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_juser1_977ffaaf-6b90-4e08-acde-06c66955bef1"
        },
        {
            "_id": "5898a16e7b40f9a576054f91",
            "displayname": "John User2",
            "picturefile": "pictures/pfpic_juser2_977ffaaf-6b90-4e08-acde-06c66955bef2",
            "emails": [
                {
                    "primary": true,
                    "value": "user2@fakecompany.com"
                },
                {
                    "primary": false,
                    "value": "user3@fakecompany.com"
                }
            ],
            "phone_numbers": [
                {
                "verified": false,
                "primary": true,
                "canonicalForm": "+19055551234",
                "type": "mobile",
                "value": "+19055551234"
                }
            ],
            "name": {
                "pronunciation_url": "",
                "pronunciation": "",
                "middlename": "",
                "honorific_suffix": "",
                "honorific_prefix": "",
                "givenname": "John",
                "formatted": "",
                "familyname": "User2"
            },
            "username": "user2@fakecompany.com",
            "accountId": "ag9zfm9uZXNuYXRlc3RpbmdyEQsSBFVzZXIYgICAqMhf1AgJ",  //userId from Zang Accounts
            "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_juser2_977ffaaf-6b90-4e08-acde-06c66955bef2"
        },
        {
            "_id": "593989c06f0e166d93fab8a2",
            "username": "user4@fakecompany.com",
            "name": {
                "pronunciation_url": "",
                "pronunciation": "",
                "middlename": "",
                "honorific_suffix": "",
                "honorific_prefix": "",
                "givenname": "John",
                "formatted": "",
                "familyname": "User4"
            },
            "emails": [
                {
                    "primary": true,
                    "value": "user4@fakecompany.com"
                },
                {
                    "primary": false,
                    "value": "user5@fakecompany.com"
                }
            ],
            "phone_numbers": [
                {
                "verified": false,
                "primary": true,
                "canonicalForm": "+19055551234",
                "type": "mobile",
                "value": "+19055551234"
                }
            ],
            "picturefile": "pictures/pfpic_juser4_026498e4-e761-4acf-9a09-5b37ac7ed071",
            "displayname": "John User4",
            "accountId": "ag9zfm9uZXNuYXRlc3RpbmdyEQsSBFVzZXIYgICAqMHf1AhJ",  //userId from Zang Accounts
            "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_juser4_026498e4-e761-4acf-9a09-5b37ac7ed071"
        }
    ],
    "total": 3
}