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

# Retrieve agent plan list

> Retrieve all plans under the specified agent, filtered by expiration time window (startTime to endTime, UTC+8).



## OpenAPI

````yaml GET /api/v2/plan/list
openapi: 3.0.1
info:
  title: okey
  description: ''
  version: 1.0.0
servers:
  - url: https://api.okeyproxy.com/ipglobal-api
security: []
tags: []
paths:
  /api/v2/plan/list:
    get:
      tags: []
      summary: Retrieve agent plan list
      description: >-
        Retrieve all plans under the specified agent, filtered by expiration
        time window (startTime to endTime, UTC+8).
      parameters:
        - name: apiKey
          in: query
          description: Agent API key used for authentication
          required: true
          schema:
            type: string
        - name: startTime
          in: query
          description: Start time, in yyyy-MM-dd HH:mm:ss format (UTC+8)
          required: true
          schema:
            type: string
        - name: endTime
          in: query
          description: End time, in yyyy-MM-dd HH:mm:ss format (UTC+8)
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: 'Current page number (default: 1)'
          required: false
          schema:
            type: integer
            default: 1
        - name: pageSize
          in: query
          description: 'Number of records per page (default: 20, maximum: 100)'
          required: false
          schema:
            type: integer
            default: 20
            maximum: 100
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        planId:
                          type: string
                          description: Plan ID
                        proxyType:
                          type: integer
                          description: Rotating proxies type
                        traffic:
                          type: number
                          title: ''
                          description: Plan traffic (in GB)
                        availableTraffic:
                          type: number
                          description: Remaining traffic (in GB)
                        effectTime:
                          type: string
                          title: ''
                          description: 'Effective time. Format: yyyy-MM-dd HH:mm:ss (UTC+8)'
                        expireTime:
                          type: string
                          title: ''
                          description: 'Expiration time. Format: yyyy-MM-dd HH:mm:ss (UTC+8)'
                        secUsername:
                          type: string
                          description: Sec-user account
                        status:
                          type: integer
                          title: ''
                          description: >-
                            Plan status. 1 for enabled, 2 for disabled, 3 for
                            exhausted, 4 for expired
                      required:
                        - planId
                        - proxyType
                        - traffic
                        - availableTraffic
                        - effectTime
                        - expireTime
                        - secUsername
                        - status
                    title: Plan details
                  pagination:
                    type: object
                    properties:
                      currentPage:
                        type: integer
                        description: Current page number
                      pageSize:
                        type: integer
                        description: Number of records per page
                      totalRecords:
                        type: integer
                        description: Total records
                      totalPages:
                        type: integer
                        title: ''
                        description: >-
                          Total pages. Rounded up result of
                          totalRecords/pageSize
                    title: Pagination metadata
                    required:
                      - currentPage
                      - pageSize
                      - totalRecords
                      - totalPages
                required:
                  - details
                  - pagination
              example:
                details:
                  - planId: '20250101114300769'
                    proxyType: 2
                    traffic: 1
                    availableTraffic: 1
                    effectTime: '2025-01-01 11:43:00'
                    expireTime: '2025-01-01 11:43:00'
                    secUsername: ancd1p32b
                    status: 1
                pagination:
                  currentPage: 1
                  pageSize: 10
                  totalRecords: 4
                  totalPages: 1
          headers: {}
      deprecated: false
      security: []

````