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

# Contentstack

## Contentstack

Java Management SDK Interact with the Content Management APIs and allow you to create, update, delete, and fetch content from your Contentstack account.

## organisation

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

```
import contentstack;

Contentstack contentstack = new Contentstack.Builder().build();
Organisation organisation = contentstack.organisation();
//OR
Organisation organisation = contentstack.organisation("organisationId");
```

## user

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

```
import contentstack;

Contentstack contentstack = new Contentstack.Builder().build();
User user = contentstack.user();
```

## stack

A [Stack](https://www.contentstack.com/docs/developers/apis/content-management-api/#stacks) is a space that stores the content of a project (a web or mobile property). Within a stack, you can create content structures, content entries, users, etc. related to the project.

```
import contentstack;

Contentstack contentstack = new Contentstack.Builder().build();

Stack stack = contentstack.stack();

or

Stack stack = contentstack.stack("apiKey");

or

Stack stack = contentstack.stack("apiKey", "managementToken", "branch");
```

The apiKey for the stack

The authorization for the stack

The branch that include branching in the response

## login

Before executing any calls, retrieve the authtoken by authenticating yourself via the login call of User Session. The authtoken is returned to the 'Response' body of the login call and is mandatory in all the calls.

```
import contentstack;

Contentstack contentstack = new Contentstack.Builder().build();
.
LoginDetails login = contentstack.login("emailId", "password");

  or

LoginDetails login = contentstack.login("emailId", "password", "tfaToken");
```

The email id of the user

The password of the contentstack user

The tfa token

## earlyAccess

With the earlyAccess header support, you can access features that are part of the early access program.

```
String[] eaMembers = {"Taxonomy", "Teams", "Others"};

Contentstack contentstack = new Contentstack.Builder().earlyAccess(eaMembers).build();
```

## setHost

The setHost method specifies the API endpoint for your Contentstack region. This method ensures that your requests are routed to the appropriate regional host enabling optimal performance and compliance with regional data policies.

For a complete list of supported regions and their base URLs, refer to the [Content Management API](/docs/developers/apis/content-management-api#base-url) documentation.

```
The following code snippet demonstrates how to initialize the Contentstack client and set the regional host (for example, for Australia):
import Contentstack; 

// Initialize the Contentstack client and set the regional host (e.g., for Australia)

Contentstack client = new Contentstack.Builder()
       .setAuthtoken(TestClient.AUTHTOKEN)
       .setHost("au-api.contentstack.com")
       .build();

// Get the entry instance from the specified content type and entry UID

Entry entry = client.stack("apiKey").contentType("contentType").entry("entry_uid");

// Fetch the entry from the specified region

Response<ResponseBody> response = entry.fetch();
```

## Contentstack | Java Management SDK | Contentstack

Contentstack is the entry point to the Content Management APIs, letting you create, update, delete, and fetch content in the Java Management SDK.