curl --request GET \
--url https://api.happenstance.ai/v1/chat/{chat_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.happenstance.ai/v1/chat/{chat_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.happenstance.ai/v1/chat/{chat_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"source": "api",
"url": "<string>",
"status": "idle",
"created_at": "<string>",
"credits_charged": 123,
"turns": [
{
"id": "<string>",
"status": "queued",
"created_at": "<string>",
"started_by": "message",
"completed_at": "<string>",
"credits_charged": 123
}
],
"messages": [
{
"role": "user",
"markdown": "<string>",
"created_at": "<string>",
"turn_id": "<string>"
}
],
"searches": [
{
"search_id": "<string>",
"status": "running",
"page_id": "<string>",
"turn_id": "<string>",
"query": "<string>",
"results_count": 123
}
],
"title": "<string>",
"memory": "<string>",
"history_summary": "<string>",
"schedules": [
{
"id": "<string>",
"instruction": "<string>",
"cron": "<string>",
"timezone": "<string>",
"next_run_at": "<string>",
"paused": true,
"email_enabled": true,
"push_enabled": true,
"created_at": "<string>",
"paused_reason": "inactive"
}
]
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}Get Chat
The whole chat: its messages (Chat’s as markdown), its turns, the searches it ran, and the notes Chat keeps on the user’s goal and preferences (memory) and on older turns.
curl --request GET \
--url https://api.happenstance.ai/v1/chat/{chat_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.happenstance.ai/v1/chat/{chat_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.happenstance.ai/v1/chat/{chat_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"source": "api",
"url": "<string>",
"status": "idle",
"created_at": "<string>",
"credits_charged": 123,
"turns": [
{
"id": "<string>",
"status": "queued",
"created_at": "<string>",
"started_by": "message",
"completed_at": "<string>",
"credits_charged": 123
}
],
"messages": [
{
"role": "user",
"markdown": "<string>",
"created_at": "<string>",
"turn_id": "<string>"
}
],
"searches": [
{
"search_id": "<string>",
"status": "running",
"page_id": "<string>",
"turn_id": "<string>",
"query": "<string>",
"results_count": 123
}
],
"title": "<string>",
"memory": "<string>",
"history_summary": "<string>",
"schedules": [
{
"id": "<string>",
"instruction": "<string>",
"cron": "<string>",
"timezone": "<string>",
"next_run_at": "<string>",
"paused": true,
"email_enabled": true,
"push_enabled": true,
"created_at": "<string>",
"paused_reason": "inactive"
}
]
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "https://developer.happenstance.ai/api-reference/introduction#error-response-format",
"detail": "<string>",
"instance": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Response from GET /v1/chat/{chat_id}: the conversation and what Chat keeps about it.
api, app idle, running Credits charged for the chat's turns so far
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Chat's notes on the user and the goal (preferences, exclusions, style), kept across turns
Chat's summary of the older part of a long conversation
The chat's scheduled tasks. Only a chat started in the app has them. A chat started through the API has none: to run it on a schedule, send it a message on yours.
Show child attributes
Show child attributes
