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

# List Subscribers

> List all subscribers with pagination and filtering

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer olive_live_xxx` or `Bearer eyJ...` (JWT)
</ParamField>

### Query Parameters

<ParamField query="status" type="string">
  Filter by status: `ACTIVE`, `BLOCKED`, `PENDING`
</ParamField>

<ParamField query="kyc_level" type="integer">
  Filter by KYC level: `1`, `2`, or `3`
</ParamField>

<ParamField query="search" type="string">
  Search by name or phone number
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Results per page (max 100)
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Pagination offset
</ParamField>

***

## Response

<ResponseField name="subscribers" type="array">
  Array of subscriber objects
</ResponseField>

<ResponseField name="total_count" type="integer">
  Total number of matching subscribers
</ResponseField>

<ResponseField name="limit" type="integer">
  Current page size
</ResponseField>

<ResponseField name="offset" type="integer">
  Current offset
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL - Basic theme={null}
  curl -X GET "https://demo.api.vultlocal.com/api/v1/subscribers" \
    -H "Authorization: Bearer olive_live_xxx"
  ```

  ```bash cURL - With Filters theme={null}
  curl -X GET "https://demo.api.vultlocal.com/api/v1/subscribers?status=ACTIVE&kyc_level=2&limit=20" \
    -H "Authorization: Bearer olive_live_xxx"
  ```

  ```bash cURL - Search theme={null}
  curl -X GET "https://demo.api.vultlocal.com/api/v1/subscribers?search=John" \
    -H "Authorization: Bearer olive_live_xxx"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "subscribers": [
      {
        "id": "sub_abc123",
        "phone_number": "+23279123456",
        "first_name": "John",
        "last_name": "Doe",
        "kyc_level": 2,
        "status": "ACTIVE",
        "balance": "125,000.00 SLE",
        "created_at": "2025-01-15T10:30:00Z"
      },
      {
        "id": "sub_def456",
        "phone_number": "+23279654321",
        "first_name": "Jane",
        "last_name": "Smith",
        "kyc_level": 1,
        "status": "ACTIVE",
        "balance": "50,000.00 SLE",
        "created_at": "2025-01-14T09:15:00Z"
      }
    ],
    "total_count": 1250,
    "limit": 50,
    "offset": 0
  }
  ```
</ResponseExample>

***

## Pagination

<Info>
  Use `limit` and `offset` for pagination. Check `total_count` to determine total pages.
</Info>

```bash theme={null}
# Page 1
GET /api/v1/subscribers?limit=20&offset=0

# Page 2
GET /api/v1/subscribers?limit=20&offset=20

# Page 3
GET /api/v1/subscribers?limit=20&offset=40
```

***

## Permissions

<Warning>
  This endpoint requires admin-level permissions. Agents can only see their own subscribers.
</Warning>

***

## Errors

| Status | Code             | Description                |
| ------ | ---------------- | -------------------------- |
| 401    | `UNAUTHORIZED`   | Invalid or missing API key |
| 403    | `FORBIDDEN`      | Insufficient permissions   |
| 500    | `INTERNAL_ERROR` | Server error               |


## OpenAPI

````yaml olive-openapi.json GET /subscribers
openapi: 3.0.0
info:
  description: >-
    API Gateway for OLIVE NFC Card Payment System - Comprehensive payment, card
    management, agent operations, and admin authentication. All /api/v1 routes
    require authentication using either API Key or JWT token.
  title: OLIVE NFC Card Payment API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    email: support@olive.sl
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://olive-gateway-a6ba.onrender.com/api/v1
security: []
paths:
  /subscribers:
    get:
      tags:
        - Subscribers
      summary: List all subscribers
      description: >-
        Get a paginated list of all subscribers with their details including
        balance
      parameters:
        - description: Page number (default 1)
          name: page
          in: query
          schema:
            type: integer
        - description: Page size (default 50)
          name: page_size
          in: query
          schema:
            type: integer
        - description: Filter by status (active, blocked, pending)
          name: status
          in: query
          schema:
            type: string
        - description: Filter by KYC level (1, 2, 3)
          name: kyc_level
          in: query
          schema:
            type: integer
        - description: Filter by district
          name: district
          in: query
          schema:
            type: string
      responses:
        '200':
          description: List of subscribers
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      description: >-
        API Key for third-party integrations (WhatsApp, Smart PAY, VULT).
        Format: 'Bearer olive_live_xxxxxxxxxxxxx'
      type: apiKey
      name: Authorization
      in: header
    BearerAuth:
      description: >-
        JWT token from admin login for administrative operations. Format:
        'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
      type: apiKey
      name: Authorization
      in: header

````