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

# Get current user info

> Returns info about the user associated with the access token, including
their billing account and current subscription plan.

**Required scope:** none — any authenticated bearer token (JWT or PAT) can call this endpoint regardless of scope.




## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/me
openapi: 3.0.1
info:
  title: FormHug API V1
  version: v1
  description: |
    FormHug public REST API. All request/response keys are snake_case.

    Successful response:

    ```json
    {
      "data": { ... }
    }
    ```

    Paginated response:

    ```json
    {
      "data": [ ... ],
      "pagination": {
        "total": 123,
        "next_cursor": "NQ=="
      }
    }
    ```

    Error response:

    ```json
    {
      "error": "Human-readable message",
      "error_details": [
        { "attribute": "field_name", "message": "specific error" }
      ]
    }
    ```

    `error_details` only appears for model validation failures.
servers:
  - url: https://formhug.ai
security: []
tags:
  - name: Forms
    description: Form CRUD
  - name: Attachments
    description: >-
      2-step upload for form-element images (theme, rich-text, or field-element
      images). Prepare returns an `upload_id`; consume it in a theme update,
      attachment_commitments, or the form `fields` payload depending on purpose.
  - name: Entries
    description: Entries collected by a form owned by the current user
  - name: Folders
    description: Folder CRUD
  - name: Participated Forms
    description: Forms the current user has submitted to (does not own)
  - name: Published Form Entries
    description: Submit entries to a published form
  - name: Published Forms
    description: Read a published form's public structure for filling
  - name: Entry Attachments
    description: >-
      2-step upload for `attachment` field submissions. Prepare returns an
      `upload_id`; submit it under the attachment field in `field_values` when
      creating the entry.
  - name: Me
    description: Current authenticated user
  - name: Webhooks
    description: Webhook integrations attached to a form
  - name: Form Themes
    description: Read and update a form's visual theme
  - name: Form Settings
    description: >-
      Per-form settings — submission flow, availability, access control,
      presentation
  - name: Field Rules
    description: >-
      Read and replace a form's conditional field-display and post-submission
      redirect rules.
  - name: OAuth
    description: OAuth 2.0 PKCE token issuance and revocation
paths:
  /api/v1/me:
    get:
      tags:
        - Me
      summary: Get current user info
      description: >
        Returns info about the user associated with the access token, including

        their billing account and current subscription plan.


        **Required scope:** none — any authenticated bearer token (JWT or PAT)
        can call this endpoint regardless of scope.
      responses:
        '200':
          description: Current user returned
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - email
                      - display_name
                      - avatar_url
                      - created_at
                      - created_forms_count
                      - entries_count_of_created_forms
                      - billing_account
                    properties:
                      email:
                        type: string
                        description: Email address
                        example: user@example.com
                      display_name:
                        type: string
                        description: Display name
                        example: Jane Doe
                      avatar_url:
                        type: string
                        nullable: true
                        description: Avatar image URL
                        example: https://cdn.example.com/avatars/u.png
                      created_at:
                        type: string
                        nullable: true
                        format: date-time
                        description: Account creation timestamp
                        example: '2024-01-15T08:30:00Z'
                      created_forms_count:
                        type: integer
                        description: Number of forms created by this user
                        example: 42
                      entries_count_of_created_forms:
                        type: integer
                        description: Total entries across this user's created forms
                        example: 1280
                      billing_account:
                        type: object
                        nullable: true
                        required:
                          - name
                          - current_plan
                        description: The billing account (org/tenant) the user belongs to
                        properties:
                          name:
                            type: string
                            nullable: true
                            example: Acme Inc.
                          current_plan:
                            type: object
                            required:
                              - code
                              - name
                              - subscription_period_end
                              - subscription_cancel_at
                            description: Current subscription plan of the billing account
                            properties:
                              code:
                                type: string
                                enum:
                                  - free
                                  - pro
                                  - busi
                                description: Plan code
                                example: free
                              name:
                                type: string
                                description: Localized plan name
                                example: Free
                              subscription_period_end:
                                type: string
                                nullable: true
                                format: date-time
                                description: >-
                                  ISO 8601 timestamp of the next billing date;
                                  null when there is no active subscription
                                example: '2026-12-31T23:59:59Z'
                              subscription_cancel_at:
                                type: string
                                nullable: true
                                format: date-time
                                description: >-
                                  ISO 8601 timestamp when the subscription was
                                  scheduled to cancel; null when not canceled
                                example: null
        '401':
          description: Missing or expired credentials
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    error: Authentication failed
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - PersonalAccessToken: []
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: PAT
      description: >
        Personal Access Token prefixed with `fh_`. Sent as `Authorization:
        Bearer fh_xxx`.

        The scope required by each endpoint is listed in that endpoint's
        description.

````