Retrieve User Information

This page provides detailed documentation for the GET /api/user endpoint.

This page provides detailed documentation for the GET /api/user endpoint, which allows users to retrieve their account information, including personal details, billing information, subscription plan, and activity history. It includes examples of requests and responses, as well as a comprehensive breakdown of the returned data fields.

Endpoint

GET /api/user

Retrieve the authenticated user's details.

Request

HTTP Request

GET https://uptimekeep.com/api/user

Headers

Header
Type
Description

Authorization

String

Bearer token for API authentication.

Example of a request:

curl --request GET \
--url 'https://uptimekeep.com/api/user' \
--header 'Authorization: Bearer {api_key}'

Response

A successful response returns the user details in JSON format.

Response Example

Fields

Field
Type
Description

id

String

Unique identifier for the user.

type

String

Type of the resource (always "users").

email

String

User's email address.

billing

Object

Billing information of the user (see below).

is_enabled

Boolean

Indicates if the user's account is enabled.

plan_id

String

Identifier for the user's current subscription plan.

plan_expiration_date

String

Expiration date of the current subscription plan (in YYYY-MM-DD HH:MM:SS format).

plan_settings

Object

Settings related to the current plan (details omitted for brevity).

plan_trial_done

Boolean

Indicates if the trial period has ended.

language

String

Preferred language of the user.

timezone

String

User's timezone.

country

String

Country of the user.

date

String

Date when the account was created (in YYYY-MM-DD HH:MM:SS format).

last_activity

String

Date and time of the last activity (in YYYY-MM-DD HH:MM:SS format).

total_logins

Integer

Total number of logins by the user.

Billing Object

Field
Type
Description

type

String

Type of billing (personal/business).

name

String

Name on the billing account.

address

String

Billing address.

city

String

City of the billing address.

county

String

County of the billing address.

zip

String

ZIP code of the billing address.

country

String

Country of the billing address.

phone

String

Phone number for billing contact.

tax_id

String

Tax identification number.

Errors

If the request fails, the API will return an error message with an appropriate HTTP status code.

Last updated