/v1/session/{id}AuthRevoke one of the caller's own sessions. Takes effect immediately — the refresh token stops working straight away, not at the end of its window.
Path parameters
id*string · uuidId of the session.
Response · 200 `revoked` is false when the session was already revoked, so repeating the call is safe.
revoked*booleanTrue when this call revoked the session; false when it was already revoked.
Example: true
Example
Request
DELETE https://api.platform-auth.productcraft.co/v1/session/{id}
Authorization: Bearer YOUR_TOKENimport { PlatformAuth } from "@productcraft/platform-auth";
// Reads PRODUCTCRAFT_API_KEY from the environment; administration
// calls take a person's session: { auth: { type: "bearer", token } }
const platform = new PlatformAuth();
const revokeSession = await platform.sessions.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");platform.sessions.delete(id, options?): PlatformAuth.RevokeSession
Response
{
"revoked": true
}