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

# Get API Usage and Limits

> Check current API usage and rate limits for the authenticated user.



## OpenAPI

````yaml api-reference/openapi.json get /usage
openapi: 3.0.3
info:
  title: Senderr Email Template API
  description: >-
    API for accessing and managing email templates in your library. Supports
    both session-based authentication and API key authentication with rate
    limiting based on subscription plans.
  version: 1.0.0
  contact:
    name: Senderr Support
    url: https://senderr.dev/contact
    email: support@senderr.dev
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://senderr.dev/terms
servers:
  - url: https://senderr.dev/api/v1
    description: Production server
  - url: http://localhost:3000/api/v1
    description: Development server
security:
  - BearerAuth: []
  - SessionAuth: []
tags:
  - name: Library
    description: Operations related to user's template library
  - name: Templates
    description: Operations for template rendering and source code access
  - name: Email
    description: Operations for sending emails using templates
  - name: Usage
    description: Operations for checking API usage and limits
paths:
  /usage:
    get:
      tags:
        - Usage
      summary: Get API Usage and Limits
      description: Check current API usage and rate limits for the authenticated user.
      operationId: getUsage
      responses:
        '200':
          description: Successfully retrieved usage information
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  usage:
                    type: object
                    properties:
                      limit:
                        type: integer
                        description: Monthly rate limit
                      remaining:
                        type: integer
                        description: Remaining requests this month
                      reset:
                        type: string
                        format: date-time
                        description: When the limit resets
                      plan:
                        type: string
                        enum:
                          - free
                          - monthly
                          - annual
                        description: Current subscription plan
              example:
                success: true
                usage:
                  limit: 500
                  remaining: 450
                  reset: '2024-02-01T00:00:00Z'
                  plan: free
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
        - SessionAuth: []
components:
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Authentication required
            success: false
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
            code: INTERNAL_ERROR
            success: false
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
        success:
          type: boolean
          example: false
        details:
          type: object
          description: Additional error details
      required:
        - error
        - success
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use your API key from the dashboard. Format: `Bearer your-api-key-here`'
    SessionAuth:
      type: apiKey
      in: cookie
      name: supabase-auth-token
      description: Session-based authentication using browser cookies

````