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

Message placeholders

The Client API stores and returns the saved message template unchanged. Placeholders are resolved only when the configuration is exported, downloaded, or fetched by the app.

  • [config_name] — Configuration name.
  • [created_at] — Creation date and time in YYYY-MM-DD HH:mm:ss format.
  • [created_date] — Creation date in YYYY-MM-DD format.
  • [updated_at] — Last-updated date and time in YYYY-MM-DD HH:mm:ss format.
  • [updated_date] — Last-updated date in YYYY-MM-DD format.
  • [server_count] — Number of servers included in the generated configuration.
  • [tweak_count] — Number of tweaks included in the generated configuration.
  • [server_list] — Server names in alphabetical order, separated by commas.
  • [tweak_list] — Tweak names in alphabetical order, separated by commas.

Placeholders are case-sensitive. Unknown placeholders remain unchanged. Empty server or tweak lists resolve to an empty string.

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.

Fields follow the Configuration form: names and categories are limited to 100 characters, and fields hidden for the selected tunnel are rejected with HTTP 422. Changing tunnel_type clears fields belonging to the previous tunnel.
IPv6 value formats: Keep host-only values unbracketed, for example 2001:db8::10. When a port follows, wrap each IPv6 address in brackets. Proxy examples: [2001:db8::10]:8080, multiple proxies [2001:db8::10];[2001:db8::11]:8080@username:password, and UDP DNSTT resolver [2001:db8::53]:53.
Field Rule Accepted Values / Notes
unique_key string|max:36 Upsert key inside the configuration.
name required|string|max:100 Non-empty string.
category Optional string|max:100 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, and 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, and ssh Optional text.
hysteria_sni Optional string|max:253 for hysteria Optional UDP Hysteria Server Name Indication value. [host], [ip], [ssh_host], [rlb], [bughost], [cf], their uppercase forms, and the existing extended host aliases resolve to the selected Hysteria endpoint host; [proxy] is not supported. Protected by unlock_payload in the app.
tls_version Optional for ovpn_tcp_ssh, ovpn_tcp, and ssh default, TLSv1.1, TLSv1.2, TLSv1.3
proxy Optional for ovpn_tcp_ssh, ovpn_tcp, and ssh Optional text. Format: proxy:port@username:password
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.

Fields follow the Configuration form: names and categories are limited to 100 characters, unsupported/system fields are rejected, and fields hidden for the selected tunnel return HTTP 422. Changing tunnel_type clears fields belonging to the previous tunnel.
IPv6 value formats: Bracket IPv6 whenever a port follows it. Examples: SSH [2001:db8::10]:22@username:password, multiple SSH hosts [2001:db8::10];[2001:db8::11]:22@username:password, and Hysteria [2001:db8::10]:443@my-auth:my-obfs. IPv6 addresses without a port remain unbracketed.
Field Rule Accepted Values / Notes
unique_key string|max:36 Upsert key inside the configuration.
name required|string|max:100 Non-empty string.
category Optional string|max:100 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, ovpn_udp, ssh, dnstt, hysteria, v2ray_default, v2ray_vless, v2ray_vmess, v2ray_hysteria2, v2ray_socks, v2ray_http, v2ray_ss, v2ray_trojan, v2ray_wireguard
host_port_user_pass required for ovpn_tcp, ovpn_udp, ssh, dnstt, and hysteria Format depends on tunnel type:
• OVPN: username:password
• SSH: host1;host2:port@username:password
• DNSTT: ns1;ns2@username:password
• Hysteria: host1;host2:port@auth[:obfs]; use host:443@my-auth for auth only or append :my-obfs for Auth + OBFS
ssl_port Optional for ovpn_tcp and ssh Integer from 1 through 65535.
ovpn_config required for ovpn_tcp and ovpn_udp OpenVPN configuration text, minimum 5 characters.
ovpn_pk Optional for ovpn_tcp and 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 digits:digits|max:21 for hysteria Upload:Download. Example: 100:100.
hysteria_alpn Optional string|max:255 for hysteria Blank by default. Example: h3.
hysteria_hop_interval Optional digit string, maximum 10 characters, for hysteria Form default is "10"; it may be null or blank and the app then falls back to 10.
hysteria_allow_insecure Optional boolean for hysteria Defaults to true. An explicit false is preserved in generated configuration data.
v2ray_config required for v2ray_default and other v2ray_* values Valid JSON, a protocol URI, or INI configuration text.
note Optional string|max:255 Optional label.

Create examples by tunnel type

Expand a tunnel to copy a valid server or tweak request. Replace config_key and the sample connection values before sending it.

ovpn_tcp_ssh OpenVPN TCP & SSH Tweak only

Server not supported

ovpn_tcp_ssh is a tweak-only tunnel. Use ovpn_tcp or ssh for its server.

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "OpenVPN TCP & SSH WebSocket",
    "tunnel_type": "ovpn_tcp_ssh",
    "payload": "GET / HTTP/1.1[crlf]Host: edge.example.com[crlf][crlf]",
    "sni": "edge.example.com",
    "proxy": "proxy.example.com:8080",
    "tls_version": "TLSv1.3"
}
ovpn_tcp OpenVPN TCP Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "OpenVPN TCP Server",
    "tunnel_type": "ovpn_tcp",
    "host_port_user_pass": "demo:secret",
    "ssl_port": 443,
    "ovpn_config": "client\nproto tcp\nremote vpn.example.com 443"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "OpenVPN TCP SNI",
    "tunnel_type": "ovpn_tcp",
    "sni": "edge.example.com",
    "tls_version": "TLSv1.3"
}
ovpn_udp OpenVPN UDP Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "OpenVPN UDP Server",
    "tunnel_type": "ovpn_udp",
    "host_port_user_pass": "demo:secret",
    "ovpn_config": "client\nproto udp\nremote vpn.example.com 1194"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "OpenVPN UDP Default",
    "tunnel_type": "ovpn_udp",
    "note": "UDP mode has no advanced tweak fields."
}
ssh SSH Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "SSH Server",
    "tunnel_type": "ssh",
    "host_port_user_pass": "ssh.example.com:22@demo:secret",
    "ssl_port": 443
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "SSH WebSocket",
    "tunnel_type": "ssh",
    "payload": "GET / HTTP/1.1[crlf]Host: edge.example.com[crlf][crlf]",
    "sni": "edge.example.com",
    "proxy": "proxy.example.com:8080",
    "tls_version": "TLSv1.3"
}
dnstt SlowDNS (DNSTT) Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "DNSTT Server",
    "tunnel_type": "dnstt",
    "host_port_user_pass": "ns.example.com@demo:secret",
    "dnstt_pubkey": "DNSTT_SERVER_PUBLIC_KEY"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "DNSTT UDP Resolver",
    "tunnel_type": "dnstt",
    "dnstt_resolver": "1.1.1.1:53",
    "dnstt_payload": "dns.example.com"
}
hysteria UDP Hysteria Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "Hysteria Server",
    "tunnel_type": "hysteria",
    "host_port_user_pass": "hy.example.com:443@auth-token:obfs-password",
    "hysteria_bandwidth": "20:50",
    "hysteria_alpn": "h3",
    "hysteria_allow_insecure": false,
    "hysteria_hop_interval": "10"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "Hysteria SNI",
    "tunnel_type": "hysteria",
    "hysteria_sni": "hy.example.com"
}
v2ray_default V2Ray Default Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray Default Server",
    "tunnel_type": "v2ray_default",
    "v2ray_config": "{\"outbounds\":[{\"protocol\":\"freedom\"}]}"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray Default Bug Host",
    "tunnel_type": "v2ray_default",
    "bug_host": "edge.example.com"
}
v2ray_vless V2Ray VLESS Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray VLESS Server",
    "tunnel_type": "v2ray_vless",
    "v2ray_config": "vless://[email protected]:443?security=tls"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray VLESS Bug Host",
    "tunnel_type": "v2ray_vless",
    "bug_host": "edge.example.com"
}
v2ray_vmess V2Ray VMess Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray VMess Server",
    "tunnel_type": "v2ray_vmess",
    "v2ray_config": "vmess://BASE64_ENCODED_VMESS_PROFILE"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray VMess Bug Host",
    "tunnel_type": "v2ray_vmess",
    "bug_host": "edge.example.com"
}
v2ray_hysteria2 V2Ray Hysteria2 Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray Hysteria2 Server",
    "tunnel_type": "v2ray_hysteria2",
    "v2ray_config": "hysteria2://[email protected]:443"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray Hysteria2 Bug Host",
    "tunnel_type": "v2ray_hysteria2",
    "bug_host": "edge.example.com"
}
v2ray_socks V2Ray SOCKS Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray SOCKS Server",
    "tunnel_type": "v2ray_socks",
    "v2ray_config": "socks://demo:[email protected]:1080"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray SOCKS Bug Host",
    "tunnel_type": "v2ray_socks",
    "bug_host": "edge.example.com"
}
v2ray_http V2Ray HTTP Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray HTTP Server",
    "tunnel_type": "v2ray_http",
    "v2ray_config": "http://demo:[email protected]:8080"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray HTTP Bug Host",
    "tunnel_type": "v2ray_http",
    "bug_host": "edge.example.com"
}
v2ray_ss V2Ray Shadowsocks Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray Shadowsocks Server",
    "tunnel_type": "v2ray_ss",
    "v2ray_config": "ss://[email protected]:8388"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray Shadowsocks Bug Host",
    "tunnel_type": "v2ray_ss",
    "bug_host": "edge.example.com"
}
v2ray_trojan V2Ray Trojan Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray Trojan Server",
    "tunnel_type": "v2ray_trojan",
    "v2ray_config": "trojan://[email protected]:443?security=tls"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray Trojan Bug Host",
    "tunnel_type": "v2ray_trojan",
    "bug_host": "edge.example.com"
}
v2ray_wireguard V2Ray WireGuard Server + tweak

Create server

POSThttps://httptweak.com/api/v1/configs/{config_key}/servers
{
    "name": "V2Ray WireGuard Server",
    "tunnel_type": "v2ray_wireguard",
    "v2ray_config": "[Interface]\nPrivateKey = CLIENT_PRIVATE_KEY\nAddress = 10.0.0.2/32\n\n[Peer]\nPublicKey = SERVER_PUBLIC_KEY\nEndpoint = wg.example.com:51820"
}

Create tweak

POSThttps://httptweak.com/api/v1/configs/{config_key}/tweaks
{
    "name": "V2Ray WireGuard Bug Host",
    "tunnel_type": "v2ray_wireguard",
    "bug_host": "edge.example.com"
}

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 options under 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; prohibited when generating multiple Required only when generate_multiple=false. Omit it when generate_multiple=true; the API generates random values.
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 required_if:generate_multiple,true|integer|min:1|max:100; otherwise prohibited Required 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 and passwords are rejected during authentication.
  • 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

Send the complete message template. You can use placeholders for values that should be filled from the configuration during export.

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": "Welcome to [config_name]. Updated: [updated_at]. Servers: [server_list]"
  }'

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",
    "host_port_user_pass": "1.2.3.4:22@username:password"
  }'

Add an IPv6 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": "IPv6 SSH Server",
    "category": "Free",
    "tunnel_type": "ssh",
    "host_port_user_pass": "[2001:db8::10];[2001:db8::11]:22@username:password"
  }'

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",
    "host_port_user_pass": "1.2.3.4:22@username:newpassword"
  }'

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": "Welcome to [config_name]. Updated: [updated_at]. Servers: [server_list]"
}

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.