---
title: "Organization"
description: "Organization"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/javascript/reference/organization"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-20"
---

# Organization

## Organization

Organization is the top-level entity in the hierarchy of Contentstack, consisting of stacks and stack resources, and users. Organization allows easy management of projects as well as users within the Organization.

## fetch

The fetch Organization call fetches Organization details.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.organization('organization_uid').fetch()
.then((organization) => console.log(organization))
```

The include\_plan parameter includes the details of the plan that the organization has subscribed to.

## stacks

The Get all stacks in an organization call fetches the list of all stacks in an Organization.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.organization('organization_uid').stacks({ include_count: true })
.then((collection) => console.log(collection))
```

The ‘limit’ parameter will return a specific number of organizations in the output.

The ‘skip’ parameter will skip a specific number of organizations in the output.

The ‘asc’ parameter allows you to sort the list of organizations in the ascending order with respect to the value of a specific field.

The ‘desc’ parameter allows you to sort the list of Organizations in the descending order with respect to the value of a specific field.

The ‘include\_count’ parameter returns the total number of organizations related to the user.

## addUser

The Add users to organization call allows you to send invitations to add users to your organization. Only the owner or the admin of the organization can add users.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.organization('organization_uid').addUser({ users: { 'abc@test.com': ['org_uid1', 'org_uid2' ]}, stacks: { 'abc@test.com': { 'api_key1': [ 'stack_role_id' ] } } })
.then((response) => console.log(response))
```

List of users to add with roles.

List of user with stack API key and roles id to be assign from stack.

## transferOwnership

The Transfer organization ownership call transfers the ownership of an Organization to another user.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.organization('organization_uid').transferOwnership('email_id')
.then((response) => console.log(response))
```

Email id of user to transfer the ownership of the organization.

## getInvitations

The Get all organization invitations call gives you a list of all the Organization invitations.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.organization('organization_uid').getInvitations()
.then((response) => console.log(response))
```

## resendInvitition

The Resend pending organization invitation call allows you to resend Organization invitations to users who have not yet accepted the earlier invitation.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.organization('organization_uid').resendInvitition('invitation_uid')
.then((response) => console.log(response.notice))
```

The invitation id for which request to be sent

## roles

A role is a collection of permissions that will be applicable to all the users who are assigned this role.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.organization('organization_uid').roles()
.then((roles) => console.log(roles))
```

The ‘limit’ parameter will return a specific number of organizations in the output.

The ‘skip’ parameter will skip a specific number of organizations in the output.

The ‘asc’ parameter allows you to sort the list of organizations in the ascending order with respect to the value of a specific field.

The ‘desc’ parameter allows you to sort the list of Organizations in the descending order with respect to the value of a specific field.

The ‘include\_count’ parameter returns the total number of organizations related to the user.

The Include stack roles will return stack details in roles.

## fetchAll

The Get all organizations call lists all organizations related to the system user in the order that they were created.

```
import * as contentstack from '@contentstack/management'
const client = contentstack.client({ authtoken })

client.organization().fetchAll()
.then((collection) => console.log(collection))
```

The ‘limit’ parameter will return a specific number of organizations in the output.

The ‘skip’ parameter will skip a specific number of organizations in the output.

The ‘asc’ parameter allows you to sort the list of organizations in the ascending order with respect to the value of a specific field.

The ‘desc’ parameter allows you to sort the list of Organizations in the descending order with respect to the value of a specific field.

The ‘include\_count’ parameter returns the total number of organizations related to the user.

## organization

Organization is the top-level entity in the hierarchy of Contentstack, consisting of stacks and stack resources, and users.

```
import * as contentstack from '@contentstack/management'

const client = contentstack.client()
client.organization().findAll()
.then((organization) => {

})

import * as contentstack from '@contentstack/management'
const client = contentstack.client()

client.organization('org_uid').fetch()
.then((organization) => {

})
```

Organization UID.

## Organization | JavaScript Management SDK | Contentstack

Organization is the top-level entity managing stacks, resources, and users, enabling easy project and user management in the JavaScript Management SDK.