1---2name: contentstack-management3description: Use for Client, Stack, _APIClient, domain resources, OAuth, and CMA API alignment.4---56# Contentstack Management SDK – Contentstack Management Python78## When to use910- Implementing or changing **`Client`**, **Stack**, or resource modules (entries, assets, webhooks, …).11- Updating **`README.md`** or public exports for user-visible behavior.12- Assessing semver impact of constructor, method, or export changes.1314## Instructions1516### Main entry (consumer API)1718- **`contentstack_management.Client`** in **`contentstack.py`**: builds CMA **endpoint** from **region** / **host** / **scheme**, merges **headers** (**authtoken**, **management_token**, **early_access**), constructs **`_APIClient`**, optional **`oauth_config`** with **`OAuthHandler`**.1920### Structure2122- **`Stack`** — **`contentstack_management/stack/stack.py`**: stack-scoped resources (content types, entries, assets, branches, webhooks, …).23- **Org / user** — **`organizations/`**, **`users/`**, **`user_session/`** as applicable.24- **Resources** — packages under **`contentstack_management/`** following existing patterns.25- **OAuth** — **`oauth/oauth_handler.py`**, **`oauth/oauth_interceptor.py`**; keep aligned with **`_APIClient`** request path.2627### HTTP layer2829- **`_APIClient._call_request`** — central place for method, URL, JSON, files; respect **timeout** and **max_retries**.3031### Extending3233- Add methods on the appropriate resource class; align path and payload shapes with **CMA** docs.34- Prefer routing HTTP through **`_APIClient`** for consistent retries and OAuth handling.3536### Docs and versioning3738- Exported **`Client`**, **`Region`**, and stack helpers should match **README** and **`contentstack_management.__init__.py`**.39- Document migration for intentional breaking changes.