Skip to main content
POST
https://macaly.com/
/
api
/
chat
/
{chatId}
/
deploy
Deploy
curl --request POST \
  --url https://macaly.com/api/chat/{chatId}/deploy \
  --header 'Authorization: Bearer <token>'
Deploy a chat to production. Starts a deployment to Vercel and returns immediately.

Request

POST /api/chat/{chatId}/deploy

Headers

HeaderRequiredDescription
AuthorizationYesBearer macaly_...

Path Parameters

ParameterTypeDescription
chatIdstringThe chat ID to deploy

Example Request

curl -X POST https://www.macaly.com/api/chat/abc123/deploy \
  -H "Authorization: Bearer macaly_abc123..."

Response

{
  "id": "jzga0sttml37v6mbizb8tk1x",
  "url": "https://macaly-staging-abc123.macaly.app",
  "status": "QUEUED",
  "deploymentId": "dpl_HKLBd2QDTwq58AMUJiaMyUzk8WUw"
}

Response Fields

FieldTypeDescription
idstringDatabase deployment ID
urlstringThe deployment URL
statusstringInitial status (usually QUEUED or BUILDING)
deploymentIdstringVercel deployment ID

Status Codes

StatusDescription
200Deployment started
400Bad request (e.g., no messages in chat)
401Invalid or missing API key
403No permission to deploy OR chat doesn’t belong to team
404Chat not found
500Internal server error

Notes

This endpoint returns immediately after starting the deployment. The deployment happens asynchronously on Vercel.

Next Steps

After starting a deployment:
  1. Poll for completion using GET /api/chat/{chatId}/deployment
  2. Wait for status to become READY