Distribution Channels
Every project has three fixed distribution channels that represent deployment environments. Publishing a template to a channel makes it available in that environment.
Channels
| Channel | Enum value | Purpose |
|---|---|---|
DEV | 0 | Local development and early integration testing |
STAGING | 1 | Pre-production validation with real infrastructure |
PROD | 2 | Live production traffic |
Publishing to PROD is what triggers the template's status to change to Production.
Channel state
Each channel tracks:
| Field | Description |
|---|---|
channel | DEV, STAGING, or PROD |
activeTemplateId | The template currently published to this channel (null if unpublished) |
channelHandle | Internal publication identifier |
publishedBy | User who performed the last publish action |
publishedAt | Timestamp of the last publish action |
API endpoints
| Method | Path | Role required | Description |
|---|---|---|---|
GET | /api/Projects/{projectId}/distribution-channels | Viewer+ | List all three channels with their current state |
POST | /api/Projects/{projectId}/distribution-channels/{channel}/publish | ProjectManager+ | Publish a template to a channel |
POST | /api/Projects/{projectId}/distribution-channels/{channel}/unpublish | ProjectManager+ | Remove the active template from a channel |
{channel} must be DEV, STAGING, or PROD.
Publishing a template
POST /api/Projects/{projectId}/distribution-channels/PROD/publish
Authorization: Bearer {token}
{
"templateId": "template-uuid"
}
The template must be in Testing status to be published. Publishing to PROD automatically moves the previously Production template to Previous.
Unpublishing a channel
POST /api/Projects/{projectId}/distribution-channels/STAGING/unpublish
Authorization: Bearer {token}
Removes the active template from the channel. The template's status is not affected — it remains whatever it was.
Archiving a project automatically unpublishes all three channels.
Recommended workflow
Upload template → Publish to DEV → Test
→ Publish to STAGING → Validate
→ Publish to PROD → Live
Channels are independent — you can publish different template versions to DEV and STAGING simultaneously for parallel testing.