🏠 Vastu API and ✋ Palmistry API are now live. Ship them in your app today.
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

GEThttps://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.

ParameterTypeDescription
x-astrologyapi-keystringYour access token. Required when not using Basic Auth.
AuthorizationstringBasic base64(user_id:api_key). Required when not using an access token.

Path parameters

ParameterTypeDescription
session_idrequiredstringUnique chat session ID returned by the Chat API.

Query parameters

ParameterTypeDescription
acstringOptional 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"