Revoke an API key
DELETE/v1/keys/{id}Dashboard session
Revoke an API key (session only).
Authentication
Dashboard session only (the simline_session cookie). API keys can't call this endpoint: manage keys at app.simline.dev → Developers.
Parameters
| Name | In | Description |
|---|---|---|
idrequired | path | string |
Response
204 — Revoked
Errors
Errors are JSON: {"error": "<code>", "message": "<a sentence>"}. Branch on error, show message. Every code is explained in Errors.
| Status | error | When |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key / session |
| 403 | forbidden | API key lacks the required scope |
| 404 | not_found | Key not found |
| 500 | internal | Internal error |
Examples
This endpoint is for the dashboard. The examples use the session cookie for completeness; in practice, create and revoke keys at app.simline.dev → Developers → API keys.
curl -X DELETE "https://api.simline.dev/v1/keys/key_Q1w2E3r4T5y6U7i8O9p0Aa" \ -H "Cookie: simline_session=$SIMLINE_SESSION"const res = await fetch("https://api.simline.dev/v1/keys/key_Q1w2E3r4T5y6U7i8O9p0Aa", { method: "DELETE", headers: { Cookie: `simline_session=${process.env.SIMLINE_SESSION}` }})if (!res.ok) { const err = await res.json() throw new Error(`${res.status} ${err.error}: ${err.message}`)}console.log(res.status) // 204: no bodyimport os
import requests
r = requests.delete( "https://api.simline.dev/v1/keys/key_Q1w2E3r4T5y6U7i8O9p0Aa", cookies={"simline_session": os.environ["SIMLINE_SESSION"]}, timeout=15,)if not r.ok: err = r.json() raise RuntimeError(f"{r.status_code} {err['error']}: {err['message']}")print(r.status_code) # 204: no body