Contentstack introduces the Agentic Experience Platform | Press release
Contentstack introduces the Agentic Experience Platform | Press release
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs
  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing
  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases
  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP
  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support
  • Overview
  • Find a partner
  • Login
  • About us
  • News
  • Customer support portal
  • Contact
  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.

AI Assistant

Ask a question below...

infoAI responses may contain mistakes.
/
  1. Home
  2. APIs
  3. Administration API
  4. Teams

Teams

markdownView as Markdown

Teams, simplifies role and permission management by grouping users. Instead of assigning roles individually or at the stack level, you can directly assign roles to a team. This ensures that all team members share the same set of role permissions.

Get all teams

GEThttps://api.contentstack.io/organizations/{organization_uid}/teams

The Get all teams request returns comprehensive information of all the teams available in your organization.

Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
{
    "count": 2,
    "teams": [
        {
            "_id": "65b*****************e9a",
            "name": "Team A",
            "createdAt": "2024-02-01T09:55:46.703Z",
            "createdBy": "blt**************f0",
            "updatedAt": "2024-02-01T09:56:36.724Z",
            "updatedBy": "blt**************f0",
            "organizationUid": "blt**************b5",
            "users": [
                "blt**************a0",
                "blt**************8d",
                "blt**************21"
            ],
            "stackRoleMapping": [
                {
                    "stackApiKey": "blt**************74",
                    "roles": [
                        "blt**************37"
                    ]
                },
                {
                    "stackApiKey": "blt**************fe",
                    "roles": [
                        "blt**************32"
                    ]
                }
            ],
            "organizationRole": "blt**************8d",
            "__v": 0,
            "uid": "65b*****************e9a",
            "createdByUserName": "Jane Doe",
            "updatedByUserName": "Jane Doe"
        },
        {
            "_id": "65b*****************892",
            "name": "Sample Team",
            "createdAt": "2024-01-31T11:52:27.049Z",
            "createdBy": "blt**************f0",
            "updatedAt": "2024-01-31T11:52:27.049Z",
            "updatedBy": "blt**************f0",
            "organizationUid": "blt**************b5",
            "users": [],
            "stackRoleMapping": [],
            "organizationRole": "blt**************8d",
            "__v": 0,
            "uid": "65b*****************892",
            "createdByUserName": "Jane Doe",
            "updatedByUserName": "Jane Doe"
        }
    ]
}

Get a single team

GEThttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}

The Get a single team request returns comprehensive information of a specific team available in a particular organization.

Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233
{
    "_id": "65b******************e9a",
    "name": "Sample Team",
    "createdAt": "2024-02-01T09:55:46.703Z",
    "createdBy": "blt**************f0",
    "updatedAt": "2024-02-01T09:56:36.724Z",
    "updatedBy": "blt**************f0",
    "organizationUid": "blt**************b5",
    "users": [
        "blt**************a0",
        "blt**************8d",
        "blt**************21"
    ],
    "stackRoleMapping": [
        {
            "stackApiKey": "blt**************74",
            "roles": [
                "blt**************37"
            ]
        },
        {
            "stackApiKey": "blt**************fe",
            "roles": [
                "blt**************32"
            ]
        }
    ],
    "organizationRole": "blt**************8d",
    "__v": 0,
    "uid": "65b******************e9a",
    "createdByUserName": "Sample User",
    "updatedByUserName": "Sample User"
}

Create a team

POSThttps://api.contentstack.io/organizations/{organization_uid}/teams

The Create a team request creates a team in the specified organization.

Sample Request
1234567891011
{
    "name": "Team A",
    "users": ["blt**************a0"],
    "stackRoleMapping": [{
            "stackApiKey": "blt**************74",
            "roles": [
                "blt**************f6"
            ]
        }],
    "organizationRole": "blt**************c5"
}
Sample Response
Status|201 Created
12345678910111213141516171819202122232425
{
    "_id": "65b*******************11",
    "name": "Team A",
    "createdAt": "2024-02-01T11:01:33.399Z",
    "createdBy": "blt**************f0",
    "updatedAt": "2024-02-01T11:01:33.399Z",
    "updatedBy": "blt**************f0",
    "organizationUid": "blt**************b5",
    "users": [
        "blt**************a0"
    ],
    "stackRoleMapping": [
        {
            "stackApiKey": "blt**************74",
            "roles": [
                "blt**************f6"
            ]
        }
    ],
    "organizationRole": "blt**************c5",
    "__v": 0,
    "uid": "65b*******************11",
    "createdByUserName": "Jane Doe
    "updatedByUserName": "Jane Doe"
}

Update a team

PUThttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}

The Update a team request is used to modify details, such as adding or removing users from a team, assigning or removing stack roles within a team, updating team descriptions, and updating organization roles for an existing team within a specific organization.

Sample Request
1234567891011121314151617
{
    "name": "Team A",
    "users": [
        {
            "email": "[email protected]"
        }
    ],
    "organizationRole": "blt**************8d",
    "stackRoleMapping": [
        {
            "roles": [
                "blt**************f6"
            ],
            "stackApiKey": "blt**************74"
        }
    ]
}
Sample Response
Status|200 OK
12345678910111213141516171819202122232425
{
    "_id": "65b******************e9a",
    "name": "Team A",
    "createdAt": "2024-02-01T09:55:46.703Z",
    "createdBy": "blt**************f0",
    "updatedAt": "2024-02-01T11:06:35.107Z",
    "updatedBy": "blt**************f0",
    "organizationUid": "blt**************b5",
    "users": [
        "blt**************21"
    ],
    "stackRoleMapping": [
        {
            "stackApiKey": "blt**************74",
            "roles": [
                "blt**************f6"
            ]
        }
    ],
    "organizationRole": "blt**************8d",
    "__v": 0,
    "uid": "65b******************e9a",
    "createdByUserName": "Jane Doe",
    "updatedByUserName": "Jane Doe"
}

Delete a team

DELETEhttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}

The Delete a team request deletes an existing team along with all its associated users and assigned roles.

Get all users of team

GEThttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}/users

The Get all users of team request retrieves information about all the users associated with a particular team.

Additionally, you can also set the query parameters: includeUserDetails or include_count to true to include user details and the count of users in the response.

Add users to team
Sample Response
Status|200 OK
1234567891011121314151617181920212223242526272829303132333435363738394041
{
    "users": [
        {
            "uid": "blt**************f0",
            "username": "jane_blt6266157b",
            "email": "[email protected]",
            "firstName": "Jane",
            "lastName": "Doer",
            "active": true,
            "orgInvitationStatus": "accepted"
        },
        {
            "uid": "blt**************8d",
            "username": "john_blt28057039",
            "email": "[email protected]",
            "firstName": "John",
            "lastName": "Doe",
            "active": true,
            "orgInvitationStatus": "accepted"
        },
        {
            "uid": "blt**************21",
            "username": "jane_blt9d1e076e",
            "email": "[email protected]",
            "firstName": "Jane",
            "lastName": "Doe",
            "active": true,
            "orgInvitationStatus": "accepted"
        },
        {
            "uid": "blt**************a0",
            "username": "sample_blt03a1b0ad",
            "email": "[email protected]",
            "firstName": "Sample",
            "lastName": "User",
            "active": true,
            "orgInvitationStatus": "accepted"
        }
    ],
    "count": 4
}

Add users to team

POSThttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}/users

The Add users to team request allows you to send invitations to add users and assign them organizational and stack roles.

NoteOnly the Owner or the Admin of the organization can add users to a team.

You need to pass the email IDs of the users in the request body as follows:

{
"emails": [ "[email protected]", "[email protected]"]
}
Remove a user from team
Sample Request
123
{
    "emails":["[email protected]", "[email protected]"]
}

Remove a user from team

DELETEhttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}/users/{user_uid}

The Remove a user from team request allows you to remove an existing user from a particular team.

NoteOnly the Owner or the Admin of the organization can remove users from a team.

All accounts registered with Contentstack are known as Users. An organization can have many users with varying permissions and roles.

Get all users of team

Get all stack role mapping

GEThttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}/stack_role_mappings

The Get all stack role mapping request allows you to retrieve details of all associated stacks for a specified team in your organization.

Add a stack role mapping
Sample Response
Status|200 OK
12345678910111213141516
{
    "stackRoleMappings": [
        {
            "stackApiKey": "blt**************74",
            "roles": [
                "blt**************f6"
            ]
        },
        {
            "stackApiKey": "blt**************fe",
            "roles": [
                "blt**************3a"
            ]
        }
    ]
}

Add a stack role mapping

POSThttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}/stack_role_mappings

The Add a stack role mapping request allows you to associate users from a specified team with the available stacks in your organization.

You need to pass the API key of the stack and the role UIDs in the request body as follows:

{
"stackApiKey": "stack_api_key",
"roles": [
"role_one_uid",
"role_two_uid"
]
}
Update a stack role mapping
Sample Request
1234567
{
    "stackApiKey": "blt**************74",
    "roles": [
        "blt**************f6",
        "blt**************37"
    ]
}
Sample Response
Status|201 Created
123456789
{
    "stackRoleMapping": {
        "stackApiKey": "blt**************74",
        "roles": [
            "blt**************f6",
            "blt**************37"
        ]
    }
}

Update a stack role mapping

POSThttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}/stack_role_mappings/{stack_api_key}

The Update a stack role mapping request allows you to update the stack roles for a specific stack in your organization. You need to pass the role UIDs in the request body as follows:

{
"roles": [
"role_uid"
]
}
Remove a stack role mapping
Sample Request
123456
{
    "roles": [
        "blt**************48",
        "blt**************f4"
    ]
}
Sample Response
Status|200 OK
123456789
{
    "stackRoleMapping": {
        "stackApiKey": "blt**************74",
        "roles": [
            "blt**************48",
            "blt**************f4"
        ]
    }
}

Remove a stack role mapping

DELETEhttps://api.contentstack.io/organizations/{organization_uid}/teams/{team_uid}/stack_role_mappings/{stack_api_key}

The Remove a stack role mapping request allows you to delete the associations of team users for a specified stack in your organization.

When adding users to a team, you have the option to simultaneously assign roles for the available stacks within the organization. This process involves mapping stack roles for all the users added to the team.

Get all stack role mapping
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid

Query Parameters

includeUserDetailsoptionalstring

Set this parameter to “true” to include the details of users in the response.

Example:

true
ascoptionalstring

Sort the response in ascending order.

Example:

created_at
descoptionalstring

Sort the response in descending order.

Example:

created_at
typeaheadoptionalstring

Retrieves responses that match the provided string.

Example:

sample
limitoptionalstring

Enter the maximum number of teams to be returned.

Example:

2
skipoptionalstring

Enter the number of teams to be skipped from the response body.

Example:

2
user_uidoptionalstring

Enter the user UIDs in string format, separated by commas, for filtering.

Example:

user_uid_1, user_uid_2

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
api_versionrequiredstring

Enter the API version.

Example:

1.1
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team of which you want to retrieve the details. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid

Query Parameters

includeUserDetailsoptionalstring

Set this parameter to “true” to include the details of users in the response.

Example:

true

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid

Query Parameters

includeUserDetailsoptionalstring

Set this parameter to “true” to include the details of users in the response.

Example:

true

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team you want to update. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid

Query Parameters

includeUserDetailsoptionalstring

Set this parameter to “true” to include the details of users in the response.

Example:

true

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team you want to update. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team of which you want to retrieve the user details. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid

Query Parameters

includeUserDetailsoptionalstring

Set this parameter to “true” to include the details of users in the response.

Example:

true
include_countoptionalstring

Set this parameter to “true” to include the total count of users in the response.

Example:

true

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team of which you want to retrieve the user details. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team of which you want to retrieve the user details. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid
user_uidrequiredstring

Enter the UID of the user you want to remove from the team. The UID of a user is unique across an organization. Execute the Get all users of team request to retrieve the UID of a user.

Example:

user_uid

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team of which you want to retrieve the user details. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team of which you want to retrieve the user details. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team of which you want to retrieve the user details. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid
stack_api_keyrequiredstring

Enter the API key of the stack.

Example:

your_stack_api_key

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken
Content-Typerequiredstring

Enter "application/json" to pass a request body.

Example:

application/json
Hide Parameters

URL Parameters

organization_uidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
team_uidrequiredstring

Enter the UID of the team of which you want to retrieve the user details. The UID of a team is unique across an organization. Execute the Get all teams request to retrieve the UID of a team.

Example:

team_uid
stack_api_keyrequiredstring

Enter the API key of the stack.

Example:

your_stack_api_key

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken