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. User Session

User Session

markdownView as Markdown

User session consists of calls that will help you to sign in and sign out of your Contentstack account.

Log in to your account

POSThttps://api.contentstack.io/user-session

The Log in to your account request is used to sign in to your Contentstack account and obtain the authtoken.

Note The authtoken is a mandatory parameter when executing Content Management API calls. However, when executing Content Delivery API calls, use the Content Delivery base URL for your region, and pass the environment-specific delivery token against the access_token key.

In the 'Body' section, enter the user credentials in JSON format. The JSON query will include the email address, the Contentstack user account password, and the two-factor authentication token (if enabled) received in the Authy app or SMS.

For SSO-enabled organizations, the ‘Log in to your account’ request will not return the user authtoken for users. In this case, you can try out the following:

  • The owner of an organization can access the SSO-enabled organization through Contentstack credentials and retrieve the user authtoken to make Content Management API requests.
  • Disable 'Strict Mode' for an SSO-enabled organization, and users who have the ability to access their organization through Contentstack credentials can retrieve the authtoken to make Content Management API requests.

For more details, refer the REST API Usage - Content Management API section in the Single Sign-On page.

Sample Request
1234567
{
	"user": {
		"email": "{{user_email}}",
		"password": "{{password}}",
		"tfa_token": "{{your_2FA_token}}"
	}
}
Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
{
	"notice": "Login Successful.",
	"user": {
		"uid": "blt22e22222d22d2f22222a2b2f",
		"created_at": "2016-06-30T05:02:27.516Z",
		"updated_at": "2019-07-16T10:35:30.898Z",
		"email": "user_email",
		"username": "username",
		"first_name": "user's_first_name",
		"last_name": "user's_last_name",
		"company": "Contentstack",
		"org_uid": [
			"blt44444c44ea4ddf222"
		],
		"shared_org_uid": [
			"bltcde1e1cdf1f11e5f",
			"blt22e2222dd2e2fb22",
			"blt3f3ad33ca33cb3a3"
		],
		"mobile_number": "9898989898",
		"country_code": "91",
		"tfa_status": "verified",
		"authy_id": "123123123",
		"active": true,
		"failed_attempts": 0,
		"authtoken": "bltd111c111111c11ec",
		"roles": [{
				"uid": "bltc0aa00ea0000b000",
				"name": "Developer",
				"description": "Developer can perform all Content Manager's actions, view audit logs, create roles, invite users, manage content types, languages, and environments.",
				"users": [
					"blt1d11a1d11c1b11111e111a1f",
					"blt22dd2fd22222222e22f2aa22",
					"sys_blt3a3333e33b30c3ea"
				],
				"created_at": "2016-03-21T10:15:09.434Z",
				"updated_at": "2018-06-20T10:44:19.618Z",
				"api_key": "blt444ad44e4d44aa4a",
				"rules": [{
						"module": "locale",
						"locales": [
							"$all"
						],
						"acl": {
							"read": true
						}
					},
					{
						"module": "environment",
						"environments": [
							"$all"
						],
						"acl": {
							"read": true
						}
					},
					{
						"module": "asset",
						"assets": [
							"$all"
						],
						"acl": {
							"create": true,
							"read": true,
							"update": true,
							"delete": true,
							"publish": true
						}
					}
				]
			},
			{
				"uid": "blt00b0e0bf00000de0",
				"name": "Content Manager",
				"description": "Content Managers can view all content types, manage entries and assets. They cannot edit content types or access stack settings.",
				"users": [
					"blt1d11a1d11c1b11111e1111a1f",
					"blt2de22eea222222e22222222a",
					"sys_bltf2e222cf2d222222"
				],
				"roles": [],
				"created_at": "2016-03-21T10:15:09.472Z",
				"updated_at": "2018-11-21T13:28:22.868Z",
				"api_key": "blt444ad4e4d44aa4a",
				"rules": [{
						"module": "locale",
						"locales": [
							"$all"
						],
						"acl": {
							"read": true
						}
					},
					{
						"module": "environment",
						"environments": [
							"$all"
						],
						"acl": {
							"read": true
						}
					},
					{
						"module": "asset",
						"assets": [
							"$all"
						],
						"acl": {
							"create": true,
							"read": true,
							"update": true,
							"delete": true,
							"publish": true
						}
					}
				]
			},
			{
				"uid": "blte55d15e55b5e5555",
				"name": "Admin",
				"description": "Admin can perform all actions and manage all settings of the stack, except the ability to delete or transfer ownership of the stack.",
				"users": [
					"blt44e44444d44d4f44444a4b4f"
				],
				"created_at": "2018-11-02T12:41:08.038Z",
				"updated_at": "2018-11-02T12:41:08.038Z",
				"api_key": "blt11111decbaa1a11e"
			}
		]
	}
}

Log out of your account

DELETEhttps://api.contentstack.io/user-session

The Log out of your account call is used to sign out the user of Contentstack account.

Sample Response
Status|200 OK
123
{
	"notice": "You've logged out successfully!"
}
Hide Parameters

Headers

Content-Typerequiredstring

Example:

application/json
Hide Parameters

Headers

authtokenrequiredstring

Example:

your_authtoken