Skip to content
HTTP Tweak Client API / Documentation

Start here API v1

Your first request

Add a server and matching tweak, then import the configuration into the app.

Client API · Manage saved panel configurations

On this page

This guide adds one direct SSH server and its matching tweak to a configuration you already own. You need a panel account, a Client API key, and a configuration created in the panel.

1. Get your key

Open Client API in the panel, generate a key, and save it when it is displayed. The full key is shown once. Keep it in your backend's secret storage.

In a local terminal, set the URL and key for this session. Replace the example key before running the next command.

export API_BASE='https://httptweak.com/api/v1'
export CLIENT_API_KEY='YOUR_CLIENT_API_KEY'

2. Find your configuration

curl --fail-with-body "$API_BASE/configs" \
  --header 'Accept: application/json' \
  --header "X-API-Key: $CLIENT_API_KEY"

A successful response has success: true and a configurations array at the top level. Copy the unique_key of the configuration you want to edit.

{
  "success": true,
  "message": "Configurations listed",
  "total": 1,
  "max_configurations": 10,
  "remaining_configurations": 9,
  "configurations": [
    {
      "id": 12,
      "name": "My configuration",
      "unique_key": "0123456789abcdef0123456789abcdef",
      "servers_count": 0,
      "tweaks_count": 0,
      "is_cloud_hwid_lock": false,
      "is_cloud_password": false,
      "created_at": "2026-10-01 10:00:00",
      "updated_at": "2026-10-01 10:00:00"
    }
  ]
}

Counts, limits, IDs, and dates above are illustrative. An empty array means you need to create a configuration in the panel first.

export CONFIG_KEY='PASTE_YOUR_CONFIGURATION_UNIQUE_KEY'

3. Add a server

Save this JSON as server.json. Replace the host, username, and password with your SSH server's details. Keep accepted_methods: [[]] for this direct connection.

{
    "name": "My SSH server",
    "tunnel": {
        "family": "ssh",
        "variant": "default"
    },
    "carrier": {
        "type": "default",
        "settings": {}
    },
    "accepted_methods": [
        []
    ],
    "settings": {
        "endpoint": {
            "hosts": [
                "ssh.example.com"
            ],
            "ports": [
                22
            ]
        },
        "credentials": {
            "username": "demo",
            "password": "replace-me"
        }
    }
}

Send the file:

curl --fail-with-body --request POST "$API_BASE/configs/$CONFIG_KEY/servers" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-API-Key: $CLIENT_API_KEY" \
  --data-binary @server.json

Expect HTTP 201 Created, success: true, and a server object. Save the new server.unique_key if you will edit or remove the server later. You can also see the new server in the panel.

Running this creation request again adds another server. To change an existing server, use its returned key with update a server.

4. Add the direct tweak

The apps need a selected tweak even for a direct connection. Save this as tweak.json:

{
    "name": "Direct SSH",
    "tunnels": {
        "ssh": {
            "variants": [
                "default"
            ]
        }
    },
    "carrier": {
        "type": "default",
        "settings": {}
    },
    "methods": {}
}
curl --fail-with-body --request POST "$API_BASE/configs/$CONFIG_KEY/tweaks" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-API-Key: $CLIENT_API_KEY" \
  --data-binary @tweak.json

Expect HTTP 201 Created and a tweak object. Keep tweak.unique_key for later edits. The empty methods object means direct: no payload, proxy, or extra TLS layer. Both example resources omit category so they match.

5. Try it in the app

Export the configuration from the panel, then import that export into the app. Select the configuration, the Direct SSH tweak, and your SSH server, then connect. The API saves connection details for an existing SSH service; it does not install SSH or create a login on the remote host.

The selected tweak filters the server list. If your configuration already contains other tweaks, select the direct tweak you just added. See matching rules.

For future changes, follow getting panel changes into the app.

Where to go next

HTTP Tweak developer documentation Current API contract