Skip to content
POST /automation/{id}/session/{sessionId}/close

The next run with the same key starts a new generation. Idempotent on an already-closed session.

Path Parameters

idstring
required·

Resource id

sessionIdstring
required·

Session id

Response Body

active_run_idstring,null
artifact_countinteger
artifacts_unrecordedinteger
automation_idstring
can_closeboolean
can_continueboolean
close_reasonstring,null
Possible values:
closed_by_useridlenull
closed_atstring,null
closed_bystring,null
closed_by_display_namestring,null
console_urlstring
created_atstring
generationinteger
keystring
last_activity_atstring
last_run_idstring,null
last_statusstring,null
participant_countinteger
participant_previewobject
countinteger
namesstring[]

At most 3.

queued_runsinteger
run_countinteger
runbookobject | null
One of
object · 9 properties
collection_idstring
collection_namestring,null
first_run_idstring
last_run_idstring
row_idstring
row_titlestring,null
row_versioninteger,null
updated_atstring
visibleboolean

False when the caller cannot see the row: the names then come back null.

runs_asobject
owner_namestring,null
session_idstring
statusstring
Possible values:
openclosed
threadobject | null
One of
object · 5 properties
channel_idstring
kind
permalinkstring,null
team_idstring
tsstring
titlestring
transcript_availableboolean
waitingobject,null
curl -X POST 'https://api.elaichi.ai/automation/<id>/session/<sessionId>/close' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
const response = await fetch('https://api.elaichi.ai/automation/<id>/session/<sessionId>/close', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/automation/<id>/session/<sessionId>/close"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.post(url, headers=headers)
print(response.json())