Sessions
DELETE
/v1/sessions/{sessionId}Closes an active session and charges duration credits once. Repeated close requests for an already-finalized session are idempotent.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
sessionId*string
Session id returned by POST /v1/sessions.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/sessions/sess_123e4567-e89b-12d3-a456-426614174000"{
"success": true,
"session": {
"id": "string",
"status": "active",
"closeReason": "closed",
"createdAt": "2019-08-24T14:15:22Z",
"startedAt": "2019-08-24T14:15:22Z",
"expiresAt": "2019-08-24T14:15:22Z",
"closedAt": "2019-08-24T14:15:22Z",
"durationSeconds": 0,
"billedCredits": 0,
"actionCount": 0,
"actionSuccessCount": 0,
"actionErrorCount": 0,
"actionBreakdown": {
"property1": {
"total": 0,
"success": 0,
"error": 0
},
"property2": {
"total": 0,
"success": 0,
"error": 0
}
},
"options": {
"maxTtlSeconds": 0,
"proxy": true,
"bypassBotDetection": true
}
}
}{
"success": false,
"error": "string"
}{
"success": false,
"error": "string"
}{
"success": false,
"error": "string"
}{
"success": false,
"error": "string"
}{
"success": false,
"error": "string"
}{
"success": false,
"error": "string"
}Get session metadata GET
Previous Page
Execute a Capture action POST
Executes a deterministic browser action against the session's active page. If the request lands on a non-owner API instance, Capture routes the action to the owning instance through Redis. Responses for existing sessions include `expiresInSeconds`, the remaining lifetime at the time the action response is sent.