User API

Retrieve information about the currently authenticated user, including profile details, subscription status, and usage quotas.

Get Current User

Fetch the authenticated user's profile, current subscription plan, and scan usage for the current billing cycle.

GEThttps://repocat.cloud/api/v1/user/me

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key

Response Format

A successful response returns the user profile, subscription, and usage data.

Success Response (200)

{
  "success": true,
  "user": {
    "id": number,
    "email": "user@example.com",
    "name": "string | null",
    "emailVerified": boolean,
    "subscription": {
      "tier": "free" | "plus" | "premium",
      "status": "active" | "past_due" | "inactive",
      "level": "basic" | "standard" | "deep",
      "usage": {
        "basic": { "daily": number, "monthly": number },
        "standard": { "daily": number, "monthly": number },
        "deep": { "daily": number, "monthly": number }
      }
    },
    "hasApiKey": boolean,
    "createdAt": "string"
  }
}

Error Response (401)

{
  "success": false,
  "error": "Invalid or missing API key"
}

Subscription Status

The subscription object contains information about the current billing plan:

FieldTypeDescription
tierstringCurrent plan tier: "free", "plus", or "premium"
statusstringSubscription status: "active", "past_due", or "inactive"
levelstringAllowed scan level: "basic", "standard", or "deep"

Usage & Quotas

The usage object shows scan consumption for each level in the current billing cycle:

FieldTypeDescription
dailynumberRemaining daily scans for this level (-1 if unlimited)
monthlynumberRemaining monthly scans for this level (-1 if unlimited)

Usage data is available for Basic, Standard, and Deep scan levels. Free tier users will see zero limits for Standard and Deep.

cURL Example

curl -X GET "https://repocat.cloud/api/v1/user/me" \
  -H "X-API-Key: your-api-key-here"