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
POST https://ask.divineapi.com/session/deleteGuide: Erase one conversation: its messages and its stored birth details. Takes api_key as a query parameter. Permanent, and intended as the path you call when a user asks you to delete their data.
Authentication
Every request requires two headers:
| Header | Description |
|---|---|
Authorization | Bearer {api_acc_token} - identifies the user |
x-api-key | Use api_key |
Headers
| Name | Type | Description |
|---|---|---|
Content-Type* | String | application/json. Example: Content-Type: application/json |
Fields marked with * are mandatory.
Request Body
| Name | Type | Description |
|---|---|---|
user_id* | String | Your ID for the end user. Recorded on every request and used for usage reporting. |
| session_id* | String | Your ID for this conversation. A new ID starts a fresh thread. |
200: OK Answered Successfully
{
"deleted": true,
"session_id": "session090091",
"messages_removed": 2
}Example Code Implementations
Below are example implementations in various programming environments.
cURL
curl --location 'https://ask.divineapi.com/session/delete' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_acc_token}' \
--header 'x-api-key: {api-key}' \
--data '{
"session_id": "session090091",
"user_id": "u_8812dwqdq"
}'