@subdomainto/node
TypeScript types, custom fetch, structured API errors and constant-time webhook verification.
Typed clients for JavaScript, PHP and Python, with framework packages that wire configuration and webhook verification into the conventions you already use.
Each SDK exposes destinations, domains, webhooks, widget sessions and usage without inventing a framework-specific domain abstraction.
@subdomainto/nodeTypeScript types, custom fetch, structured API errors and constant-time webhook verification.
subdomainto/sdkFramework-independent PSR-18 client with typed models and dedicated exceptions.
subdomaintoTyped HTTPX client, context-manager support and signed webhook verification from raw bytes.
Choose the stack you ship. The tabs change one complete, copyable path: installation, client, domain creation and webhook verification.
$ npm install @subdomainto/node
import { SubdomainTo, verifyWebhook } from '@subdomainto/node'
const client = new SubdomainTo({
apiKey: process.env.SUBDOMAINTO_API_KEY!
})
const domain = await client.domains.create(
'portal.acme.eu',
'customer-42-domain',
{ destinationId }
)
domain.dnsRecords // render these to the customer
verifyWebhook(rawBody, signature, webhookSecret)
$ composer require subdomainto/sdk guzzlehttp/guzzle guzzlehttp/psr7
use SubdomainTo\Client;
use SubdomainTo\WebhookVerifier;
$client = Client::fromApiKey(
$_ENV['SUBDOMAINTO_API_KEY']
);
$domain = $client->domains()->create(
'portal.acme.eu',
'customer-42-domain',
$destinationId,
);
$domain->dnsRecords(); // render these next
WebhookVerifier::verify($rawBody, $signature, $secret);
$ pip install subdomainto
import os
from subdomainto import SubdomainTo, verify_webhook
client = SubdomainTo(
os.environ["SUBDOMAINTO_API_KEY"]
)
domain = client.domains.create(
"portal.acme.eu",
"customer-42-domain",
destination_id=destination_id,
)
domain.dns_records # render these to the customer
verify_webhook(raw_body, signature, webhook_secret)
Packages handle dependency injection, configuration and verified webhook handoff. Your business logic still talks to the same typed client.
Server factories, injectable clients and raw-body webhook helpers.
@subdomainto/express · nestjs · next · nuxtAutowiring or container bindings, environment configuration and verified controller middleware.
subdomainto/symfony-bundle · subdomainto/laravelFramework configuration, dependency patterns and webhook verification examples.
subdomainto-django · subdomainto-fastapiTransport failures stay distinct from API responses. The original response body remains available, and framework packages validate signatures before your controller handles an event.
No. They are server-side clients. Use a server-created widget session when a customer must enter a hostname inside your application.
No. They configure and inject it, then add framework-native webhook verification or helpers.
Node accepts a custom fetch; PHP uses PSR-18 and PSR-17; Python accepts a custom httpx.Client.
Each installation guide names its supported runtime and framework versions before the setup instructions.
Use a server-side SDK when it fits your stack. The API remains the source of truth for resources, statuses and errors.