Skip to main content

GET /api/user

Retrieves the profile information for the currently authenticated user.
This endpoint requires authentication. Include the Bearer token in the Authorization header.

Request

No request body is required for this endpoint.

Response

id
integer
Unique identifier for the user.
name
string
Full name of the user.
email
string
Email address of the user.
created_at
string
ISO 8601 timestamp of when the account was created.
updated_at
string
ISO 8601 timestamp of when the account was last updated.

Example request

curl -X GET https://api.filebright.com/api/user \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Accept: application/json"

Example response

{
  "id": 1,
  "name": "John Doe",
  "email": "[email protected]",
  "created_at": "2024-03-01T12:00:00.000000Z",
  "updated_at": "2024-03-01T12:00:00.000000Z"
}

Error responses

Returned when the authentication token is missing, invalid, or expired.
{
  "message": "Unauthenticated."
}

Build docs developers (and LLMs) love