The control plane API is the control surface for deployment intent and orchestration in Unkey. It is the system of record for control-plane state, and it triggers asynchronous workflows for operations that cannot complete on the request path.Documentation Index
Fetch the complete documentation index at: https://engineering.unkey.com/llms.txt
Use this file to discover all available pages before exploring further.
Place in the stack
The control plane API sits between the user-facing control surfaces and the execution plane.- Accepts configuration and deployment intent from internal automation and the dashboard
- Persists that intent in MySQL as the system of record
- Invokes Restate workflows that perform long running work
- Provides control-plane data to services that reconcile desired state
Responsibilities
The service owns these responsibilities.- Persist deployment intent, runtime settings, and Git metadata
- Expose control-plane RPCs for reads, writes, and streaming state
- Trigger workflows for deployments, certificates, routing, and custom domains
- Serve ACME challenge state and custom domain configuration
- Coordinate cluster state and status reporting
Control-plane data model
The API is the write path for these entities.- Deployments and their runtime settings
- Custom domains and ACME challenges
- Cluster and routing state
- OpenAPI specs tied to deployments
Connect RPC surface
The API exposes Connect services over HTTP/2 for control-plane reads, writes, and streaming state used by other services.CtrlServicefor core control plane operationsDeployServicefor deployment creation and workflow triggersOpenApiServicefor OpenAPI storage and retrievalAcmeServicefor ACME challenges and certificate stateClusterServicefor cluster coordination and statusCustomDomainServicefor domain provisioning and routing
GitHub webhook flow
Whengithub.webhook_secret is set, the API exposes POST /webhooks/github and verifies the signature before handling events. Push events create a deployment record and start a deploy workflow.
- Parse the push payload, and ignore forked repositories or non-branch refs.
- Look up GitHub repo connections for the installation and repository IDs.
- Map the branch to
productionorpreviewbased on the project’s default branch. - Load environment settings and variables, and encode a secrets config blob.
- Insert a deployment record with Git metadata and runtime settings.
- Invoke the Restate deploy workflow with a Git source payload.
Certificate bootstrap
Whendefault_domain or regional_domain is configured, the API seeds wildcard domain records on startup. This sets up platform owned domains so the certificate workflow can issue and renew them.
- Create a
custom_domainsrecord under theunkey_internalworkspace - Insert an ACME challenge with status
waitingso renewal jobs can pick it up - Bootstrap
*.{default_domain}and*.{region}.{regional_domain}entries

