Returns information about the currently authenticated user.
This endpoint does not accept any parameters.
GET /api/v1/auth/me
Authorization: Bearer {token}
Returns the user resource and a list of permissions.
{
"data": { /* user resource */ },
"permissions": ["permission 1", "permission 2"]
}
For a full schema, see User Resource.
The payload carries is_trainer and is_gym_owner, the user's own statement about which parts of the platform
apply to them. They shape what the client shows and authorize nothing; set them through
PUT /auth/me.
The caller is always the subject here, so the payload includes the self-only fields — among them
referrals_count (how many users they directly referred) and referral_score (the weighted score over the whole
referral tree). The two are sourced differently and can briefly disagree; see
Referral Score.
The self-only fields also carry deletion_requested_at and deletion_scheduled_at. Both are null on a normal
account; both are set while a self-service deletion is pending, and deletion_scheduled_at is the date the account
will be disposed of. This is the endpoint a client polls to render a "your account is scheduled for deletion"
banner, with DELETE /api/v1/auth/delete-account behind its undo button. See
POST /api/v1/auth/delete-account.
| Status | Description | Reference |
|---|---|---|
| 401 | Unauthorized | Authentication error |