1. Domain Registration & Intake
Search available domain names and register them instantly, or connect externally purchased domains via tokenized DNS verification.
Endpoint: /api/v1/domains/connect
2. Automated DNS Verification
Verify ownership via multi-resolver Anycast queries checking for unique TXT records with TTL-aware retry semantics.
Endpoint: /api/v1/domains/[domainId]/verify
3. Health & DNS Probing
Execute live diagnostic health probes evaluating DNS propagation, TLS handshake validity, and HTTP response latency.
Endpoint: /api/v1/domains/[domainId]/health
Interactive REST API Sandbox
Test live API endpoints directly against the HOST backend.
LIVE ENDPOINT: https://host.cgs360.in
RESPONSE PAYLOAD
Select an endpoint and click "Send API Request" to inspect response.
TypeScript Client SDK
Drop this typed wrapper into your project to manage domains and DNS records with standard authorization headers.
// lib/host-client.ts
// Programmatic TypeScript Client for HOST Platform
export interface DnsRequirement {
type: string;
name: string;
value: string;
ttl: string;
purpose: string;
}
export class HostClient {
private baseUrl: string;
private apiKey: string;
constructor(apiKey: string, baseUrl = 'https://host.cgs360.in') {
this.apiKey = apiKey;
this.baseUrl = baseUrl.replace(/\/$/, '');
}
private async request<T>(path: string, options: RequestInit = {}): Promise<T> {
const res = await fetch(`${this.baseUrl}${path}`, {
...options,
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${this.apiKey}`,
...options.headers,
},
});
return res.json();
}
// 1. Search domain availability and pricing
async searchDomains(query: string) {
return this.request<{
success: boolean;
results: Array<{ domain: string; available: boolean; price: number }>;
}>('/api/v1/domains/search', {
method: 'POST',
body: JSON.stringify({ query }),
});
}
// 2. Connect external domain (returns verification TXT record)
async connectDomain(domainName: string, registrar = 'OTHER') {
return this.request<{
success: boolean;
domainId: string;
dnsRequirements: DnsRequirement[];
verificationToken: string;
}>('/api/v1/domains/connect', {
method: 'POST',
body: JSON.stringify({ domainName, registrar }),
});
}
// 3. Verify DNS ownership
async verifyDns(domainId: string) {
return this.request<{
success: boolean;
dnsStatus: string;
message: string;
diagnostic?: any;
}>(`/api/v1/domains/${domainId}/verify`, {
method: 'POST',
});
}
// 4. Check domain status
async getStatus(domainId: string) {
return this.request(`/api/v1/domains/${domainId}/status`);
}
// 5. Run health check
async getHealth(domainId: string) {
return this.request(`/api/v1/domains/${domainId}/health`);
}
}