Skip to main content
GET
https://macaly.com/
/
api
/
chat
/
{chatId}
/
status
Get Status
curl --request GET \
  --url https://macaly.com/api/chat/{chatId}/status \
  --header 'Authorization: Bearer <token>'
Poll the status of a chat workflow. Useful for checking if a chat has finished processing without needing to maintain a streaming connection.

Request

GET /api/chat/{chatId}/status

Headers

HeaderRequiredDescription
AuthorizationYesBearer macaly_...

Path Parameters

ParameterTypeDescription
chatIdstringThe chat ID returned from POST /api/chat

Example Request

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

Response

{
  "chatId": "abc123",
  "url": "https://macaly.com/chat/abc123",
  "status": "completed",
  "result": {
    "content": "Here's what I built for you..."
  }
}

Response Fields

FieldTypeDescription
chatIdstringThe chat ID
urlstringURL to view the chat in browser
statusstringCurrent workflow status (see below)
result.contentstringFinal assistant message (only when completed)
error.messagestringError description (only when failed)

Status Values

StatusDescription
runningWorkflow is currently executing
completedFinished successfully
failedEncountered an error
cancelledWorkflow was manually cancelled
no_active_workflowNo workflow found for this chat

Status Codes

StatusDescription
200Success
401Invalid or missing API key
403Chat does not belong to your team
404Chat not found

Polling Pattern

while true; do
  STATUS=$(curl -s https://www.macaly.com/api/chat/$CHAT_ID/status \
    -H "Authorization: Bearer macaly_...")

  echo "Status: $(echo $STATUS | jq -r .status)"

  if echo "$STATUS" | grep -q '"status":"completed"'; then
    echo "Done!"
    break
  fi

  sleep 2
done

Next Steps

Once status is completed, you can:
  1. Deploy the app using POST /api/chat/{chatId}/deploy