# Device/Session Management

This section contains the API documentation for managing user devices and sessions in the Flashback platform.

## Overview

The Device and Session Management APIs allow users to:

* View and manage their registered devices
* Monitor active sessions across devices
* Control device trust levels
* Revoke sessions for security purposes

## Device/Session Management API Calls

### Device Management API Calls

<table><thead><tr><th width="230">Method</th><th>API Reference</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:green;"><code>GET</code></mark><code>/devices</code></td><td><a href="/pages/pTZoWFQ078og9HkVagDa"><strong>get__devices</strong></a></td><td>Retrieve all user devices</td></tr><tr><td><mark style="color:green;"><code>GET</code></mark><code>/devices/{id}</code></td><td><a href="/pages/k2VgdcS93gyhyTalyTyk"><strong>get__devices-id</strong></a></td><td>Get detailed information about a specific device</td></tr><tr><td><mark style="color:orange;"><code>POST</code></mark><code>/devices/trust</code></td><td><a href="/pages/mHqaOv7dz5L7ZVgrzAgu"><strong>post__devices_trust</strong></a></td><td>Mark a device as trusted</td></tr><tr><td><mark style="color:orange;"><code>POST</code></mark><code>/devices/{id}/untrust</code></td><td><a href="/pages/PqoEyraKQfSZZnOe3JZP"><strong>post__devices_-id_untrust</strong></a></td><td>Remove trust from a device</td></tr><tr><td><mark style="color:red;"><code>DELETE</code></mark><code>/devices/{id}</code></td><td><a href="/pages/csByxBU8Tb5VYHH8myKg"><strong>delete__devices_-{id}</strong></a></td><td>Permanently remove a device</td></tr></tbody></table>

### Session Management API Calls

<table><thead><tr><th width="230">Method</th><th>API Reference</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:green;"><code>GET</code></mark><code>/sessions</code></td><td><a href="/pages/Bd9yF2fitKrJKXHCOSuR"><strong>get__sessions</strong></a></td><td>Retrieve all active user sessions</td></tr><tr><td><mark style="color:orange;"><code>POST</code></mark><code>/sessions/{id}/revoke</code></td><td><a href="/pages/mxeyAX65eJbBuHSBpSzG"><strong>post__sessions_-id_revoke</strong></a></td><td>Revoke a specific session</td></tr><tr><td><mark style="color:orange;"><code>POST</code></mark><code>/sessions/revoke-all</code></td><td><a href="/pages/B70N8bACJ5dLhPMLo9k0"><strong>post__sessions_revoke-all</strong></a></td><td>Revoke all user sessions</td></tr><tr><td><mark style="color:orange;"><code>POST</code></mark><code>/devices/{id}/heartbeat</code></td><td><a href="/pages/3YPRQCf2SIesPv5ZTzfr"><strong>post__sessions_-id_heartbeat</strong></a></td><td>Update session activity and extend expiry</td></tr></tbody></table>

## Authentication

All endpoints require authentication using a Bearer token in the Authorization header.

## Common Response Format

All API responses follow a consistent format:

```json
{
  "success": boolean,
  "data": object | array,
  "message": string,
  "error": string
}
```

## Error Handling

The APIs return appropriate HTTP status codes:

* `200` - Success
* `404` - Resource not found
* `500` - Internal server error

## Rate Limiting

These APIs are subject to rate limiting to prevent abuse. Please implement appropriate retry logic with exponential backoff in your applications.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flashback.tech/support-reference/platform-api-reference/device-session-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
