Adding and Deleting Users in Organizations

Last modified on September 18, 2023

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 access to the organization’s APIs and domains.

Users can also be added with SSO. For SaaS, click here for instructions. For On-Premise installations, click here.

Add users to an organization

To add a user, you must invite them. Users who are invited will be notified by email. You cannot invite more members than your plan limit. When a user is invited, they are counted as a member, even if they do not accept the invitation. Invitations do not expire.

Users who have been invited can be removed, in the same way as all other users (described below in this topic).

Invitations are always for consumer role users. For instructions to change the user to a designer, click here.

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 at the left.

  3. Click on the Invitations tab.

  4. Enter the email of the person you would like to add to the organization in the Invite Members box. You can enter multiple email addresses separated by commas.

  5. Click the Send Invitations button.

  6. 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.

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

Remove users from an organization

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:

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

Remove yourself from an organization

Designers and Consumers (that is, non-owners) can leave an organization at any time.

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

  2. 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. 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
Sharing APIs

Highlight search results