Skip to Content
Are you interested in Hydra Deploy, contact us?
CTRL K
  • Welcome
  • Getting Started
  • Core Concepts
  • Organization & Management
  • Projects
  • Applications
  • Configurations
  • App Registries
  • Deployments
  • Deployment Steps
  • Auto Deploy Rules
  • External API
  • Welcome
  • Getting Started
  • Core Concepts
  • Organization & Management
  • Projects
  • Applications
  • Configurations
  • App Registries
  • Deployments
  • Deployment Steps
  • Auto Deploy Rules
  • External API

On This Page

  • Authentication
  • Create Project
  • Request Body
  • Schema
  • ConnectedApplication
  • AutoDeployRule
  • Agent
  • Response
  • Error Responses
  • Example
  • Create Version
  • Query Parameters
  • Response
  • Error Responses
  • Example
  • CI/CD Integration Example
Question? Give us feedback Edit this page 
External API

External API

The External API allows you to integrate Hydra Deploy into your CI/CD pipelines and automation tools using an organisation API key — no user login required.

Authentication

All external API requests are authenticated with your organisation’s API key. Pass it in the request body as key.

You can find and manage API keys under Settings > API Keys.

Create Project

Creates a new project and optionally connects environments, applications, auto-deploy rules, config overrides, and agents in a single call.

POST /api/externals/project/create

Request Body

{ "key": "your-api-key", "name": "My Project", "code": "my-project", "environments": ["Development", "Staging", "Production"], "connectedApps": [ { "appCode": "backend", "autoDeployRules": { "Development": { "rule": "main", "enabled": true }, "Staging": { "rule": "v[0-9]+\\.[0-9]+\\.[0-9]+", "enabled": true } }, "configs": { "app.env": { "Development": "NODE_ENV=development\nPORT=3000", "Staging": "NODE_ENV=staging\nPORT=3000" } } } ], "agents": [ { "name": "production-server" } ] }

Schema

FieldTypeRequiredDescription
keystringYesOrganisation API key
namestringYesProject name
codestringYesUnique project code within the organisation
environmentsstring[]NoNames of existing environments to connect
connectedAppsConnectedApplication[]NoApplications to connect
agentsAgent[]NoExisting agents to link (matched by name)

ConnectedApplication

FieldTypeRequiredDescription
appCodestringYesApplication code
autoDeployRulesRecord<EnvironmentName, AutoDeployRule>NoAuto-deploy rules keyed by environment name
configsRecord<ConfigName, Record<EnvironmentName, string>>NoConfig overrides keyed by config file name, then environment name

AutoDeployRule

FieldTypeRequiredDescription
rulestringNoRegex pattern to match version names. Leave empty to match all versions.
enabledbooleanNoWhether the rule is active. Defaults to true.

Agent

FieldTypeRequiredDescription
namestringYesAgent name (must already exist in the organisation)

Response

Returns the created project object on success (201).

Error Responses

StatusDescription
401Invalid or missing API key
404Environment, application, config, or agent not found

Example

curl -X POST https://your-domain.com/api/externals/project/create \ -H "Content-Type: application/json" \ -d '{ "key": "your-api-key", "name": "Payment Service", "code": "payment-service", "environments": ["Development", "Production"], "connectedApps": [ { "appCode": "payment-api", "autoDeployRules": { "Development": { "rule": "", "enabled": true }, "Production": { "rule": "v[0-9]+\\.[0-9]+\\.[0-9]+", "enabled": true } }, "configs": { "app.env": { "Development": "STRIPE_SECRET=sk_test_xxx", "Production": "STRIPE_SECRET=sk_live_xxx" } } } ], "agents": [{ "name": "prod-server-1" }] }'

Create Version

Creates a new version for an application. If any auto-deploy rules match the version name, deployments are automatically triggered.

POST /api/externals/version/create?key=...&appCode=...&version=...

Query Parameters

ParameterTypeRequiredDescription
keystringYesOrganisation API key
appCodestringYesApplication code
versionstringYesVersion name (e.g. v1.2.3, main, abc1234)

Response

Returns the created version object on success (201).

Error Responses

StatusDescription
401Invalid or missing API key
404Application not found or version could not be created

Example

curl -X POST "https://your-domain.com/api/externals/version/create?key=your-api-key&appCode=payment-api&version=v1.2.3"

CI/CD Integration Example

A typical pipeline step that creates a version after a successful build:

# GitLab CI example deploy: stage: deploy script: - | curl -X POST "https://your-domain.com/api/externals/version/create?key=$HYDRA_API_KEY&appCode=$APP_CODE&version=$CI_COMMIT_TAG"
# GitHub Actions example - name: Create Hydra Deploy version run: | curl -X POST "https://your-domain.com/api/externals/version/create?key=${{ secrets.HYDRA_API_KEY }}&appCode=my-app&version=${{ github.ref_name }}"

Once the version is created, any matching auto-deploy rules will automatically trigger deployments to the configured environments.

Auto Deploy Rules

MIT 2026 © Nextra.