> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refile.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Account Information

> Returns information about the authenticated user, including subscription details and available credits.



## OpenAPI

````yaml api-reference/openapi.json get /user/info
openapi: 3.1.0
info:
  title: refile API
  description: API for converting Markdown to PDF with various styling options
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://www.refile.co/api/v1
security:
  - bearerAuth: []
paths:
  /user/info:
    get:
      summary: Get User Account Information
      description: >-
        Returns information about the authenticated user, including subscription
        details and available credits.
      operationId: getUserInfo
      responses:
        '200':
          description: User information retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInfo'
              example:
                userId: user_123456789
                subscription:
                  planName: Pro
                  currentCredits: 850
                  lastReset: '2023-04-15T00:00:00Z'
                  monthlyCredits: 5000
                  hasWatermark: false
                  hasDataRetention: false
                  dataRetentionDays: 0
        '401':
          description: Unauthorized or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Missing or invalid Authorization header
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Failed to retrieve user information
components:
  schemas:
    UserInfo:
      type: object
      properties:
        userId:
          type: string
          description: Unique identifier for the user
        subscription:
          type: object
          nullable: true
          properties:
            planName:
              type: string
              description: Name of the user's subscription plan
            currentCredits:
              type: integer
              description: Number of credits currently available to the user
            lastReset:
              type: string
              format: date-time
              description: Date and time when credits were last reset
            monthlyCredits:
              type: integer
              description: Total number of credits allocated monthly
            hasWatermark:
              type: boolean
              description: Whether generated PDFs include a watermark
            hasDataRetention:
              type: boolean
              description: Whether data retention is enabled for this plan
            dataRetentionDays:
              type: integer
              description: Number of days generated PDFs are retained
          description: Subscription details for the user, or null if no active subscription
      required:
        - userId
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
        details:
          type: object
          description: Additional details about the error (if available)
        message:
          type: string
          description: Error name or type (if available)
        hint:
          type: string
          description: Suggested solution to fix the error (if available)
        size:
          type: string
          description: File size information (for size-related errors)
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````