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.
-
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
next to the organization name.
-
Switch to the Members tab.
-
Enter the email of the person you would like to add to the organization. You can enter multiple email addresses separated by commas.
-
Click Invite.
-
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
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"
Remove yourself from an organization
Designers and Consumers (that is, non-owners) can leave an organization at any time.
-
In the top right corner of any page, click your user name and select My Organizations.
-
Click the ellipsis button next to the organization and select Leave Organization.
-
In the top right corner of any page, click your user name and select Settings.
-
Click the ellipsis button next to the organization and select Leave Organization.
See Also
Working With Organizations
Teams
Organization Ownership
Collaboration