> ## 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.

# OkeyProxy Agent API Introduction

> API reference for managing sec-user accounts and rotating proxy plans via OkeyProxy Agent API

<Note>
  This section provides an overview of the OkeyProxy Agent API, designed for managing sec-user accounts, assigning rotating proxy plans, and generating authenticated proxy endpoints.
</Note>

## Overview

The **OkeyProxy Agent API** allows agents to programmatically manage their sec-user accounts, assign traffic-based rotating proxy plans, and generate authenticated proxy endpoints for their users.

It supports operations such as:

* Creating, editing, enabling/disabling sec-user accounts
* Assigning or querying proxy plans and usage
* Generating proxy endpoints by location, session type, and protocol
* Viewing historical and real-time usage logs

## Authentication

All API requests require an `apiKey` which is unique to each agent account. This API key must be provided either:

* In the request body for `POST` endpoints, or
* As a query parameter for `GET` endpoints

There is no `Bearer` or `OAuth` scheme. Example usage:

```json
{
  "apiKey": "your-agent-api-key"
}
```

### How to Obtain Your Agent API Key

To access and use the OkeyProxy Agent API, you need a valid `apiKey`. Follow the steps below to obtain one:

1. Register an account on [OkeyProxy](https://www.okeyproxy.com)
2. Contact  [@OkeyProxy\_support](https://t.me/OkeyProxy_support) to apply for Agent access
3. Once your application is approved, your account will be upgraded with Agent-level permissions and access to the Agent Dashboard
4. Log in to the Dashboard and navigate to the **Agent API** section to generate your Agent API Key

## Proxy Type Reference

Each rotating proxy plan is categorized into three types:

| Proxy Type | Plan Name | Description                                           |
| ---------- | --------- | ----------------------------------------------------- |
| 1          | Starter   | Rotating datacenter proxies                           |
| 2          | Advanced  | Rotating residential proxies                          |
| 3          | Premium   | Rotating residential proxies with best-performing IPs |

These values are used in request fields such as `proxyType` when assigning plans or generating proxy endpoints.

## Example Use Cases

* 💼 **Onboard new sub-users**\
  Use [`/api/v2/secUser/add`](https://docs.okeyproxy.com/api-reference/endpoint/Create) to create a new sec-user account and receive proxy credentials.

* 📦 **Assign proxy traffic**\
  Use [`/api/v2/secUser/addPlan`](https://docs.okeyproxy.com/api-reference/endpoint/addPlan) or [`/api/v2/secUser/addPlan/details`](https://docs.okeyproxy.com/api-reference/endpoint/details) to allocate GB-based traffic to a sec-user.

* 🌍 **Custom proxy routing**\
  Use [`/api/v2/proxy/endpoints/custom`](https://docs.okeyproxy.com/api-reference/endpoint/custom) to generate geo-targeted, sticky or rotating proxy endpoints with specified session times and protocols.

* 📊 **Monitor usage and history**\
  Use [`/api/v2/logs`](https://docs.okeyproxy.com/api-reference/endpoint/logs) to track API activity and [`/api/v2/plan/list`](https://docs.okeyproxy.com/api-reference/endpoint/planlist) to monitor active plans and traffic consumption.
