Skip to content
merran
GitHubInstall

Merran documentation API & integrations

This session

GET
/api/auth/get-session
curl --request GET \
--url http://localhost:3000/api/auth/get-session \
--cookie merran.session_token=<merran.session_token>

Who’s signed in, and their session, or null when no one is. GET /api/auth/me says more: their households and which one is in use.

Success

Media typeapplication/json
object
session
required
object
id
required
string
expiresAt
required
string format: date-time
token
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
ipAddress
string
userAgent
string
userId
required
string
impersonatedBy
string
activeOrganizationId
string
user
required
object
id
required
string
name
required
string
email
required
string
emailVerified
required
boolean
image
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
username
string
displayUsername
string
role
string
banned
boolean
banReason
string
banExpires
string format: date-time

Example

{
"session": {
"id": "0199e8b0-5a10-7a01-8b00-000000000010",
"expiresAt": "2026-10-22T18:30:00.000Z",
"token": "sample-session-token",
"createdAt": "2026-10-15T18:30:00.000Z",
"updatedAt": "2026-10-15T18:30:00.000Z",
"ipAddress": "192.168.1.20",
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 26_0 like Mac OS X)",
"userId": "0199e8b0-5a10-7a01-8b00-000000000001",
"activeOrganizationId": "0199e8b0-5a10-7a01-8b00-000000000003"
},
"user": {
"id": "0199e8b0-5a10-7a01-8b00-000000000001",
"name": "Sam Rivera",
"email": "sam@example.com",
"emailVerified": false,
"image": null,
"createdAt": "2026-10-01T17:30:00.000Z",
"updatedAt": "2026-10-01T17:30:00.000Z",
"username": "sam",
"displayUsername": "sam",
"role": "admin",
"banned": false
}
}

Bad Request. Usually due to missing parameters, or invalid parameters.

Media typeapplication/json
object
message
required
string

Example generated

{
"message": "example"
}

Unauthorized. Due to missing or invalid authentication.

Media typeapplication/json
object
message
required
string

Example generated

{
"message": "example"
}

Forbidden. You do not have permission to access this resource or to perform this action.

Media typeapplication/json
object
message
string

Example generated

{
"message": "example"
}

Not Found. The requested resource was not found.

Media typeapplication/json
object
message
string

Example generated

{
"message": "example"
}

Too Many Requests. You have exceeded the rate limit. Try again later.

Media typeapplication/json
object
message
string

Example generated

{
"message": "example"
}

Internal Server Error. This is a problem with the server that you cannot fix.

Media typeapplication/json
object
message
string

Example generated

{
"message": "example"
}

© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.