Skip to main content

Current User API

Verify the validity of your API key and retrieve basic account information.

Authentication​

Authorization: Apikey YOUR_API_KEY

Get Current User​

Validates your API key and returns the associated email and subscription plan.

Endpoint​

GET /api/uploadposts/me

Headers​

NameRequiredDescription
AuthorizationYesApikey YOUR_API_KEY

Example Request (curl)​

curl -X GET https://api.upload-post.com/api/uploadposts/me \
-H "Authorization: Apikey YOUR_API_KEY"

Success Response (200 OK)​

{
"success": true,
"message": "Token is valid",
"email": "[email protected]",
"plan": "Professional",
"analyze_shorts": {
"limit": 300,
"used": 12,
"remaining": 288,
"resets_at": "2026-12-10T08:15:00Z"
},
"preferences": {
"weekStartDay": 1
}
}

Response Fields:

FieldTypeDescription
successBooleanAlways true for successful requests
messageStringConfirmation message
emailStringThe email address associated with the authenticated account
planStringCurrent subscription plan (e.g., Basic, Professional, Business, Default)
analyze_shortsObjectAI Shorts analyses of the current 30-day window: limit (included in the plan), used, remaining (never below 0) and resets_at (UTC; null when no window is running: the next analysis starts a new 30-day window with the full limit). Reading it never uses an analysis. null only if the account data cannot be read.
preferencesObjectUser preferences. See Preferences below.

Error Responses​

401 Unauthorized - Invalid or missing authentication

{
"success": false,
"message": "Invalid or expired token"
}

500 Internal Server Error - Server-side error

{
"success": false,
"message": "Error description"
}

Preferences​

Manage user-level preferences via the preferences endpoint.

Get Preferences​

GET /api/uploadposts/users/preferences

Response (200 OK):

{
"success": true,
"preferences": {
"weekStartDay": 1
}
}

Update Preferences​

POST /api/uploadposts/users/preferences

Body (JSON):

FieldTypeDescription
weekStartDayIntegerCalendar week start day. 0 = Sunday, 1 = Monday.

Example:

curl -X POST https://api.upload-post.com/api/uploadposts/users/preferences \
-H 'Authorization: Apikey YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"weekStartDay": 1}'

Response (200 OK):

{
"success": true,
"preferences": {
"weekStartDay": 1
}
}

Error (400 Bad Request):

{
"success": false,
"message": "weekStartDay must be 0 (Sunday) or 1 (Monday)"
}

Use Cases​

  • Token Validation: Verify that your API key or JWT is still valid before making other API calls
  • Plan Check: Determine the current subscription plan to understand available features and limits
  • Account Verification: Confirm which account is associated with your credentials