Skip to main content
POST
/
api
/
deployments
Create a new deployment from a build via API key
curl --request POST \
  --url https://api.leanmcp.com/api/deployments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "buildId": "<string>",
  "containerPort": 80,
  "secretIds": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "buildId": "<string>",
  "firebaseUid": "<string>",
  "projectId": "<string>",
  "serviceName": "<string>",
  "imageUri": "<string>",
  "status": "PENDING",
  "containerPort": 123,
  "publicIp": "<string>",
  "privateIp": "<string>",
  "targetGroupArn": "<string>",
  "publicUrl": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "secretIds": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Enter your LeanMCP API key

Body

application/json
buildId
string
required

ID of the build to deploy

containerPort
number
default:80
required

Port exposed by the container

secretIds
string[]

Array of secret IDs to include as environment variables

Response

Deployment created successfully

id
string
required

Unique identifier for the deployment

buildId
string
required

Related build ID for this deployment

firebaseUid
string
required

User ID of the owner

projectId
string
required

Project ID the deployment is associated with

serviceName
string
required

Name of the ECS service

imageUri
string
required

URL of the ECR image to deploy

status
enum<string>
required

Current status of the deployment

Available options:
PENDING,
DEPLOYING,
RUNNING,
FAILED,
STOPPED,
DELETING,
ALB_RULES_DELETED,
TARGET_GROUP_DELETED,
ECS_DELETED,
ECR_DELETED,
DELETED
containerPort
number
required

Container port that the service exposes

publicIp
string
required

Public IP address assigned to the deployment

privateIp
string
required

Private IP address of the deployment (used for ALB target)

targetGroupArn
string
required

ARN of the Target Group associated with this deployment

publicUrl
string
required

Public URL to access the deployed service

createdAt
string
required

Timestamp of when the deployment was created

updatedAt
string
required

When the deployment was last updated

secretIds
string[]

Array of secret IDs to include as environment variables