---
title: "End a session now. Its next request is refused; revoking one already ended is harmless."
method: POST
path: "/v1/sandboxes/{id}/sessions/{sessionId}:revoke"
tags: ["sandboxes"]
---

# End a session now. Its next request is refused; revoking one already ended is harmless.

`POST /v1/sandboxes/{id}/sessions/{sessionId}:revoke`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/sandboxes/{id}/sessions/{sessionId}:revoke`
- Auth: HTTP bearer

## Path parameters

- `id` string, required: Resource identifier (UUID).
- `sessionId` string, required: Resource identifier (UUID).

## Headers

- `Idempotency-Key` string

## Response `200`

Success

- object
  - `id` string, uuid
  - `sandboxId` string, uuid
  - `name` string, nullable
  - `origins` string[]
  - `createdBy` string: The agent whose key made it; the session acts as it.
  - `createdAt` string, date-time
  - `expiresAt` string, date-time
  - `revokedAt` string, date-time, nullable
  - `state` 'active' | 'expired' | 'revoked'

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
