Revoke an embedded editor session
DELETE
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.
header
AuthorizationBearer <token>Authorization: Bearer dr_live_… or dr_test_…
id*stringOK
application/json- response
id*stringobject*unknownurl*|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*stringSlug of the template the session edits.
permissions*What the editor offers beyond editing the draft.
user*|Your user, as you described them.
theme*status*stringValue in
"active""expired""revoked"expires_at*stringFormat
date-timerevoked_at*|nulltest_mode*booleancreated_at*stringFormat
date-timecurl -X DELETE 'https://druckling-nine.vercel.app/v1/embed_sessions/string'Example Response200
{ "id": "string", "object": "embed_session", "url": "string", "template": "string", "permissions": { "publish": true, "assistant": true }, "user": { "id": "string", "name": "string" }, "theme": { "mode": "light", "accent": "string" }, "status": "active", "expires_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "test_mode": true, "created_at": "2019-08-24T14:15:22Z"}