Documentation

Configuration

Hiras is deliberately small. Most of what it does needs no configuration at all — you tap Start and it works. This page covers the handful of things you can change, and, just as importantly, the things you can’t.

Fixed by design

Two things are not configurable in this version, and that’s intentional:

  • Port. The gateway always serves on 8080. There is no setting to change it.
  • Rate limits. The send path is fixed at 60 SMS segments per minute plus a minimum of 1 second between requests, and every endpoint sits behind a per-caller burst guard. These are not tunable. See Security for the exact numbers.

Keeping these fixed means every Hiras install behaves identically — your client code doesn’t have to discover a port or negotiate a limit.

What you can change

Everything below lives in the app, on the phone hosting the gateway.

Default SIM

On a phone with two or more SIMs, you can pick which SIM sends by default. Individual requests can still override it per-message with the optional simSlot field (see the REST API). On a single-SIM phone there is nothing to choose.

Test modes

Two switches let you exercise the API without spending a text:

  • Dry Run — validate and respond realistically without touching the SIM. See Dry Run.
  • Failure Simulation — force the API to return a specific failure so your error handling can be tested. See Failure Simulation.

Both are host-wide switches and persist across restarts.

Webhooks

If you want inbound texts forwarded to your own backend, set a webhook URL and turn webhooks on. On a multi-SIM phone you can also filter which SIM’s inbound messages get forwarded. There is no separate secret to configure — messages are signed with your API key. See Webhooks.

The API key

You can regenerate the API key at any time. Regenerating immediately invalidates the old key. See Authentication.

Reliability

For a gateway meant to stay up:

  • Start automatically after reboot — an opt-in toggle (off by default) so the gateway comes back after the phone restarts.
  • Allow Hiras to ignore battery optimisation so Android doesn’t suspend it while the screen is off.

Even with both on, a full process kill (or an aggressive OEM battery manager) will stop the gateway — Hiras is honest about that rather than promising uptime it can’t guarantee.

History

You can clear the on-device send history at any time. History is capped at the newest 1,000 messages and never leaves the phone.

Backup and restore

Settings can be exported to and restored from a JSON file. The API key is left out by default — you have to opt in behind a warning to include it — so a backup you share doesn’t leak your key.

Next

  • REST API — the endpoints these settings affect.
  • Security — the guards and limits in full.