# Revoke an embedded editor session (/docs/api-reference/embedded-editor/revoke)

> Ends the session right away, e.g.

`DELETE https://druckling-nine.vercel.app/v1/embed_sessions/{id}`

Ends the session right away, e.g. when the user signs out of your product. The open editor reports `session_revoked` on its next request. Revoking twice is fine.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

## Response 200: OK

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "embed_session"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Load this URL in an iframe (or pass it to `mountEditor` from `@druckling/embed`). Returned only when the session is created. The session token sits in the fragment (`#token=…`), which browsers never send to servers; Druckling keeps only a hash of it. Hand the URL to the signed-in user's browser only, never log or cache it."
    },
    "template": {
      "type": "string",
      "description": "Slug of the template the session edits."
    },
    "permissions": {
      "type": "object",
      "properties": {
        "publish": {
          "type": "boolean",
          "description": "The user can publish new versions."
        },
        "assistant": {
          "type": "boolean",
          "description": "The AI assistant is offered. False when the plan doesn't include it, even if you asked for it."
        }
      },
      "required": [
        "publish",
        "assistant"
      ],
      "description": "What the editor offers beyond editing the draft."
    },
    "user": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "name"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Your user, as you described them."
    },
    "theme": {
      "type": "object",
      "properties": {
        "mode": {
          "enum": [
            "light",
            "dark",
            "system"
          ],
          "type": "string"
        },
        "accent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode",
        "accent"
      ]
    },
    "status": {
      "enum": [
        "active",
        "expired",
        "revoked"
      ],
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "test_mode": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "object",
    "url",
    "template",
    "permissions",
    "user",
    "theme",
    "status",
    "expires_at",
    "revoked_at",
    "test_mode",
    "created_at"
  ]
}
```