AI Chat / Chat Sessions
Delete Chat
Permanently delete a chat session created through the Chat API using its session_id. Only the user who created the chat can delete it, authenticated with the same credentials.
Once deleted, the session ID can no longer be used. Its message history is no longer returned, and new messages sent to it are rejected with 410. To continue chatting, start a new session.
Endpoint
GET
https://json-chat.astrologyapi.com/api/chat/delete/{session_id}?ac={category}Authentication
Send one of the following headers: an access token or Basic Auth. Use the same credentials that created the chat session.
| Parameter | Type | Description |
|---|---|---|
| x-astrologyapi-key | string | Your access token. Required when not using Basic Auth. |
| Authorization | string | Basic base64(user_id:api_key). Required when not using an access token. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
| session_idrequired | string | Unique chat session ID returned by the Chat API. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
| ac | string | Optional chat category: VEDIC or WESTERN. If omitted, both categories are checked. |
This endpoint takes no request body.
Code samples
cURL
curl --request GET \
--url "https://json-chat.astrologyapi.com/api/chat/delete/SESSION_ID?ac=VEDIC" \
--header "x-astrologyapi-key: YOUR_API_KEY"