Publish to your Contentstack stack
Connect a Contentstack stack and CiteAgentic creates each approved article as an entry in the content type you choose, then publishes it to your environment if you want it live straight away.
Connecting Contentstack takes about five minutes and needs three values: your stack API key, the content type UID for new entries, and a management token. Add an environment name if you want entries published rather than left as drafts.
What is the Contentstack integration?
The Contentstack integration creates each approved CiteAgentic draft as an entry in your stack using the Content Management API, and can then publish that entry to an environment you nominate.
Creating an entry always produces a draft. Publishing is a separate step in Contentstack's model, which is why the integration asks for an environment separately: without one there is nowhere for the entry to go live.
How is this different from Contentful?
Contentstack and Contentful are two different companies with confusingly similar names. They share no APIs, no tokens, and no concepts. CiteAgentic supports both as separate publishing channels, so make sure you are connecting the one your team actually uses.
Why does it write markdown instead of rich text?
Contentstack's JSON Rich Text Editor stores content as a structured document rather than as text, so writing into it means synthesising that document and guessing at your schema.
Contentstack's Markdown and Multi Line Textbox field types store plain strings, and CiteAgentic already renders every draft to clean markdown. The integration writes markdown into a field you nominate. Point it at a Markdown field and your article arrives fully formatted.
If your content type only has a JSON Rich Text body today, add a Markdown field and point the integration at that.
What do you need before you start?
You need four things from your Contentstack account:
- A stack, and its API key.
- A content type UID for the new entries, e.g.
article. It must already exist. - A management token with write access to that stack.
- An environment name such as
production, but only if you want entries published immediately rather than created as drafts.
You also need to know which region hosts your stack. A token from an EU stack fails against the North America host, which is the most common setup mistake.
Where do you find your API key, content type UID and management token?
All three live in your Contentstack stack settings.
Stack API key: open the stack and go to Settings → Stack. It starts with
blt. This identifies the stack and is not the secret.
Content type UID: open Content Models and select your content type. Use its UID, which is lowercase with underscores, rather than its display name.
Management token: go to Settings → Tokens → Management Tokens and create one with write access. Contentstack shows it once.
How do you connect Contentstack in CiteAgentic?
Open Site Settings → Integrations → Publishing channels, click + Contentstack, and fill in the form.
The fields map as follows:
| Field | Required | What to enter |
|---|---|---|
| Stack API key | Yes | The blt… key from Settings → Stack |
| Region | No | Where the stack is hosted. Defaults to AWS North America |
| Content type UID | Yes | e.g. article |
| Title field UID | No | Defaults to title |
| Body field UID | No | A Markdown or Multi Line Textbox field. Defaults to body |
| URL field UID | No | If present, the slug is written as /slug |
| Publish environment | Only to publish | e.g. production |
| Locale | No | Defaults to en-us |
| On publish | No | Create entry only (default), or create and publish |
| Management token | Yes | Stored encrypted and never shown again |
Click Test & connect. CiteAgentic fetches the content type, which validates the API key, the management token, the region and the content type UID in one call. If you chose to publish immediately, it also checks the environment exists, so a missing environment fails at setup rather than at publish time.
Which regions are supported?
Contentstack hosts stacks across three clouds, and CiteAgentic supports all seven Content Management API hosts:
| Region | API host |
|---|---|
| AWS North America (default) | api.contentstack.io |
| AWS Europe | eu-api.contentstack.com |
| AWS Australia | au-api.contentstack.com |
| Azure North America | azure-na-api.contentstack.com |
| Azure Europe | azure-eu-api.contentstack.com |
| GCP North America | gcp-na-api.contentstack.com |
| GCP Europe | gcp-eu-api.contentstack.com |
How do you publish a draft to Contentstack?
There are two ways, and both use the same connection.
On demand: open any draft in Content Studio and choose Share ▾ → Publish to Contentstack. The entry is created immediately, and published to your environment if that is how the channel is configured.
On a schedule: link the Contentstack channel to a day in the content calendar. Once you approve that piece, it is created on its scheduled date.
Each piece becomes an entry with your title field and markdown body field filled in, plus the URL field if you nominated one. CiteAgentic links back to the entry in the Contentstack editor, because your front end owns the public URL.
What errors might you see, and what do they mean?
Contentstack returns detailed error bodies, which CiteAgentic surfaces alongside a plain-language cause:
- "Authentication failed." Contentstack returns
412withapi_key: is not validfor a bad stack key or management token. Check the Region before regenerating anything; a valid EU token looks invalid to the North America host. - "Content type … not found in this stack." The UID is wrong. Use the UID from Content Models, not the display name.
- "Environment … not found in this stack." The environment name does not exist. Check Settings → Environments.
- "Entry created as a draft, but publishing to … failed." The entry exists and is safe; only the publish step failed. Open it in Contentstack and publish manually, or fix the environment and retry.
- "Contentstack rate-limited the request." Wait a moment and retry.
If a scheduled publish fails, the channel is flagged with the error in Site Settings and the failure is recorded against that draft, so nothing fails silently.
Frequently asked questions
Is Contentstack the same as Contentful?
Are entries published live straight away?
Does this write to a JSON Rich Text field?
What access does the management token need?
Which locale do entries use?
Is my management token stored securely?
Ready to connect?
Site Settings → Integrations → Publishing channels → + Contentstack. Add your stack API key, content type UID, and a management token.