spicrawlspicrawlDocs
Sessions

Delete a session and its context

Removes the session row and purges its context permanently. Unlike release, the id stops resolving afterwards.

Requires scope: sessions

DELETE
/v1/sessions/{sessionID}

Removes the session row and purges its context permanently. Unlike release, the id stops resolving afterwards. Request-log entries that reference the session survive.

Pitfalls:

  • Idempotent: deleting an unknown or already-deleted id returns 204 (including another tenant's id), so a 204 does not prove the session existed.
  • While a render holds the lease, returns 409 ERR::SESSION::BUSY with Retry-After. Wait, or repeat with force=true to delete anyway and fail the running task.

Authorization

bearerAuth
AuthorizationBearer <token>

Authorization: Bearer <key>. Read the key from the SPICRAWL_API_KEY environment variable; never hard-code or log it. spicrawl_test_… keys can never spend live credits. Scopes: scrape, batch, sessions (granted by default), browser and read (granted deliberately). A missing scope is 403 ERR::AUTH::INSUFFICIENT_SCOPE naming the scope.

In: header

Path Parameters

sessionID*string

Session id from POST /v1/sessions (26-character ULID; a UUID is also accepted). A malformed id answers 404 ERR::SESSION::NOT_FOUND, the same as an unknown one.

Query Parameters

force?boolean

Set true to end the session even while a render holds its lease; the running task fails. Parsed as a Go boolean (true, false, 1, 0, t, f, any case); other values are refused with 400.

Defaultfalse

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X DELETE "https://example.com/v1/sessions/01J9ZQ4M7R3T8VX2K5N6P0B1CD"
Empty