Adding and Deleting Users in Organizations

Last modified on December 01, 2021

The organization owner can invite users to join the organization and remove users who are no longer part of the organization.

Once added to the organization, the users can be organized into teams and granted collaborator access to the organization’s APIs and domains.

Add users to an organization

You can invite users to your organization by their email address.

  1. Go to My Hub and click next to the organization name in the sidebar.

    – or –

    In SwaggerHub On-Premise 1.21 and earlier: click your username and select Settings. Then switch to the My Organizations tab and click Details next to the organization name.

  2. Switch to the Members tab.

  3. Enter the email of the person you would like to add to the organization. You can enter multiple email addresses separated by commas.

    Inviting users

    Click the image to enlarge it.

  4. Click Invite.

  5. Newly invited members have the Consumer role by default. You can assign another role if required.

Use the User Management API to automate the provisioning of organization members:

curl -X POST https://api.swaggerhub.com/user-management/v1/orgs/ORG_NAME/members \
     -H 'Authorization: OWNER_API_KEY' \
     -H 'Content-Type: application/json' \
     -d '{ "members": [ \
            { "email": "jack@example.com", "role": "CONSUMER" }, \
            { "email": "amy@example.com", "role": "DESIGNER" } \
         ]}'

Try it out in the interactive API console

 

Invited users are added to the organization immediately and receive an email notification informing them that they’ve been added. Users without a SwaggerHub account will need to create an account before they can access the organization’s private data. Registered users have the Confirmed status in the member list.

SwaggerHub On-Premise note: In v. 1.27 and earlier, invited users must accept the invitation first to join the organization. To accept the invitation, the user needs to click the link in the invitation email. Users who accepted the invitation have the Joined status in the member list.

Organization invitation email

Click the image to enlarge it.

At any time, you can resend the invitations to pending members by clicking the Resend link in the member list.

Remove users

From the members list

To remove a user from the organization:

  1. Open the Members list of your organization (see above).

  2. Find the user name in the list and click Delete User next to the user name:

    Removing organization members

    Click the image to enlarge it.

Use the User Management API to automate the removal of organization members:

curl -X DELETE "https://api.swaggerhub.com/user-management/v1/orgs/ORG_NAME/members?user=USER1@EXAMPLE.COM&user=USER2@EXAMPLE.COM" -H "Authorization: OWNER_API_KEY"

Try it out in the interactive API console

From user settings

Non-owners can remove themselves from an organization.

  1. In the top right corner of any page, click your user name and select Settings.

  2. Switch to My Organizations.

  3. Click the ellipsis button next to the organization and select Leave Organization.

    Leave organization

    Click the image to enlarge it.

  1. In the top right corner of any page, click your user name and select Settings.

  2. Switch to My Organizations.

  3. Under Assigned Organizations, click Leave Organization next to the organization name.

    Leave organization

    Click the image to enlarge it.

See Also

Working With Organizations
Teams
Organization Ownership
Collaboration

Highlight search results