Astro ChatBot API
Introducing the Astro ChatBot API, a simple and reliable way to let users ask any astrology question in plain language and get one grounded, chart-based answer back. You send a question and the person's birth details; DivineAPI fetches and compresses their chart, and streams back an answer written for a reader, not a developer. This API is designed for websites, mobile apps, chatbots, CRM dashboards, or astrology portals that want a conversational astrology experience instead of static reports.
It supports seven endpoints: one to ask a question inside a stored conversation, four to manage and inspect those conversations and your account, and one liveness check.
API Endpoint
GET https://ask.divineapi.com/session/{session_id}Guide: The full history of one conversation, for restoring a chat screen. Returns every message in order with its role and timestamp, plus the birth details stored against the session. Returns 404 if the session does not exist.
200: OK Answered Successfully
{
"session_id": "s_5f21",
"messages": [
{ "role": "user", "text": "When will I marry?", "ts": 1788249956.9 },
{ "role": "assistant", "text": "Your chart...", "ts": 1788249957.2 }
],
"birth_details": {
"full_name": "Priya Sharma", "day": "24", "month": "05", "year": "1996",
"hour": "14", "min": "40", "gender": "female", "place": "New Delhi",
"lat": "28.7041", "lon": "77.1025", "tzone": "5.5"
}
}Example Code Implementations
Below are example implementations in various programming environments.
cURL
curl "https://ask.divineapi.com/session/s_5f21?api_key=dk_live_..."