Client API Documentation

Automate configurations already in your Panel account

Connect your backend or automation to configurations you have already saved. Keep their messages, servers, tweaks, cloud device IDs, and cloud passwords up to date.

GET https://httptweak.com/api/v1/configs
GET https://httptweak.com/api/v1/configs/{config_key}/resources
GET / PUT https://httptweak.com/api/v1/configs/{config_key}/message
POST https://httptweak.com/api/v1/configs/{config_key}/servers
POST https://httptweak.com/api/v1/configs/{config_key}/tweaks
POST https://httptweak.com/api/v1/configs/{config_key}/device-ids
POST https://httptweak.com/api/v1/configs/{config_key}/passwords
Authentication
Client API key for your account
Base URL
https://httptweak.com/api/v1
Rate Limit
60,1 (attempts, minutes)
Default Daily Quota
1,000 requests per UTC day
API guide

Choose the right API

Use Client API for configurations in your Panel account. Use Business API to generate new configurations from request data.

Client API

You are here

Work with existing Panel configurations.

List configurations in your account and keep their servers, tweaks, cloud device IDs, and cloud passwords in sync.

Example: Create "Premium Config" in Panel, then keep its resources updated from your backend.

Continue with Client API

Business API

Generate a new configuration from request data.

Send configuration, server, and tweak values and receive an import-ready encrypted configuration. The result is not saved in Panel.

Example: A customer chooses options in your app, then your backend generates the configuration.

Read Business API documentation

Quick rule: Existing Panel configuration: Client API. New configuration from request data: Business API.

The credentials are separate: manage the Client API credential in Panel > API > Client API and the Business API credential in Panel > API > Business API.

Authentication

Authenticate every request with the Client API key issued for the Panel account that owns the target configuration.

TransportExampleNotes
X-API-KeyX-API-Key: YOUR_CLIENT_API_KEYRecommended explicit header.
AuthorizationAuthorization: Bearer YOUR_CLIENT_API_KEYStandard Bearer authentication alternative.
Send credentials in headers only. If both X-API-Key and Authorization are present, X-API-Key takes precedence.
Get your Client API key: Open Panel > API > Client API, then generate a key for your account. The full key is shown only once; Panel keeps only its secure hash and a short preview.
Keep the key private. Use it from a trusted backend or automation environment; do not ship it in a public app, browser bundle, repository, or log.

Rate Limits and Daily Quota

Each Client API credential has a short-term rate limit and a daily request quota. The daily quota resets at 00:00 UTC.

Header Value Meaning
X-RateLimit-LimitRequestsMaximum requests allowed in the current rate-limit window.
X-RateLimit-RemainingRequestsRequests remaining in the current rate-limit window.
X-DailyQuota-LimitRequestsMaximum Client API requests allowed for the current UTC day.
X-DailyQuota-UsedRequestsRequests counted against today's quota.
X-DailyQuota-RemainingRequestsRequests remaining until the next UTC reset.
X-DailyQuota-ResetUnix timestampNext daily reset at 00:00 UTC.
Retry-AfterSecondsTime to wait after a rate-limit or daily-quota response.
Every authenticated request that passes the rate limiter counts once, including read-only GET requests and requests that later return a validation or resource error. Requests rejected for a missing or invalid credential, API maintenance, or rate limiting do not use the daily quota.
Credential rotation does not reset daily usage. When the daily quota is exhausted, the API returns 429 with error: daily_quota_exceeded and quota details in the response body.

Available Operations

Use these endpoints to automate resources inside configurations owned by the authenticated Panel account.

Start in Panel. Client API does not create configurations. Create one in your account first, then select it by config_unique_key to manage its resources.
Action Method Endpoint Request Shape
List account configurations GET /api/v1/configs No body
Sync existing configuration resources POST /api/v1/configs { "config_unique_key": "...", "servers": [...], "tweaks": [...] }
List configuration resources GET /api/v1/configs/{config_key}/resources No body
Get current configuration message GET /api/v1/configs/{config_key}/message No body
Replace configuration message PUT /api/v1/configs/{config_key}/message { "message": "..." }; use null to clear it
List servers GET /api/v1/configs/{config_key}/servers No body
Create server POST /api/v1/configs/{config_key}/servers { server fields... } or { "server": {...} }
Update server PUT /api/v1/configs/{config_key}/servers/{server_key} { server fields... } or { "server": {...} }
Delete server DELETE /api/v1/configs/{config_key}/servers/{server_key} No body
List tweaks GET /api/v1/configs/{config_key}/tweaks No body
Create tweak POST /api/v1/configs/{config_key}/tweaks { tweak fields... } or { "tweak": {...} }
Update tweak PUT /api/v1/configs/{config_key}/tweaks/{tweak_key} { tweak fields... } or { "tweak": {...} }
Delete tweak DELETE /api/v1/configs/{config_key}/tweaks/{tweak_key} No body
List cloud device IDs GET /api/v1/configs/{config_key}/device-ids No body
Create cloud device IDs POST /api/v1/configs/{config_key}/device-ids { "device_id": "32-hex-id or multi-line ids", "note": "...", "is_active": true, "delete_after_used": false, "expire_date": "YYYY-MM-DD" }
Update cloud device ID PUT /api/v1/configs/{config_key}/device-ids/{device_id} { "device_id": "32-hex-id", "note": "...", "is_active": true, "delete_after_used": false, "expire_date": "YYYY-MM-DD" }
Delete cloud device ID DELETE /api/v1/configs/{config_key}/device-ids/{device_id} No body
List cloud passwords GET /api/v1/configs/{config_key}/passwords No body
Create cloud passwords POST /api/v1/configs/{config_key}/passwords { "password": "...", "type": "reusable|one_time", "delete_after_used": false, "generate_multiple": false, "count": 1, "expire_date": "YYYY-MM-DD" }
Update cloud password PUT /api/v1/configs/{config_key}/passwords/{password_id} { "password": "...", "type": "reusable|one_time", "delete_after_used": false, "is_active": true, "expire_date": "YYYY-MM-DD" }
Delete cloud password DELETE /api/v1/configs/{config_key}/passwords/{password_id} No body

Existing Configurations

How it works

  • GET /api/v1/configs lists configurations owned by the account authenticated with your Client API key.
  • POST /api/v1/configs syncs servers and tweaks for one existing configuration selected by config_unique_key; it does not create a new configuration.
  • Create the configuration in Panel before connecting your automation.
  • The Client API can read and replace the configuration message. Manage other configuration-level settings such as password, update_url, and lock toggles in Panel.

Request Schema

Field Rule Notes
POST /api/v1/configs config_unique_key: required|string|max:64 Identifies an existing configuration in the authenticated account. Supports optional servers and tweaks arrays.

Configuration Message

Use GET /api/v1/configs/{config_key}/message to read the complete current message and PUT /api/v1/configs/{config_key}/message to replace it.

Updating only part of a message: the API replaces the complete message; it does not search and replace text on the server. Fetch the current config_message, change the required text in your automation, then send the complete edited value in the PUT request. This is useful for changing a date without losing the rest of the message.
FieldRuleNotes
message Required key; nullable string Send the complete replacement message. HTML is accepted. The administrator-configured maximum message length applies. Send null to clear the message.

Tweak

Endpoints: GET /api/v1/configs/{config_key}/tweaks, POST /api/v1/configs/{config_key}/tweaks, PUT /api/v1/configs/{config_key}/tweaks/{tweak_key}, DELETE /api/v1/configs/{config_key}/tweaks/{tweak_key}.

Required fields: name, tunnel_type.

Field Rule Accepted Values / Notes
unique_key string|max:255 Upsert key inside the configuration.
name required|string|max:255 Non-empty string.
category Optional string|max:255 Categorize this tweak so only servers in the same category appear when this tweak is selected in the app. Example: WS, CF, Free, Paid.
tunnel_type required|string ovpn_tcp_ssh, ovpn_tcp, ovpn_udp, ssh, dnstt, hysteria, v2ray_default, v2ray_vless, v2ray_vmess, v2ray_hysteria2, v2ray_socks, v2ray_http, v2ray_ss, v2ray_trojan, v2ray_wireguard
dnstt_resolver required only if tunnel_type=dnstt Non-empty text.
dnstt_payload Optional only if tunnel_type=dnstt Optional text.
payload Optional for ovpn_tcp_ssh, ovpn_tcp, ovpn_udp, ssh Optional text.
bug_host Optional for v2ray_default and other v2ray_* values Host value used to replace the [bughost] placeholder in server config.
sni Optional for ovpn_tcp_ssh, ovpn_tcp, ovpn_udp, ssh Optional text.
tls_version Optional for ovpn_tcp_ssh, ovpn_tcp, ovpn_udp, ssh default, TLSv1.1, TLSv1.2, TLSv1.3
proxy Optional for ovpn_tcp_ssh, ovpn_tcp, ovpn_udp, ssh Optional text. Format: proxy:port@user:pass
note Optional string|max:255 Optional label for panel users.

Server

Endpoints: GET /api/v1/configs/{config_key}/servers, POST /api/v1/configs/{config_key}/servers, PUT /api/v1/configs/{config_key}/servers/{server_key}, DELETE /api/v1/configs/{config_key}/servers/{server_key}.

Required fields: name, tunnel_type.

Field Rule Accepted Values / Notes
unique_key string|max:36 Upsert key inside the configuration.
name required|string|max:255 Non-empty string.
category Optional string|max:255 Categorize this server so it only appears when a tweak with the same category is selected in the app. Example: WS, CF, Free, Paid.
tunnel_type required|string|in:... ovpn_tcp_ssh, ovpn_tcp, ovpn_udp, ssh, dnstt, hysteria, v2ray_default, v2ray_vless, v2ray_vmess, v2ray_hysteria2, v2ray_socks, v2ray_http, v2ray_ss, v2ray_trojan, v2ray_wireguard
ip_port_user_pass required for ovpn_tcp_ssh, ovpn_tcp, ovpn_udp, ssh, dnstt, hysteria Format depends on tunnel type:
ovpn: user:pass (or IP/port depending on app logic)
ssh: host:port or user:pass@host:port
dnstt: host:port
hysteria: host1;host2:port@auth_str:obfs
ssl_port Optional for ovpn_tcp, ovpn_udp, ssh Integer number.
ovpn_config required for ovpn_tcp_ssh, ovpn_tcp, ovpn_udp Non-empty string.
ovpn_pk Optional for ovpn_tcp_ssh, ovpn_tcp, ovpn_udp Private key text.
ssh_pk Optional for ssh string|regex:/-----BEGIN .* KEY-----/s
If provided, must match PEM key format.
dnstt_pubkey required for dnstt string|max:255.
hysteria_bandwidth Optional string|max:10 for hysteria Upload:Download. Example: 100:100.
v2ray_config required for v2ray_default and other v2ray_* values Non-empty V2Ray config string.
note Optional string|max:255 Optional label.

Cloud Access

Automate the Access-tab resources of an existing configuration: cloud Device IDs and cloud Passwords.

Preconditions: Device ID endpoints require is_cloud_hwid_lock=true. Password endpoints require is_cloud_password=true. Enable these in Configuration Info.

Device IDs

Endpoints: GET /api/v1/configs/{config_key}/device-ids, POST /api/v1/configs/{config_key}/device-ids, PUT /api/v1/configs/{config_key}/device-ids/{device_id}, DELETE /api/v1/configs/{config_key}/device-ids/{device_id}.

{device_id} in URL is the numeric Device ID record id from list/create responses.

Field Rule Notes
device_id required on create; must be 32 hexadecimal chars (A-F0-9) Create accepts one ID or multiple IDs separated by newlines, commas, or semicolons. Input is normalized to uppercase, and duplicate IDs are ignored within one request.
note Optional string|max:255 Optional label for panel users.
is_active boolean Defaults to true when omitted on create.
delete_after_used boolean If true, ID is removed after successful auth use.
expire_date Optional date_format:Y-m-d Expires the Device ID at the end of that date. Omit or send null for no expiry.

Passwords

Endpoints: GET /api/v1/configs/{config_key}/passwords, POST /api/v1/configs/{config_key}/passwords, PUT /api/v1/configs/{config_key}/passwords/{password_id}, DELETE /api/v1/configs/{config_key}/passwords/{password_id}.

{password_id} in URL is the numeric Password record id from list/create responses.

Field Rule Notes
password required|string|min:6|max:255 (unless generate_multiple=true) Required only when generate_multiple=false. When generate_multiple=true, API generates random values and ignores the provided password field.
type required|in:reusable,one_time One-time passwords are marked used after successful auth.
delete_after_used boolean Allowed only when type=one_time.
generate_multiple boolean When true, password is auto-generated.
count integer|min:1|max:100 Used only with generate_multiple=true.
expire_date Optional date_format:Y-m-d Expires the password at the end of that date. Omit or send null for no expiry.
is_active, note boolean, string|max:255 Optional metadata fields. is_active defaults to true on create.
Limits: A generated-password request can create up to 100 passwords. Per configuration, accounts support up to 500 Cloud Passwords and 1,000 Cloud Device IDs unless an administrator sets a lower account limit.

Rules

  • A Client API key can access only configurations owned by its Panel account.
  • Do not send empty values for required fields.
  • Do not send id or configuration_id in server/tweak payloads.
  • Use exact enum values only. Invalid values return 422.
  • Optional fields can be omitted or set to null.
  • Configuration message updates replace the complete value. Fetch the current message first when changing only a date or another substring.
  • Delete operations require existing unique_key values in the target configuration.
  • Cloud password rule: delete_after_used=true is valid only for type=one_time.
  • Cloud HWID rule: each device_id must be exactly 32 hexadecimal characters.
  • Cloud access expiry: expire_date uses YYYY-MM-DD. Expired Device IDs/passwords are rejected during auth.
  • Cloud access limits are enforced for device IDs and passwords per configuration.
  • Account limits are enforced for configurations, servers, tweaks, device IDs, and passwords.

Examples

These examples automate configurations that already exist in your account. UUID-like keys are shortened with ... for readability; send the full value in real requests.

List Configurations in Your Account

curl -X GET "https://httptweak.com/api/v1/configs" \
  -H "X-API-Key: your_api_key"

List a Configuration's Servers and Tweaks

curl -X GET "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/resources" \
  -H "X-API-Key: your_api_key"

Get the Current Configuration Message

curl -X GET "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/message" \
  -H "X-API-Key: your_api_key"

Replace the Configuration Message

For a partial change such as a date, first read config_message with the GET request above, replace the date in your code, and send the complete edited message below.

curl -X PUT "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/message" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "message": "Service available until 2026-08-31"
  }'

Add a Server

curl -X POST "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/servers" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "name": "Main SSH Server",
    "category": "Free",
    "tunnel_type": "ssh",
    "ip_port_user_pass": "1.2.3.4:22@user:pass"
  }'

Update Server

curl -X PUT "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/servers/8bcb3c4f...7b6c4a12" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "name": "Main SSH Server v2",
    "tunnel_type": "ssh",
    "ip_port_user_pass": "1.2.3.4:22@user:newpass"
  }'

Add a Tweak

curl -X POST "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/tweaks" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "name": "Default Tweak",
    "category": "Free",
    "tunnel_type": "ovpn_tcp_ssh",
    "payload": "CONNECT [host_port] HTTP/1.1",
    "sni": "example.com"
  }'

Add Cloud Device IDs

curl -X POST "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/device-ids" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "device_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
    "note": "Batch import",
    "is_active": true,
    "delete_after_used": false,
    "expire_date": "2031-02-03"
  }'

Add One-time Cloud Password

curl -X POST "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/passwords" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "password": "Secret123",
    "type": "one_time",
    "delete_after_used": true,
    "is_active": true,
    "expire_date": "2032-04-05"
  }'

Remove a Server

curl -X DELETE "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/servers/8bcb3c4f...7b6c4a12" \
  -H "X-API-Key: your_api_key"

Remove a Tweak

curl -X DELETE "https://httptweak.com/api/v1/configs/2f7c1f7e...dc5a2d8b/tweaks/6e1d2f8c...d5ce0d62" \
  -H "X-API-Key: your_api_key"

Responses

List Configurations Response

{
  "success": true,
  "message": "Configurations listed",
  "total": 2,
  "max_configurations": 20,
  "remaining_configurations": 18,
  "configurations": [
    {
      "id": 12,
      "name": "Config 12",
      "unique_key": "2f7c1f7e...dc5a2d8b",
      "servers_count": 2,
      "tweaks_count": 1,
      "is_cloud_hwid_lock": false,
      "is_cloud_password": false,
      "created_at": "2026-02-20 09:00:00",
      "updated_at": "2026-02-20 09:10:00"
    }
  ]
}

Configuration Resources Response

{
  "success": true,
  "message": "Configuration resources listed",
  "configuration_id": 12,
  "configuration_name": "Config 12",
  "config_unique_key": "2f7c1f7e...dc5a2d8b",
  "servers": [
    {
      "id": 2,
      "name": "Main SSH Server v2",
      "category": "Free",
      "tunnel_type": "ssh",
      "unique_key": "8bcb3c4f...7b6c4a12",
      "created_at": "2026-02-20 09:00:00",
      "updated_at": "2026-02-20 09:10:00"
    }
  ],
  "tweaks": [
    {
      "id": 4,
      "name": "Default Tweak",
      "category": "Free",
      "tunnel_type": "ovpn_tcp_ssh",
      "bug_host": null,
      "unique_key": "6e1d2f8c...d5ce0d62",
      "created_at": "2026-02-20 09:00:00",
      "updated_at": "2026-02-20 09:05:00"
    }
  ]
}

Configuration Message Response

{
  "success": true,
  "message": "Configuration message retrieved",
  "configuration_id": 12,
  "configuration_name": "Config 12",
  "config_unique_key": "2f7c1f7e...dc5a2d8b",
  "config_message": "Service available until 2026-07-31"
}

Server and Tweak Mutation Response

{
  "success": true,
  "message": "Configuration resources synced",
  "configuration_id": 12,
  "configuration_name": "Config 12",
  "config_unique_key": "2f7c1f7e...dc5a2d8b",
  "summary": {
    "servers_created": 0,
    "servers_updated": 1,
    "servers_deleted": 1,
    "tweaks_created": 0,
    "tweaks_updated": 0,
    "tweaks_deleted": 1
  },
  "servers": [
    {
      "action": "updated",
      "id": 2,
      "unique_key": "8bcb3c4f...7b6c4a12",
      "name": "Main SSH Server v2",
      "category": "Free",
      "tunnel_type": "ssh"
    },
    {
      "action": "deleted",
      "id": 3,
      "unique_key": "9f2a6d90...7a7b91d1",
      "name": "Backup SSH Server",
      "category": null,
      "tunnel_type": "ovpn_udp"
    }
  ],
  "tweaks": [
    {
      "action": "deleted",
      "id": 4,
      "unique_key": "6e1d2f8c...d5ce0d62",
      "name": "Default Tweak",
      "category": "Free",
      "tunnel_type": "ovpn_tcp_ssh",
      "bug_host": null
    }
  ]
}

Cloud Device ID List Response

{
  "success": true,
  "message": "Device IDs listed",
  "configuration_id": 12,
  "config_unique_key": "2f7c1f7e...dc5a2d8b",
  "device_ids": [
    {
      "id": 31,
      "device_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
      "note": "Batch import",
      "is_active": true,
      "delete_after_used": false,
      "expire_date": "2031-02-03",
      "created_at": "2026-02-24 18:30:00",
      "updated_at": "2026-02-24 18:30:00"
    }
  ]
}

Cloud Device ID Create Response

{
  "success": true,
  "message": "2 Device IDs added.",
  "configuration_id": 12,
  "config_unique_key": "2f7c1f7e...dc5a2d8b",
  "added_count": 2,
  "device_ids": [
    {
      "id": 31,
      "device_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
      "note": "Batch import",
      "is_active": true,
      "delete_after_used": false,
      "expire_date": "2031-02-03",
      "created_at": "2026-02-24 18:30:00",
      "updated_at": "2026-02-24 18:30:00"
    },
    {
      "id": 32,
      "device_id": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
      "note": "Batch import",
      "is_active": true,
      "delete_after_used": false,
      "expire_date": "2031-02-03",
      "created_at": "2026-02-24 18:30:00",
      "updated_at": "2026-02-24 18:30:00"
    }
  ]
}

Cloud Password Create Response

{
  "success": true,
  "message": "Password added.",
  "configuration_id": 12,
  "config_unique_key": "2f7c1f7e...dc5a2d8b",
  "added_count": 1,
  "passwords": [
    {
      "id": 45,
      "password": "Secret123",
      "type": "one_time",
      "note": null,
      "is_active": true,
      "delete_after_used": true,
      "expire_date": "2032-04-05",
      "used_device_id": null,
      "used_at": null,
      "created_at": "2026-02-24 18:32:00",
      "updated_at": "2026-02-24 18:32:00"
    }
  ]
}

Error Codes

Status Meaning
401Missing or invalid API key.
403API key not allowed for target configuration.
404Configuration not found.
422Validation failed or limits reached.
429Rate limit or daily quota exceeded.
503Client API quota enforcement is temporarily unavailable.