Deploy
curl --request POST \
--url https://macaly.com/api/chat/{chatId}/deploy \
--header 'Authorization: Bearer <token>'import requests
url = "https://macaly.com/api/chat/{chatId}/deploy"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://macaly.com/api/chat/{chatId}/deploy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://macaly.com/api/chat/{chatId}/deploy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://macaly.com/api/chat/{chatId}/deploy"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://macaly.com/api/chat/{chatId}/deploy")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://macaly.com/api/chat/{chatId}/deploy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyEndpoints
Deploy
Deploy a chat to production
POST
/
api
/
chat
/
{chatId}
/
deploy
Deploy
curl --request POST \
--url https://macaly.com/api/chat/{chatId}/deploy \
--header 'Authorization: Bearer <token>'import requests
url = "https://macaly.com/api/chat/{chatId}/deploy"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://macaly.com/api/chat/{chatId}/deploy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://macaly.com/api/chat/{chatId}/deploy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://macaly.com/api/chat/{chatId}/deploy"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://macaly.com/api/chat/{chatId}/deploy")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://macaly.com/api/chat/{chatId}/deploy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyDeploy a chat to production. Starts a deployment to Vercel and returns immediately.
Request
POST /api/chat/{chatId}/deploy
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer macaly_... |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
chatId | string | The chat ID to deploy |
Example Request
curl -X POST https://www.macaly.com/api/chat/abc123/deploy \
-H "Authorization: Bearer macaly_abc123..."
const response = await fetch(
`https://www.macaly.com/api/chat/${chatId}/deploy`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer macaly_abc123...',
},
}
);
const data = await response.json();
console.log(data.url);
import requests
response = requests.post(
f'https://www.macaly.com/api/chat/{chat_id}/deploy',
headers={
'Authorization': 'Bearer macaly_abc123...',
},
)
data = response.json()
print(data['url'])
Response
{
"id": "jzga0sttml37v6mbizb8tk1x",
"url": "https://macaly-staging-abc123.macaly.app",
"status": "QUEUED",
"deploymentId": "dpl_HKLBd2QDTwq58AMUJiaMyUzk8WUw"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Database deployment ID |
url | string | The deployment URL |
status | "QUEUED" | "BUILDING" | Initial status |
deploymentId | string | Vercel deployment ID |
Status Codes
| Status | Description |
|---|---|
| 200 | Deployment started |
| 400 | Bad request (e.g., no messages in chat) |
| 401 | Invalid or missing API key |
| 403 | No permission to deploy OR chat doesn’t belong to team |
| 404 | Chat not found |
| 500 | Internal server error |
Notes
This endpoint returns immediately after starting the deployment. The deployment happens asynchronously on Vercel.
- Use
GET /api/chat/{chatId}/deploymentto poll for completion - Requires the
hosting.publish_macalypermission
Next Steps
After starting a deployment:- Poll for completion using
GET /api/chat/{chatId}/deployment - Wait for
statusto becomeREADY
⌘I