Menu

Tunnels

HTTPS tunnels to an app on your own computer, at your own hostname.

OperationMethod and path
Create a tunnel for a hostnamePOST /tunnels
The caller's tunnelsGET /tunnels
One of the caller's tunnelsGET /tunnels/{id}
Replace a tunnel's settingsPATCH /tunnels/{id}
Delete a tunnelDELETE /tunnels/{id}
Re-check a tunnel's DNS nowPOST /tunnels/{id}/verify-dns

Create a tunnel for a hostname#

POST /tunnels · operation createTunnel

hostname (a fully qualified name; punycode for an internationalized one), the SSH key as ssh_public_key (one OpenSSH public key line) or ssh_key_id (one of the caller's saved keys, /vps/ssh-keys), exactly one; settings (offline_url: an https URL served while the client is offline; offline_ipns: the IPNS name it came from, kept for display; both passed through as given), region (a placement hint), transport (ssh-v1, the default), manage_dns (default true). Ownership: a hostname under a domain another account registered here is refused 404; when one of the caller's own zones holds the hostname, the record pointing at the tunnel is written in it at once (a CNAME to dns_cname_target below the zone's apex, an A to dns_target at the apex; dns in the answer says what was written; not charged), and a name that already has an A, AAAA or CNAME record there is refused 409 before anything is created; under a domain grant carrying tunnel (another account's registered domain holds the hostname) the tunnel is created for the domain's owner with the caller's key, its record in the owner's zone, its hours billed to the grant's payer (a split payer is refused 400: ask the owner to choose owner or grantee), answered delegated with owner_user_id; any other hostname must be pointed by its owner (A to dns_target, or CNAME to dns_cname_target): the tunnel stays pending-dns until its DNS resolves, which proves control. The answer carries the ready-to-paste ssh_command. Tunnels may be billed by the hour (billing in the answer; 402 insufficient-funds when the credits do not cover the first hour). Cost (credit charges in GET /credits/charges): the per_hour credit charge of recurring.tunnel-hourly is billed every hour while what it creates exists.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiontunnels:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedyes — see the charges below
Retry safetya repeat is refused or changes nothing: a hostname has at most one live tunnel: a repeat is refused 409 hostname-taken

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
recurring.tunnel-hourlyper_hourevery hour while it exists—see the credit charges

Request body (CreateTunnel):

  • hostname, string, required — a fully qualified name; punycode for an internationalized one
  • ssh_public_key, string — one OpenSSH public key line, no options (or ssh_key_id)
  • ssh_key_id, string — one of the caller's saved SSH keys (or ssh_public_key)
  • transport, string — ssh-v1 (the default)
  • settings, object
    • offline_url, string — an https URL the node serves while the client is offline (a page, or a site as a tar)
    • offline_ipns, string — the IPNS name offline_url came from, kept for display (not resolved)
  • region, string — a placement hint
  • manage_dns, boolean — write the record pointing at the node when one of the caller's zones holds the hostname (default true)

Answer 201 (TunnelCreated): the result

  • tunnel, object, required
    • hostname_verified, boolean — true when the name lies in your own active DNS zone, so no TXT proof is asked
    • transport, string
    • hostname, string, required
    • client_connected, boolean, required
    • url, string, required
    • dns_txt_value, string or null — the value that TXT record must hold (atunnel-verify=<token>)
    • dns_txt_name, string or null — the TXT record that proves the name is yours (_atunnel.<hostname>), when it must prove itself: a name outside your own active DNS zone; null when the zone proved it
    • dns_error, string or null
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • settings, object
      • offline_url, string — an https URL the node serves while the client is offline (a page, or a site as a tar)
      • offline_ipns, string — the IPNS name offline_url came from, kept for display (not resolved)
    • billing, object or null — the hourly billing of a tunnel or an app (null when it is not billed)
      • state, string, required — off: not billed; grace: an hourly charge was refused and it still serves until suspend_at; suspended: not served until the hours are paid; if still unpaid after its retention, deleted no sooner than delete_at: the deletion is announced beforehand (72 hours by default) and, by default, happens only once our team approved it (one of off, ok, grace, suspended)
      • paid_through, string or null
      • unpaid_since, string
      • suspend_at, string
      • suspended_at, string
      • delete_at, string
    • id, string, required
    • dns_cname_target, string or null — the node hostname a CNAME points at
    • owner_user_id, string — with delegated: the domain owner's account
    • delegated, boolean — true when the caller created it under a domain grant: it is the domain owner's
    • cert_status, string, required
    • updated_at, string
    • status, string, required — the state, except an active tunnel without a connected client reads degraded
    • migration, object — only on a tunnel adopted from the previous platform: where it came from and whether the client must change anything
      • source, string — where the tunnel came from: previous-platform (must be "previous-platform")
      • imported_at, string
      • from, object — the old connection: ssh_host, ssh_port, ssh_user, port, ssh_command, dns_cname_target, dns_target
      • to, object — the connection served here: the same keys plus node_ssh_host
      • client_unchanged, boolean — true: the client keeps connecting as before
      • changed, array of strings — which of ssh_host, ssh_port, ssh_user, port changed
    • dns_target, string or null — the node's IPv4 an A record points at
    • port, integer, required
    • state, string, required — pending-dns, provisioning, active, failed, deleting
    • dns_ok, boolean, required
    • created_at, string
    • ssh_command, string or null — the ready-to-paste ssh command
    • last_error, string or null — what went wrong last, when anything did
    • node, one of
      • variant 1: object
        • ipv4, string or null
        • ssh_host, string
        • ssh_port, integer
        • ssh_user, string
        • region, string or null
      • variant 2: null
  • dns, object, required
    • managed, boolean, required — the record pointing at the node was written in the caller's zone
    • zone, string or null, required — the caller's zone holding the hostname (dotted), null when none
    • record, one of, required
      • variant 1: object
        • name, string, required — dotted
        • type, string, required (one of A, CNAME)
        • data, object, required — {"address"} for an A, {"name"} (dotted) for a CNAME
      • variant 2: null
    • reason, string or null, required — why the record is not managed (point the hostname yourself); null when managed (one of manage-dns-off, no-zone, dns-not-configured, no-target, null)

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field hostname, ssh_public_key, ssh_key_id, settings, transport, region or manage_dns)
401unauthorizedunauthorized
402insufficient-fundsinsufficient-funds (the credits do not cover the first hour: top up)
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (a hostname under another account's domain; an unknown saved key)
409conflict, hostname-taken, tunnel-limitconflict (the name already has records in the caller's zone), hostname-taken or tunnel-limit
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
451hostname-blockedhostname-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503capacity-unavailable, charge-not-set, unavailablecapacity-unavailable (no capacity now: try again later), or unavailable (tunnels, or saved SSH keys, are not available now: send ssh_public_key), or charge-not-set (its credit charge is not set yet: nothing was created or charged)

Example

curl -X POST 'https://api.weird.ro/tunnels' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"<hostname>"}'

With the CLI (weird tunnel):

$ weird tunnel <hostname> <local-port>

MCP: weird_tunnels_create.

The caller's tunnels#

GET /tunnels · operation listTunnels

Newest first, with the DNS, certificate and client progress of each; delegated: the tunnels of other accounts on hostnames their domain grants carrying tunnel let the caller manage (each with owner_user_id), which GET, PATCH, DELETE /tunnels/{id} and verify-dns reach too (a change under a sensitive domain refused 403 delegate-blocked). Cost (credit charges in GET /credits/charges): the per_request credit charge of tunnel.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiontunnels:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
tunnel.readsper_requestafter a successful answer—see the credit charges

Answer 200 (TunnelList): the result

  • tunnels, array of objects, required
    • hostname_verified, boolean — true when the name lies in your own active DNS zone, so no TXT proof is asked
    • transport, string
    • hostname, string, required
    • client_connected, boolean, required
    • url, string, required
    • dns_txt_value, string or null — the value that TXT record must hold (atunnel-verify=<token>)
    • dns_txt_name, string or null — the TXT record that proves the name is yours (_atunnel.<hostname>), when it must prove itself: a name outside your own active DNS zone; null when the zone proved it
    • dns_error, string or null
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • settings, object
      • offline_url, string — an https URL the node serves while the client is offline (a page, or a site as a tar)
      • offline_ipns, string — the IPNS name offline_url came from, kept for display (not resolved)
    • billing, object or null — the hourly billing of a tunnel or an app (null when it is not billed)
      • state, string, required — off: not billed; grace: an hourly charge was refused and it still serves until suspend_at; suspended: not served until the hours are paid; if still unpaid after its retention, deleted no sooner than delete_at: the deletion is announced beforehand (72 hours by default) and, by default, happens only once our team approved it (one of off, ok, grace, suspended)
      • paid_through, string or null
      • unpaid_since, string
      • suspend_at, string
      • suspended_at, string
      • delete_at, string
    • id, string, required
    • dns_cname_target, string or null — the node hostname a CNAME points at
    • owner_user_id, string — with delegated: the domain owner's account
    • delegated, boolean — true when the caller created it under a domain grant: it is the domain owner's
    • cert_status, string, required
    • updated_at, string
    • status, string, required — the state, except an active tunnel without a connected client reads degraded
    • migration, object — only on a tunnel adopted from the previous platform: where it came from and whether the client must change anything
      • source, string — where the tunnel came from: previous-platform (must be "previous-platform")
      • imported_at, string
      • from, object — the old connection: ssh_host, ssh_port, ssh_user, port, ssh_command, dns_cname_target, dns_target
      • to, object — the connection served here: the same keys plus node_ssh_host
      • client_unchanged, boolean — true: the client keeps connecting as before
      • changed, array of strings — which of ssh_host, ssh_port, ssh_user, port changed
    • dns_target, string or null — the node's IPv4 an A record points at
    • port, integer, required
    • state, string, required — pending-dns, provisioning, active, failed, deleting
    • dns_ok, boolean, required
    • created_at, string
    • ssh_command, string or null — the ready-to-paste ssh command
    • last_error, string or null — what went wrong last, when anything did
    • node, one of
      • variant 1: object
        • ipv4, string or null
        • ssh_host, string
        • ssh_port, integer
        • ssh_user, string
        • region, string or null
      • variant 2: null
  • count, integer, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X GET 'https://api.weird.ro/tunnels' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird tunnels list, weird tunnels stop, weird tunnels delete):

$ weird tunnels list$ weird tunnels stop <hostname|id>$ weird tunnels delete <hostname|id>

MCP: weird_tunnels_list, weird_tunnels_set_offline_folder.

One of the caller's tunnels#

GET /tunnels/{id} · operation getTunnel

state (pending-dns, provisioning, active, failed, deleting) and status (the state, except an active tunnel without a connected client reads degraded). Cost (credit charges in GET /credits/charges): the per_request credit charge of tunnel.reads is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiontunnels:read
Chargedyes — see the charges below
Retry safetya repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again

Credit charges (each a contract of the list of credit charges; the credit charge in force is filled in from the API):

ContractRateWhenTimesCredit charge in force
tunnel.readsper_requestafter a successful answer—see the credit charges

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (TunnelResult): the result

  • tunnel, object, required
    • hostname_verified, boolean — true when the name lies in your own active DNS zone, so no TXT proof is asked
    • transport, string
    • hostname, string, required
    • client_connected, boolean, required
    • url, string, required
    • dns_txt_value, string or null — the value that TXT record must hold (atunnel-verify=<token>)
    • dns_txt_name, string or null — the TXT record that proves the name is yours (_atunnel.<hostname>), when it must prove itself: a name outside your own active DNS zone; null when the zone proved it
    • dns_error, string or null
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • settings, object
      • offline_url, string — an https URL the node serves while the client is offline (a page, or a site as a tar)
      • offline_ipns, string — the IPNS name offline_url came from, kept for display (not resolved)
    • billing, object or null — the hourly billing of a tunnel or an app (null when it is not billed)
      • state, string, required — off: not billed; grace: an hourly charge was refused and it still serves until suspend_at; suspended: not served until the hours are paid; if still unpaid after its retention, deleted no sooner than delete_at: the deletion is announced beforehand (72 hours by default) and, by default, happens only once our team approved it (one of off, ok, grace, suspended)
      • paid_through, string or null
      • unpaid_since, string
      • suspend_at, string
      • suspended_at, string
      • delete_at, string
    • id, string, required
    • dns_cname_target, string or null — the node hostname a CNAME points at
    • owner_user_id, string — with delegated: the domain owner's account
    • delegated, boolean — true when the caller created it under a domain grant: it is the domain owner's
    • cert_status, string, required
    • updated_at, string
    • status, string, required — the state, except an active tunnel without a connected client reads degraded
    • migration, object — only on a tunnel adopted from the previous platform: where it came from and whether the client must change anything
      • source, string — where the tunnel came from: previous-platform (must be "previous-platform")
      • imported_at, string
      • from, object — the old connection: ssh_host, ssh_port, ssh_user, port, ssh_command, dns_cname_target, dns_target
      • to, object — the connection served here: the same keys plus node_ssh_host
      • client_unchanged, boolean — true: the client keeps connecting as before
      • changed, array of strings — which of ssh_host, ssh_port, ssh_user, port changed
    • dns_target, string or null — the node's IPv4 an A record points at
    • port, integer, required
    • state, string, required — pending-dns, provisioning, active, failed, deleting
    • dns_ok, boolean, required
    • created_at, string
    • ssh_command, string or null — the ready-to-paste ssh command
    • last_error, string or null — what went wrong last, when anything did
    • node, one of
      • variant 1: object
        • ipv4, string or null
        • ssh_host, string
        • ssh_port, integer
        • ssh_user, string
        • region, string or null
      • variant 2: null

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (an unknown tunnel, another customer's alike)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X GET 'https://api.weird.ro/tunnels/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird tunnels get, weird tunnel):

$ weird tunnels get <hostname|id>$ weird tunnel <hostname> <local-port>

MCP: weird_tunnels_get.

Replace a tunnel's settings#

PATCH /tunnels/{id} · operation updateTunnel

settings, the whole object: a key left out is cleared ({} clears both). Refused while the tunnel is deleting. Send the previous settings the same way to undo it. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiontunnels:write
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body (UpdateTunnel):

  • settings, object, required
    • offline_url, string — an https URL the node serves while the client is offline (a page, or a site as a tar)
    • offline_ipns, string — the IPNS name offline_url came from, kept for display (not resolved)

Answer 200 (TunnelResult): the result

  • tunnel, object, required
    • hostname_verified, boolean — true when the name lies in your own active DNS zone, so no TXT proof is asked
    • transport, string
    • hostname, string, required
    • client_connected, boolean, required
    • url, string, required
    • dns_txt_value, string or null — the value that TXT record must hold (atunnel-verify=<token>)
    • dns_txt_name, string or null — the TXT record that proves the name is yours (_atunnel.<hostname>), when it must prove itself: a name outside your own active DNS zone; null when the zone proved it
    • dns_error, string or null
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • settings, object
      • offline_url, string — an https URL the node serves while the client is offline (a page, or a site as a tar)
      • offline_ipns, string — the IPNS name offline_url came from, kept for display (not resolved)
    • billing, object or null — the hourly billing of a tunnel or an app (null when it is not billed)
      • state, string, required — off: not billed; grace: an hourly charge was refused and it still serves until suspend_at; suspended: not served until the hours are paid; if still unpaid after its retention, deleted no sooner than delete_at: the deletion is announced beforehand (72 hours by default) and, by default, happens only once our team approved it (one of off, ok, grace, suspended)
      • paid_through, string or null
      • unpaid_since, string
      • suspend_at, string
      • suspended_at, string
      • delete_at, string
    • id, string, required
    • dns_cname_target, string or null — the node hostname a CNAME points at
    • owner_user_id, string — with delegated: the domain owner's account
    • delegated, boolean — true when the caller created it under a domain grant: it is the domain owner's
    • cert_status, string, required
    • updated_at, string
    • status, string, required — the state, except an active tunnel without a connected client reads degraded
    • migration, object — only on a tunnel adopted from the previous platform: where it came from and whether the client must change anything
      • source, string — where the tunnel came from: previous-platform (must be "previous-platform")
      • imported_at, string
      • from, object — the old connection: ssh_host, ssh_port, ssh_user, port, ssh_command, dns_cname_target, dns_target
      • to, object — the connection served here: the same keys plus node_ssh_host
      • client_unchanged, boolean — true: the client keeps connecting as before
      • changed, array of strings — which of ssh_host, ssh_port, ssh_user, port changed
    • dns_target, string or null — the node's IPv4 an A record points at
    • port, integer, required
    • state, string, required — pending-dns, provisioning, active, failed, deleting
    • dns_ok, boolean, required
    • created_at, string
    • ssh_command, string or null — the ready-to-paste ssh command
    • last_error, string or null — what went wrong last, when anything did
    • node, one of
      • variant 1: object
        • ipv4, string or null
        • ssh_host, string
        • ssh_port, integer
        • ssh_user, string
        • region, string or null
      • variant 2: null

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (field settings)
401unauthorizedunauthorized
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
409conflictconflict (deleting)
429rate-limitedrate-limited
451hostname-blockedhostname-blocked (the hostname or content was blocked after a review: reason abuse-review; contest it through a support ticket or contact)
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X PATCH 'https://api.weird.ro/tunnels/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"settings":{}}'

With the CLI (weird tunnels update):

$ weird tunnels update <hostname|id>

MCP: weird_tunnels_update, weird_tunnels_set_offline_folder.

Delete a tunnel#

DELETE /tunnels/{id} · operation deleteTunnel

A tunnel that never went live is deleted at once; any other moves to deleting until it is torn down. The record written for its hostname is removed from the caller's zone where unchanged (dns.removed). Safe to repeat while deleting. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiontunnels:write
Strong authenticationa session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or totp_code / backup_code in the body); an API key is not asked — see authentication
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (TunnelDeleted): the result

  • tunnel, object, required
    • hostname_verified, boolean — true when the name lies in your own active DNS zone, so no TXT proof is asked
    • transport, string
    • hostname, string, required
    • client_connected, boolean, required
    • url, string, required
    • dns_txt_value, string or null — the value that TXT record must hold (atunnel-verify=<token>)
    • dns_txt_name, string or null — the TXT record that proves the name is yours (_atunnel.<hostname>), when it must prove itself: a name outside your own active DNS zone; null when the zone proved it
    • dns_error, string or null
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • settings, object
      • offline_url, string — an https URL the node serves while the client is offline (a page, or a site as a tar)
      • offline_ipns, string — the IPNS name offline_url came from, kept for display (not resolved)
    • billing, object or null — the hourly billing of a tunnel or an app (null when it is not billed)
      • state, string, required — off: not billed; grace: an hourly charge was refused and it still serves until suspend_at; suspended: not served until the hours are paid; if still unpaid after its retention, deleted no sooner than delete_at: the deletion is announced beforehand (72 hours by default) and, by default, happens only once our team approved it (one of off, ok, grace, suspended)
      • paid_through, string or null
      • unpaid_since, string
      • suspend_at, string
      • suspended_at, string
      • delete_at, string
    • id, string, required
    • dns_cname_target, string or null — the node hostname a CNAME points at
    • owner_user_id, string — with delegated: the domain owner's account
    • delegated, boolean — true when the caller created it under a domain grant: it is the domain owner's
    • cert_status, string, required
    • updated_at, string
    • status, string, required — the state, except an active tunnel without a connected client reads degraded
    • migration, object — only on a tunnel adopted from the previous platform: where it came from and whether the client must change anything
      • source, string — where the tunnel came from: previous-platform (must be "previous-platform")
      • imported_at, string
      • from, object — the old connection: ssh_host, ssh_port, ssh_user, port, ssh_command, dns_cname_target, dns_target
      • to, object — the connection served here: the same keys plus node_ssh_host
      • client_unchanged, boolean — true: the client keeps connecting as before
      • changed, array of strings — which of ssh_host, ssh_port, ssh_user, port changed
    • dns_target, string or null — the node's IPv4 an A record points at
    • port, integer, required
    • state, string, required — pending-dns, provisioning, active, failed, deleting
    • dns_ok, boolean, required
    • created_at, string
    • ssh_command, string or null — the ready-to-paste ssh command
    • last_error, string or null — what went wrong last, when anything did
    • node, one of
      • variant 1: object
        • ipv4, string or null
        • ssh_host, string
        • ssh_port, integer
        • ssh_user, string
        • region, string or null
      • variant 2: null
  • dns, object, required
    • removed, array of objects, required — the automatic record removed from the caller's zone
      • name, string, required — dotted
      • type, string, required (one of A, CNAME)
      • data, object, required — {"address"} for an A, {"name"} (dotted) for a CNAME

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found
422invalid-totpinvalid-totp (a wrong or replayed authenticator code)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X DELETE 'https://api.weird.ro/tunnels/{id}' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird tunnels delete):

$ weird tunnels delete <hostname|id>

MCP: weird_tunnels_delete.

Re-check a tunnel's DNS now#

POST /tunnels/{id}/verify-dns · operation verifyTunnelDns

No body. A pending-dns tunnel whose DNS now resolves moves on to provisioning; a failed tunnel retries its certificate. Safe to repeat. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiontunnels:write
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (TunnelResult): the result

  • tunnel, object, required
    • hostname_verified, boolean — true when the name lies in your own active DNS zone, so no TXT proof is asked
    • transport, string
    • hostname, string, required
    • client_connected, boolean, required
    • url, string, required
    • dns_txt_value, string or null — the value that TXT record must hold (atunnel-verify=<token>)
    • dns_txt_name, string or null — the TXT record that proves the name is yours (_atunnel.<hostname>), when it must prove itself: a name outside your own active DNS zone; null when the zone proved it
    • dns_error, string or null
    • restriction, object — on a resource held after a review: suspended (its account is restricted) or blocked (its content or hostname may not be served); the one reason code is abuse-review
      • state, string, required (one of suspended, blocked)
      • reason, string, required (must be "abuse-review")
      • decision_id, string or null — the decision on your account that put it in place (GET /auth/account/restrictions lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
      • contact, string — the abuse contact address to write to about it
    • settings, object
      • offline_url, string — an https URL the node serves while the client is offline (a page, or a site as a tar)
      • offline_ipns, string — the IPNS name offline_url came from, kept for display (not resolved)
    • billing, object or null — the hourly billing of a tunnel or an app (null when it is not billed)
      • state, string, required — off: not billed; grace: an hourly charge was refused and it still serves until suspend_at; suspended: not served until the hours are paid; if still unpaid after its retention, deleted no sooner than delete_at: the deletion is announced beforehand (72 hours by default) and, by default, happens only once our team approved it (one of off, ok, grace, suspended)
      • paid_through, string or null
      • unpaid_since, string
      • suspend_at, string
      • suspended_at, string
      • delete_at, string
    • id, string, required
    • dns_cname_target, string or null — the node hostname a CNAME points at
    • owner_user_id, string — with delegated: the domain owner's account
    • delegated, boolean — true when the caller created it under a domain grant: it is the domain owner's
    • cert_status, string, required
    • updated_at, string
    • status, string, required — the state, except an active tunnel without a connected client reads degraded
    • migration, object — only on a tunnel adopted from the previous platform: where it came from and whether the client must change anything
      • source, string — where the tunnel came from: previous-platform (must be "previous-platform")
      • imported_at, string
      • from, object — the old connection: ssh_host, ssh_port, ssh_user, port, ssh_command, dns_cname_target, dns_target
      • to, object — the connection served here: the same keys plus node_ssh_host
      • client_unchanged, boolean — true: the client keeps connecting as before
      • changed, array of strings — which of ssh_host, ssh_port, ssh_user, port changed
    • dns_target, string or null — the node's IPv4 an A record points at
    • port, integer, required
    • state, string, required — pending-dns, provisioning, active, failed, deleting
    • dns_ok, boolean, required
    • created_at, string
    • ssh_command, string or null — the ready-to-paste ssh command
    • last_error, string or null — what went wrong last, when anything did
    • node, one of
      • variant 1: object
        • ipv4, string or null
        • ssh_host, string
        • ssh_port, integer
        • ssh_user, string
        • region, string or null
      • variant 2: null

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403account-suspended, insufficient-scope, profile-incomplete, terms-acceptance-requiredinsufficient-scope (an API key without the scope x-weird-scope names: use a key that holds it) or profile-incomplete (complete the profile first: GET /auth/profile says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept)
404not-foundnot-found (deleting included)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X POST 'https://api.weird.ro/tunnels/{id}/verify-dns' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird tunnels verify-dns, weird tunnel):

$ weird tunnels verify-dns <hostname|id>$ weird tunnel <hostname> <local-port>

MCP: weird_tunnels_verify_dns.

This page is generated from the API's public document; it changes when the document does.