Custom domains

Serve Connect from your own domain, verified by DNS.

Each endpoint, main and test, can answer on up to 5 of your own domains.

Keep in mind

Main and test
Pick the endpoint with endpoint: main by default, or test.
Pausing keeps the setup
Disabling a domain with edit-domain keeps its certificate and virtual host.

Verifying a domain

  1. Point an A record for the domain at the panel address.
  2. Call create-domain. The first answer is dns_txt_required with the record in details.name and details.value.
  3. Add that TXT record at _modkey.<domain> and call create-domain again.
  4. ModKey issues a Let's Encrypt certificate and the domain starts answering Connect.

5 per hour

Create and delete share a quota of 5 operations an hour, failed TXT checks included. Past it they answer 429 with rate_limited and no retry details.

List domains

POST https://dev.mod.wtf/api/v2/action

methodget-domains

Custom domains for this endpoint (up to 5 on Main and the same number on Test).

Body

  • soft_id integer required

    ID of a software you own

  • endpoint string optional

    Main or test, default main

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "get-domains",
    "soft_id": 123
}

Create domain

POST https://dev.mod.wtf/api/v2/action

methodcreate-domain

Add a custom domain. Point it to the panel IP and add a TXT record at _modkey.<domain>: until it exists the call returns dns_txt_required with the record name and value in details.name and details.value. Then a Let's Encrypt certificate and Apache vhost are provisioned. Up to 5 create or delete operations per hour, failed TXT checks included.

Body

  • soft_id integer required

    ID of a software you own

  • domain string required

    Lowercase domain that already points to the panel IP

  • endpoint string optional

    Main or test, default main

Errors it can return

DNS first

Until the TXT record at _modkey.<domain> exists this answers dns_txt_required, and each failed check uses one of the 5 hourly operations.

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "create-domain",
    "soft_id": 123,
    "domain": "keys.example.com",
    "endpoint": "main"
}

Update domain

POST https://dev.mod.wtf/api/v2/action

methodedit-domain

Enable or disable a domain. The vhost and certificate are retained in both cases.

Body

  • domain_id integer required

    Domain ID from get-domains

  • soft_id integer required

    ID of a software you own

  • active boolean required

    True enables the domain, false pauses it

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "edit-domain",
    "soft_id": 123,
    "domain_id": 1,
    "active": false
}

Delete domain

POST https://dev.mod.wtf/api/v2/action

methoddelete-domain

Delete a domain. The Apache vhost is removed; the certificate remains on disk. Shares the 5 per hour quota with domain creation.

Body

  • domain_id integer required

    Domain ID from get-domains

  • soft_id integer required

    ID of a software you own

Errors it can return

POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json

{
    "api_key": "YOUR_API_KEY",
    "method": "delete-domain",
    "soft_id": 123,
    "domain_id": 1
}
Esc