User Management API
The Swagger Studio User Management API can help organizations automate the provisioning of new users and teams. Using this API, you can get information about organizations and their members, add and remove members, change user roles in bulk, create and manage teams, and grant users or teams access to specific resources.
API reference
See the full list of available operations and parameters at:
https://app.swaggerhub.com/apis-docs/swagger-hub/user-management-api
Use that page to test API calls directly in your browser.
Base URL
The base URL for requests to the User Management API is:
https://api.swaggerhub.com/user-management/v1/
For example, GET /orgs means a GET request to https://api.swaggerhub.com/user-management/v1/orgs.
Authentication
All requests to the User Management API must include the Authorization header containing a Swagger Studio API key:
Authorization: YOUR_API_KEY
You can find it on the API Key page in your account settings.
Note
Most requests require the API key of an organization owner or administrator .
Manage organization members
Invite users to an organization
Remove members from an organization
List organization members
You can display a list of organization members.
curl -X 'GET' 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/members' \ -H 'accept: application/json'
The response includes first and last names, email addresses, user roles, the date and time of last activity, the last read activity, and the user type:
{
"totalCount": 1,
"pageSize": 25,
"page": 0,
"items": [
{
"userId": "d4071a5f-dc63-4b51-b508-462ed664cec9",
"email": "user@example.com",
"firstName": "string",
"lastName": "string",
"role": "CONSUMER",
"inviteTime": "2026-06-08T23:23:46.304Z",
"startTime": "2026-06-08T23:23:46.304Z",
"lastActive": "2026-06-08T23:23:46.304Z",
"lastActivePlace": "PORTAL",
"status": null,
"userType": "INTERNAL"
}
]
}Try it out in the interactive API console
Searching and filtering members
Use the q query parameter to search and filter users by their first name, last name, or email address. For example, use it to check if a specific user is already a member:
/orgs/OWNERID/members?q=user@example.com
Use the following query parameters to sort and paginate the user list:
?sortBy=[NAME|EMAIL|START_TIME]&order=[ASC|DESC] ?pageSize=50&page=2 # Default page size is 25
Invite users to an organization
You can invite one or more organization members by their email addresses and, optionally, set each user's consumer role (user type). This request requires the API key of an organization owner or administrator.
curl -X 'POST' \
'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/members?userType=INTERNAL' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"members": [
{
"email": "user1@example.com",
"email": "user2@example.com"
}
]
}'Remove members from an organization
You can remove one or more users from the organization by their email addresses. This request requires the API key of an organization owner or administrator.
To remove a single user, enter:
curl -X 'DELETE' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/members?user=USER@EXAMPLE.COM' \ -H 'accept: application/json'
To remove several users, repeat the user query parameter:
curl -X 'DELETE' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/members?user=USER@EXAMPLE.COM&user=USER2@EXAMPLE.COM' \ -H 'accept: application/json'
Manage teams
List teams in an organization
You can display a list of all teams in an organization.
curl -X 'GET' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/teams?page=0&pageSize=50' \ -H 'accept: application/json'
The response includes a paged list of teams, for example:
{
"totalCount": 4,
"pageSize": 50,
"page": 0,
"items": [
{ "name": "example-team" }
]
}
Create a new team
You can add a new team to an organization. This request requires the API key of an organization owner or administrator.
curl -X 'POST' \
'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/teams' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "new-team",
"description": "The New Team",
"userType": "INTERNAL"
}'
Update a team
You can update an existing team's details. This request requires the API key of an organization owner or administrator, or team administrator.
curl -X 'PUT' \
'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/teams/TEAMNAME' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "updated-team",
"description": "The Updated Team",
"userType": "INTERNAL"
}'
Delete a team
You can delete a team from an organization. This request requires the API key of an organization owner or administrator, or team administrator.
curl -X 'DELETE' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/teams/TEAMNAME' \ -H 'accept: */*'Try it out in the interactive API console
Manage resource access
List users with access to a resource
Grant users access to a resource
Update user access to a resource
Remove user access to a resource
Grant teams access to a resource
List teams with access to a resource
Update team access to a resource
Remove team access to a resource
List a user's roles across the organization
List the resource types and roles you can assign in them
List users with access to a resource
You can list the users who have access to a specific resource: API, domain, template, project, team or organization.
curl -X 'GET' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resources/RESOURCENAME/resource-type/RESOURCETYPE/users?statusFilter=all&page=0&pageSize=50' \ -H 'accept: application/json'
The response includes a paged list of users with their role on the resource:
{
"totalCount": 2,
"pageSize": 50,
"page": 0,
"users": [
{
"email": "user@example.com",
"uuid": "a2c4e6f8-a234-1b34-12c4-ab3de6gh9jk1",
"role": "designer",
"blocked": false
}
]
}
Grant users access to a resource
You can give one or more users access to a resource by assigning each a selected role. This request requires the API key of an organization owner or administrator.
curl -X 'POST' \
'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resources/RESOURCENAME/resource-type/RESOURCETYPE/users' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"users": [
{
"email": "user@example.com",
"role": "designer"
"userType": "external"
}
]
}' The request must be authenticated using the API key of an organization owner.Update user access to a resource
You can update user access to a specified resource by modifying the role one or more users have on a resource. Following the update, the list of users whose access you have updated. This request requires the API key of an organization owner or administrator.
curl -X 'PATCH' \
'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resources/RESOURCENAME/resource-type/RESOURCETYPE/users' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"users": [
{
"email": "user@example.com",
"role": "designer"
}
]
}'Remove user access to a resource
You can remove access to a resource for one or more users. This request requires the API key of an organization owner or administrator.
The example below allows for the removal of resource access from two users specified by their email addresses:
curl -X 'DELETE' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resources/RESOURCENAME/resource-type/RESOURCETYPE/users?users=user1%40example.com&users=user2%40example.com' \ -H 'accept: application/json'
Grant teams access to a resource
You can grant teams access to a specified resource by assigning all of their members a selected role. This request requires the API key of an organization owner or administrator.
curl -X 'POST' \
'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resources/RESOURCENAME/resource-type/RESOURCETYPE/teams' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"teams": [
{
"name": "Example Team",
"role": "designer"
}
]
}'List teams with access to a resource
You can display a list of teams with access to a specified resource.
curl -X 'GET' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resources/RESOURCENAME/resource-type/RESOURCETYPE/teams?page=0&pageSize=50' \ -H 'accept: application/json'
Update team access to a resource
You can update one or more teams' access to a resource by modifying the role of all their members. This request requires the API key of an organization owner or administrator.
curl -X 'PATCH' \
'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resources/RESOURCENAME/resource-type/RESOURCETYPE/teams' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"teams": [
{
"name": "Example Team",
"role": "designer"
}
]
}'Remove team access to a resource
You can remove one or more teams' access to a resource. This request requires the API key of an organization owner or administrator.
curl -X 'DELETE' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resources/RESOURCENAME/resource-type/RESOURCETYPE/teams?teams=TEAM1&teams=TEAM2' \ -H 'accept: application/json'
List a user's roles across the organization
You can display a list of all roles assigned to a user across different resources in an organization.
curl -X 'GET' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/roles?user=user%40example.com&page=0&pageSize=50' \ -H 'accept: application/json'
List the resource types and roles you can assign in them
You can list every resource type in an organization and the user roles you can assign to organization members for each type.
curl -X 'GET' \ 'https://api.swaggerhub.com/user-management/v1/orgs/OWNERID/resource-types' \ -H 'accept: application/json'