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

# Get active plan

> Get active plan for current account (uses account-id header)



## OpenAPI

````yaml /api-reference/openapi/Evo-Auth-Service/accounts.yaml get /api/v1/active_plan
openapi: 3.0.1
info:
  title: Evolution Foundation - Auth Service - Accounts
  description: Authentication and user and account management
  version: v1.0.0
servers:
  - url: https://api.evoai.app
    description: Production server
  - url: http://localhost:3001
    description: Development server
    variables:
      port:
        default: '3001'
  - url: '{customUrl}'
    description: Custom server
    variables:
      customUrl:
        default: https://your-instance.com
        description: Enter your server URL
security: []
paths:
  /api/v1/active_plan:
    get:
      summary: Get active plan
      description: Get active plan for current account (uses account-id header)
      operationId: getActivePlan
      parameters:
        - name: account-id
          in: header
          description: Account ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Active plan retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/ActivePlan'
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                        example: '2024-01-01T00:00:00Z'
                  message:
                    type: string
                    example: Active plan retrieved successfully
              example:
                success: true
                data:
                  id: 770e8400-e29b-41d4-a716-446655440002
                  plan_id: 880e8400-e29b-41d4-a716-446655440003
                  plan_name: Professional
                  plan_description: Professional plan with advanced features
                  is_active: true
                  is_custom: false
                  starts_at: '2024-01-01T00:00:00Z'
                  ends_at: null
                  used_plan: false
                  features:
                    conversations: 10000
                    storage_gb: 100
                  created_at: '2024-01-01T00:00:00Z'
                  updated_at: '2024-01-01T00:00:00Z'
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                message: Active plan retrieved successfully
        '400':
          description: Bad Request (invalid data)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                bad_request:
                  summary: Invalid request parameters
                  value:
                    success: false
                    error:
                      code: VALIDATION_ERROR
                      message: Invalid request parameters
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/active_plan
                      method: GET
        '401':
          description: Unauthorized (invalid or missing token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Unauthorized access
                  value:
                    success: false
                    error:
                      code: INVALID_TOKEN
                      message: Invalid token
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/active_plan
                      method: GET
        '403':
          description: Forbidden (insufficient permissions)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                forbidden:
                  summary: Access forbidden
                  value:
                    success: false
                    error:
                      code: FORBIDDEN
                      message: You do not have permission to access this resource
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/active_plan
                      method: GET
        '404':
          description: Not Found (resource not found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  summary: Account not found
                  value:
                    success: false
                    error:
                      code: NOT_FOUND
                      message: Account not found
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/active_plan
                      method: GET
        '500':
          description: Internal Server Error (server error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: Internal server error
                  value:
                    success: false
                    error:
                      code: INTERNAL_ERROR
                      message: An unexpected error occurred
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/active_plan
                      method: GET
      security:
        - ApiAccessTokenAuth: []
components:
  schemas:
    ActivePlan:
      type: object
      properties:
        id:
          type: string
          format: uuid
        plan_id:
          type: string
          format: uuid
        plan_name:
          type: string
        plan_description:
          type: string
          nullable: true
        is_active:
          type: boolean
        is_custom:
          type: boolean
        starts_at:
          type: string
          format: date-time
          nullable: true
        ends_at:
          type: string
          format: date-time
          nullable: true
        used_plan:
          type: boolean
        features:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Validation failed
            details:
              type: object
              additionalProperties: true
              nullable: true
        meta:
          type: object
          required:
            - timestamp
            - path
            - method
          properties:
            timestamp:
              type: string
              format: date-time
              example: '2024-01-15T10:30:00Z'
            path:
              type: string
              example: /api/v1/super_admin/accounts/123
            method:
              type: string
              example: POST
  securitySchemes:
    ApiAccessTokenAuth:
      type: apiKey
      in: header
      name: api_access_token
      description: API access token authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.