Integrate & Deploy
Rest API
Access content programmatically using SleekCMS APIs. Use these endpoints in frameworks like React, Next.js, or any HTTP client.
Current Content
Fetch the latest unpublished content (including drafts) for development/testing.
curl -H "Authorization: DEV_TOKEN" http://dev.cms.com:9000/2dz6f/latest
- Replace DEV_TOKEN with your Development Authorization Token.
- Use Case: Test content changes locally before publishing.
- Response: Returns JSON with raw content data (e.g., pages, blogs, assets).

Published Content
Retrieve content tied to specific environment tags (e.g., prod, staging). Select a version from the dropdown to decouple testing from live content.
curl -H "Authorization: PUB_TOKEN" https://pub.cms.com/v1/2dz6f?env=prod
Replace PUB_TOKEN with your Published Authorization Token.

Environment Tags
Use this API to fetch the current content versions associated with the environment. This helps override CDN caches when new content versions are associated with an environment.
Create tags via the CMS dashboard to group content versions (e.g., prod for live site, beta for testing).
Why Environment Tags?
- To Avoid CDN caching issues by associating a static tag with dynamic content versions.
- Test specific content versions without affecting live environments.

API Tokens
Manage tokens and configurations for secure API access.
Configuration | Description |
---|---|
Content Site ID | Unique identifier for your site (e.g., 2dz6f). Include this in API paths. |
Dev Authorization Token | DEV_TOKEN – For local development. Grants access to unpublished content. |
Dev API Endpoint | http://dev.cms.com:9000/2dz6f/latest |
Pub Authorization Token | PUB_TOKEN – For production environments. Only fetches published content. |
Pub API Endpoint | https://pub.cms.com/v1/2dz6f |
Fetch Environment Snapshot Tags
curl -H "Authorization: PUB_TOKEN" https://pub.cms.com/v1/2dz6f/env-tags
- Response: List of all environment tags and their linked content versions.

Content Versions
View all deployed content snapshots. Each version is a frozen copy of your content at a specific time.
Created At | Tag | Description | Created By |
---|---|---|---|
2023-10-15 14:30 | v1.2.0 | Homepage redesign | user@company.com |
2023-10-10 09:45 | v1.1.5 | Blog SEO update | user@company.com |
- Tag: Semantic versioning (e.g., v1.2.0) or custom labels (e.g., homepage-update).
- Rollback: Deploy a previous version by selecting it from the table and clicking Restore.

Deploy Site
Deploy static sites built with SleekCMS to hosting platforms like GitHub Pages or Netlify.
Download Site
Download a ZIP of your site’s code for a specific content version. Click **Download ** to get the build files (HTML, CSS, JS, and content JSON).
- Use Case: Manual deployments or debugging build issues.

Add Action
Automate deployments using integrations.
GitHub Push
- Push site builds directly to a GitHub repository.
- Action Name: A unique label (e.g., “Prod Deployment”).
- Personal Access Token: Generate a token with repo scope in GitHub Settings.
- Repository: Format org/repo (e.g., sleekcms/docs).
- Ref: Branch name (e.g., main). The action will commit the build to this branch.
Troubleshooting:
- Ensure the token has write access to the repository.
- Verify the branch exists before triggering the action.
Netlify Deploy
Trigger Netlify deployments automatically.
- Netlify Token: Find this in Netlify Account Settings > Applications.
- Connect: Click to authenticate Netlify.
- Deploy: New site builds trigger automatically when content versions are published.

Deploy Content
Automate workflows when new content versions are created (e.g., rebuild a site or notify a team).
Add Action
Choose a pre-configured integration:
- GitHub Action: Trigger a GitHub Actions workflow.
- GitHub Trigger: Send a repository dispatch event to any GitHub repo.
- Netlify Build: Rebuild your Netlify site with the latest content version.
- Custom Webhook: Send a POST request to your endpoint with payload details like version_tag and content_url.
