Platform API reference

Platform API · Session

get/v1/sessionAuth

List active sessions

Response · 200 Active sessions

Array of object

id*string

Session identifier

Example: "sess_01HZY2G3A7M8Q9W4E6R2K1"

account_id*string

Owning account identifier

Example: "acc_01HZY2F2B6N7M8Q9W4E6R2"

ip*string

Client IP address

Example: "203.0.113.42"

user_agent*string

HTTP User-Agent string

Example: "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"

created_at*string · date-time

Creation timestamp (ISO 8601)

Example: "2025-09-20T12:34:56.000Z"

expires_at*string · date-time

Expiration timestamp (ISO 8601)

Example: "2025-09-21T12:34:56.000Z"

last_used_at*string · date-time

Last time this session was used (ISO 8601) or null

Example: "2025-09-20T18:00:00.000Z"

current*boolean

True for the session this request was made with (the caller's own browser or client). At most one session in the list is current.

Example: true

Example

Request

GET https://api.platform-auth.productcraft.co/v1/session
Authorization: Bearer YOUR_TOKEN

Response

[
  {
    "id": "sess_01HZY2G3A7M8Q9W4E6R2K1",
    "account_id": "acc_01HZY2F2B6N7M8Q9W4E6R2",
    "ip": "203.0.113.42",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36",
    "created_at": "2025-09-20T12:34:56.000Z",
    "expires_at": "2025-09-21T12:34:56.000Z",
    "last_used_at": "2025-09-20T18:00:00.000Z",
    "current": true
  }
]