POST
/
session
/
close
curl --location \
--request POST 'https://api.notte.cc/session/close' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-api-key' \
--data '{
  "session_id": "abc123"
}'
{
  "session_id": "abc123",
  "error": null
}

Parameters

session_id (req)
string

Required parameter to specify the session ID. The session ID of the session to be closed. This field is mandatory.

Response

session_id
string

The unique identifier for the closed session.

error
string (opt)

An optional error message if something goes wrong during session closure.

Error Responses

400
string

Invalid request. This error is returned when the session ID is not provided.

500
string

Internal server error. This error is returned when the server encounters an unexpected condition.

curl --location \
--request POST 'https://api.notte.cc/session/close' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-api-key' \
--data '{
  "session_id": "abc123"
}'
{
  "session_id": "abc123",
  "error": null
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
session_id
string | null

The ID of the session. A new session is created when not provided.

keep_alive
boolean
default:false

If True, the session will not be closed after the operation is completed.

session_timeout_minutes
integer
default:5

Session timeout in minutes. Cannot exceed the global timeout.

Required range: 0 < x <= 30
screenshot
boolean | null

Whether to include a screenshot in the response.

Response

200
application/json
Successful Response
session_id
string
required

The ID of the session (created or existing). Use this ID to interact with the session for the next operation.

timeout_minutes
integer
required

Session timeout in minutes. Will timeout if now() > last access time + timeout_minutes

created_at
string
required

Session creation time

last_accessed_at
string
required

Last access time

duration
string
required

Session duration

status
enum<string>
required

Session status

Available options:
active,
closed,
error,
timed_out
error
string | null

Error message if the operation failed to complete