> For AI agents: the complete Sanity documentation index is available at [https://www.sanity.io/docs/llms.txt](https://www.sanity.io/docs/llms.txt).

# Organizations

Reference documentation for the Sanity CLI organizations command.

**npm**

```shell
npx sanity organizations --help
```

**pnpm**

```shell
pnpm dlx sanity organizations --help
```

**yarn**

```shell
yarn dlx sanity organizations --help
```

**bun**

```shell
bunx sanity organizations --help
```

## Commands

### `create`

**CLI output**

```sh
USAGE
  $ sanity organizations create [--default-role <value>] [--name <value>]

FLAGS
      --default-role=<value>  Default role assigned to new members
      --name=<value>          Organization name

DESCRIPTION
  Create a new organization

EXAMPLES
  Interactively create an organization

    $ sanity organizations create

  Create an organization named "Acme Corp"

    $ sanity organizations create --name "Acme Corp"

  Create an organization with a default member role

    $ sanity organizations create --name "Acme Corp" --default-role member
```

### `delete`

**CLI output**

```sh
USAGE
  $ sanity organizations delete ORGANIZATIONID [--force]

ARGUMENTS
  ORGANIZATIONID  Organization ID to delete

FLAGS
      --force  Do not prompt for delete confirmation - forcefully delete

DESCRIPTION
  Delete an organization

EXAMPLES
  Delete an organization (prompts for confirmation)

    $ sanity organizations delete org-abc123

  Delete an organization without confirmation

    $ sanity organizations delete org-abc123 --force
```

### `get`

**CLI output**

```sh
USAGE
  $ sanity organizations get ORGANIZATIONID

ARGUMENTS
  ORGANIZATIONID  Organization ID

DESCRIPTION
  Get details of an organization

EXAMPLES
  Get details of a specific organization

    $ sanity organizations get org-abc123
```

### `list`

**CLI output**

```sh
USAGE
  $ sanity organizations list

DESCRIPTION
  List organizations you are a member of

EXAMPLES
  List all your organizations

    $ sanity organizations list
```

### `update`

**CLI output**

```sh
USAGE
  $ sanity organizations update ORGANIZATIONID [--default-role <value>] [--name <value>] [--slug <value>]

ARGUMENTS
  ORGANIZATIONID  Organization ID

FLAGS
      --default-role=<value>  New default role for new members
      --name=<value>          New organization name
      --slug=<value>          New URL slug (requires authSAML feature on the organization)

DESCRIPTION
  Update an organization

EXAMPLES
  Rename an organization

    $ sanity organizations update org-abc123 --name "New Name"

  Set the organization slug (requires authSAML feature)

    $ sanity organizations update org-abc123 --slug new-slug

  Change the default member role

    $ sanity organizations update org-abc123 --default-role viewer
```

