Get an API key
Authentication

POST /api/auth/logout

POST https://api.iagenify.com/api/auth/logout

Revoke the bearer session used for this request.

Bearer tokendestructiveJSON

HTTP request

curl https://api.iagenify.com/api/auth/logout \
  -X POST \
  -H "Authorization: Bearer $IAGENIFY_TOKEN"

JavaScript

const response = await fetch("https://api.iagenify.com/api/auth/logout", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IAGENIFY_TOKEN}` },
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);

Python

import os, requests

response = requests.request(
    "POST",
    "https://api.iagenify.com/api/auth/logout",
    headers={"Authorization": "Bearer " + os.environ["IAGENIFY_TOKEN"]},
    timeout=30,
)
response.raise_for_status()
result = response.json()

Successful response

{ ok: true }

Delete the local JWT and refresh token after success. Requests that reuse the revoked session are rejected.