Deploy to the CRM
Deploy to CRM takes a project from your workspace to a live, health-checked URL, and for client sites links it to a company in the DENDAT CRM so its contact forms create CRM leads. It is a guided flow: plan, checks, staging, production, then the CRM link.
Start it from the Deploy to CRM button in the preview strip of Hyper Agent, or use the API below.
Who can use it
Deploy to CRM needs the crm_integration feature: Team, Scale and Enterprise plans include it. On Solo and during the free trial you get a metered trial: 3 deploys within 14 days, started the first time you try. See Plans and limits.
What kinds of project it deploys
The deploy step detects your project type from its files:
| Detected as | Examples |
|---|---|
| Static site | Plain HTML, or a built folder named dist, build, out or public |
| Single-page app | Vite, Create React App, Angular, Gatsby, Astro |
| Node server | Next.js, Nuxt, Remix, SvelteKit, or any package with a start script |
| Python web app | FastAPI, Flask, Django and other WSGI or ASGI apps (run with gunicorn) |
Targets
| Target | What it does |
|---|---|
| New client site | Creates a new client account in the CRM and links the site to it. |
| Existing client company | Links the site to a company already in your CRM account group. A company can have one site. |
| API service | A backend service. Health-checked on an API path (default /health). No site forms, no CRM account. |
| Internal tool | Platform admins only. No CRM account. |
The flow
- Plan. You pick the target, company, optional integrations and domain. CCD builds a plan and runs pre-flight checks.
- Checks. Each check shows pass, warn or fail. Failures block the deploy:
- source folder exists
- no
.envfiles, private keys or live API keys in the project (the whole folder is shipped, so this scan is the guard; matched values are never printed) - syntax and boot checks, and your tests (switch off withrun_tests: false) - the staging and production hosts are reachable - an app port is free, and the hostname is not already used by another project - the custom domain is valid and not claimed elsewhere - your plan allows CRM deploys, and the CRM accepts the account in a dry run - Staging. The project is built and released to a staging URL. Staging never writes to the CRM.
- Production. Needs a healthy staging release of the same plan, and you must type the confirm phrase exactly (shown in the wizard, for example
DEPLOY my-site TO Acme Bakery). - CRM link. Only after production is proven healthy, CCD registers the site in the CRM, mints the site's form token and sends one marked test lead (
CCD-VERIFY). A failed deploy never leaves CRM records behind. - Done screen. Shows the URLs, and the website token and any temporary password once. They are not stored in CCD afterwards. Save them.
Staging and production URLs look like https://ccd-<project-slug>-stg.dendat.ai and https://ccd-<project-slug>.dendat.ai. The slug comes from the project name, so two projects with the same name are blocked.
If production is unhealthy
CCD rolls back automatically to the previous release (a first release is taken down), and the CRM is left untouched.
If the CRM link fails after a healthy deploy
The site stays live with status live_crm_pending. Retry just the CRM half with link-crm (below). You confirm again.
Integrations
| Integration | Behaviour today |
|---|---|
| Contact and lead forms | Live. Mints a website token and sends one test lead. |
| Custom domain | Live. Records the domain on the CRM site and gives you the DNS record to add. You must own the domain, and it cannot be on the platform domain. |
| Sealed release backup | Live. Seals the exact bytes being shipped into a release vault first. |
| Email through the company sender | Checked against the CRM manifest. |
| Visitor analytics | Recorded on the plan only. Not provisioned yet. |
| CRM single sign-on | Recorded on the plan only. Not provisioned yet. |
For a custom domain add the CNAME record CCD shows you; TLS is issued once it resolves.
Dry run is the default
Every API call is a dry run unless the JSON body contains "dry_run": false. A missing value, null, 0 or the string "false" all stay dry. A dry run changes nothing and tells you what would happen.
Rollback
Releases are immutable and the last 3 are kept for each stage. Rolling back is a symlink swap to the previous release, not a rebuild, so you get byte-identical code. In the wizard open Releases and choose rollback, or by API:
# preview
curl -X POST -H "X-API-Key: $CCD_API_KEY" -H "Content-Type: application/json" \
-d '{"stage":"production"}' "$CCD_URL/api/deploy-crm/$PID/rollback"
# do it (type the phrase: ROLLBACK <project-slug>)
curl -X POST -H "X-API-Key: $CCD_API_KEY" -H "Content-Type: application/json" \
-d '{"stage":"production","dry_run":false,"confirm":"ROLLBACK my-site"}' \
"$CCD_URL/api/deploy-crm/$PID/rollback"
Rollback needs at least two releases. It does not touch the CRM.
API reference
All routes are under /api/deploy-crm/<project_id> and need a read and write key (or a logged-in session).
| Method and path | Purpose |
|---|---|
GET /options |
Targets, your CRM accounts, integrations, stage URLs |
POST /plan |
Create a plan. Body: kind, company_id (existing) or company_name and email (new), integrations, domain, health_path, run_tests |
GET /plan/<plan_id> |
Read a plan |
POST /plan/<plan_id>/preflight |
Re-run checks |
POST /plan/<plan_id>/staging |
Deploy to staging (dry_run false to go live) |
POST /plan/<plan_id>/production |
Deploy to production. Needs confirm |
POST /plan/<plan_id>/link-crm |
Retry the CRM link. Needs confirm |
POST /rollback |
Roll back a stage |
GET /releases |
Releases per stage |
GET /log |
Audit log (?plan_id= to filter) |
Response codes: 200 ok, 428 a confirm phrase is needed (the body contains it), 412 checks are blocking, 402 your plan does not include CRM deploys, 409 other failures.
Example, dry run then live to staging:
PLAN=$(curl -s -X POST -H "X-API-Key: $CCD_API_KEY" -H "Content-Type: application/json" \
-d '{"kind":"new_client_site","company_name":"Acme Bakery","email":"[email protected]","integrations":["forms"]}' \
"$CCD_URL/api/deploy-crm/$PID/plan" | python3 -c 'import sys,json;print(json.load(sys.stdin)["plan"]["plan_id"])')
curl -s -X POST -H "X-API-Key: $CCD_API_KEY" -H "Content-Type: application/json" -d '{}' \
"$CCD_URL/api/deploy-crm/$PID/plan/$PLAN/staging" # dry run
curl -s -X POST -H "X-API-Key: $CCD_API_KEY" -H "Content-Type: application/json" -d '{"dry_run":false}' \
"$CCD_URL/api/deploy-crm/$PID/plan/$PLAN/staging" # real
Security notes
- Plans, events and rollbacks are scoped to your company. Another company's plan is invisible to you.
- An existing-company target must come from your own CRM account list; you cannot link a site to an account outside your group.
- Every deploy, rollback and CRM link is written to an audit log (
GET /log).