Skip to content

Endpoints

Reference for Envtracker webhook endpoints used for CI/CD automation.

4 min read

Overview

This section documents the webhook endpoints you can call from your CI/CD system or external tools.

All requests must be authenticated with a webhook key and signature.

Base URL

https://<your-tenant>.envtracker.io

Notify deployment (recommended)

PUT /webhook/notify

The primary endpoint for notifying Envtracker of a deployment event. Use this endpoint for all new integrations.

Request body (notify deployment)

{
	"projectCode": "my-project",
	"envCode": "production",
	"repoCode": "my-app",
	"pipeline": 456,
	"status": "success",
	"branch": "main",
	"deployDate": "2024-01-15T10:30:00Z"
}
FieldTypeDescription
projectCodestringYour project code in Envtracker
envCodestringTarget environment code (for example production, staging)
repoCodestringRepository or application code
pipelinenumberCI/CD pipeline run number
statusstringDeployment status (for example success, failed)
branchstringGit branch that was deployed
deployDatestringISO 8601 timestamp of the deployment

Responses (notify deployment)

StatusMeaning
200Deployment recorded
400Invalid payload
401Authentication failed (missing headers, invalid signature, expired timestamp, or unknown key)
403Project does not exist

Notify deployment (legacy, deprecated)

PUT /v1/company/:companyCode/project/:projectCode/applications/:appCode/env/:envCode

This endpoint is deprecated and will be removed in a future release. Migrate to /webhook/notify as soon as possible.

Request body (legacy notify deployment)

{
	"pipeline": 456,
	"status": "success",
	"gitTracking": {
		"branch": "main"
	},
	"deployDate": "2024-01-15T10:30:00Z"
}

Responses (legacy notify deployment)

StatusMeaning
200Deployment recorded
400Invalid payload or invalid URL parameters
401Authentication failed
403Project does not exist

Create environment

PUT /webhook/create-environment

Automate the creation of a new environment in Envtracker, for example as part of a branch deployment workflow.

Request body (create environment)

{
	"name": "Feature Branch Preview",
	"code": "feature-preview",
	"teamCode": "engineering",
	"url": "https://feature.example.com",
	"position": 3,
	"type": "DEVELOPMENT"
}
FieldTypeRequiredDescription
namestringyesDisplay name for the environment
codestringyesUnique code identifier for the environment
teamCodestringyesCode of the team that owns the environment
urlstringnoURL of the deployed environment
positionnumbernoDisplay order position
typestringyesOne of DEVELOPMENT, STAGING, PRODUCTION, TESTING

Responses (create environment)

StatusMeaning
200Environment created successfully
400Invalid payload
401Authentication failed
403Team does not exist, environment code already exists, or tier limits were reached

Assign applications

PUT /webhook/assign-apps

Automate the assignment of applications to one or more environments.

Request body (assign applications)

{
	"projectCode": "my-project",
	"apps": [
		{
			"repoCode": "my-app",
			"envs": ["production", "staging"]
		},
		{
			"repoCode": "another-service",
			"envs": ["staging"]
		}
	]
}
FieldTypeDescription
projectCodestringThe project to assign apps within
appsarrayList of app assignment entries
apps[].repoCodestringRepository or template code used to create the application
apps[].envsstring[]Array of environment codes to assign this app to

Responses (assign applications)

StatusMeaning
200Applications assigned successfully
400Invalid payload
401Authentication failed
403One or more referenced resources do not exist, or tier limits were reached
Was this page helpful?