Get Deployment
curl --request GET \
--url https://macaly.com/api/chat/{chatId}/deployment \
--header 'Authorization: Bearer <token>'import requests
url = "https://macaly.com/api/chat/{chatId}/deployment"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://macaly.com/api/chat/{chatId}/deployment', 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}/deployment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}/deployment"
req, _ := http.NewRequest("GET", 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.get("https://macaly.com/api/chat/{chatId}/deployment")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://macaly.com/api/chat/{chatId}/deployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyEndpoints
Get deployment
Get the current deployment status for a chat
GET
/
api
/
chat
/
{chatId}
/
deployment
Get Deployment
curl --request GET \
--url https://macaly.com/api/chat/{chatId}/deployment \
--header 'Authorization: Bearer <token>'import requests
url = "https://macaly.com/api/chat/{chatId}/deployment"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://macaly.com/api/chat/{chatId}/deployment', 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}/deployment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}/deployment"
req, _ := http.NewRequest("GET", 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.get("https://macaly.com/api/chat/{chatId}/deployment")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://macaly.com/api/chat/{chatId}/deployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyGet the current deployment status for a chat. If the deployment is not in a final state, this endpoint will sync the status with Vercel before returning.
Request
GET /api/chat/{chatId}/deployment
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer macaly_... |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
chatId | string | The chat ID |
Example Request
curl https://www.macaly.com/api/chat/abc123/deployment \
-H "Authorization: Bearer macaly_abc123..."
const response = await fetch(
`https://www.macaly.com/api/chat/${chatId}/deployment`,
{
headers: {
'Authorization': 'Bearer macaly_abc123...',
},
}
);
const data = await response.json();
console.log(data.status, data.url);
import requests
response = requests.get(
f'https://www.macaly.com/api/chat/{chat_id}/deployment',
headers={
'Authorization': 'Bearer macaly_abc123...',
},
)
data = response.json()
print(data['status'], data['url'])
Response
Deployment Ready
{
"id": "jzga0sttml37v6mbizb8tk1x",
"url": "https://macaly-staging-abc123.macaly.app",
"status": "READY",
"deploymentId": "dpl_HKLBd2QDTwq58AMUJiaMyUzk8WUw",
"createdAt": "2025-01-12T21:18:54.906Z",
"error": null,
"domain": "macaly-staging-abc123.macaly.app",
"domains": [
{
"domain": "macaly-staging-abc123.macaly.app",
"verified": true,
"isCustomDomain": false
}
]
}
No Deployment
{
"id": null,
"url": null,
"status": null,
"deploymentId": null,
"createdAt": null,
"error": null,
"domain": null,
"domains": [
{
"domain": "macaly-staging-abc123.macaly.app",
"verified": true,
"isCustomDomain": false
}
]
}
Deployment Failed
{
"id": "jzga0sttml37v6mbizb8tk1x",
"url": "https://macaly-staging-abc123.macaly.app",
"status": "ERROR",
"deploymentId": "dpl_HKLBd2QDTwq58AMUJiaMyUzk8WUw",
"createdAt": "2025-01-12T21:18:54.906Z",
"error": ["Build failed: Module not found"],
"domain": "macaly-staging-abc123.macaly.app",
"domains": []
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | null | Database deployment ID (null if never deployed) |
url | string | null | The deployment URL |
status | string | null | Vercel deployment status (see below) |
deploymentId | string | null | Vercel deployment ID |
createdAt | string | null | ISO timestamp of deployment creation |
error | string[] | null | Error messages if deployment failed |
domain | string | null | Primary domain for the deployment |
domains | array | All connected domains |
domains[].domain | string | Domain name |
domains[].verified | boolean | Whether the domain is verified |
domains[].isCustomDomain | boolean | Whether this is a custom domain |
Deployment Status Values
| Status | Description |
|---|---|
QUEUED | Deployment is queued |
BUILDING | Build is in progress |
READY | Deployment successful |
ERROR | Deployment failed |
CANCELED | Deployment was cancelled |
UNPUBLISHED | Deployment was unpublished |
Status Codes
| Status | Description |
|---|---|
| 200 | Success (even if no deployment exists, returns null fields) |
| 401 | Invalid or missing API key |
| 403 | Chat does not belong to your team |
| 404 | Chat not found |
Polling Pattern
while true; do
DEPLOYMENT=$(curl -s https://www.macaly.com/api/chat/$CHAT_ID/deployment \
-H "Authorization: Bearer macaly_...")
STATUS=$(echo $DEPLOYMENT | jq -r '.status')
echo "Status: $STATUS"
if [[ $STATUS == "READY" ]]; then
echo "Deployed: $(echo $DEPLOYMENT | jq -r '.url')"
break
elif [[ $STATUS == "ERROR" ]]; then
echo "Failed: $(echo $DEPLOYMENT | jq -r '.error')"
break
fi
sleep 3
done
⌘I