End a session: yours, or anyone's for staff
DELETE
/v1/sessions/{id}
const url = 'https://example.com/v1/sessions/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/v1/sessions/example \ --header 'Authorization: Bearer <token>'Who: a signed-in user, not an API key. Not for API keys.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
account
required
object
id
integer format: int64
kind
required
string | null
created_at
required
string format: date-time
current
required
boolean
expires_at
required
string format: date-time
id
required
string
ip
required
string
last_refreshed_at
required
string | null format: date-time
revoke_reason
string | null
revoked_at
required
string | null format: date-time
user_agent
required
string
user_id
required
string
Example
{ "account": { "kind": "network" }, "revoke_reason": "signed_out"}default
Section titled “default”An error, as go-commons apperr maps it
Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
Example generated
{ "error": { "code": "example", "fields": { "additionalProperty": "example" }, "message": "example" }}