Delete Custom Tracking Domain method 🌐 Domains
Permanently delete an existing custom tracking domain for the given hostname and scope. The domain can be re-registered if needed.
WARNING
Any tracking links or unsubscribe URLs in previously sent emails using this domain will stop working immediately.
Usage
ts
import { MailChannelsClient, Domains } from 'mailchannels-sdk'
const mailchannels = new MailChannelsClient('your-api-key')
const domains = new Domains(mailchannels)
const { success, error } = await domains.customTracking.delete('click.example.com', 'click')ts
import { MailChannels } from 'mailchannels-sdk'
const mailchannels = new MailChannels('your-api-key')
const { success, error } = await mailchannels.domains.customTracking.delete('click.example.com', 'click')Params
hostnamestringrequired: The hostname of the custom tracking domain to delete.scopeDomainsCustomTrackingScoperequired: The scope of the custom tracking domain to delete (click,open,unsubscribe).
Response
successbooleanguaranteed: Whether the operation was successful.errorErrorResponse | nullnullable: Error information if the operation failed.messagestringguaranteed: A human-readable description of the error.statusCodenumber | nullnullable: The HTTP status code from the API, ornullif the error is not related to an HTTP request. This field is intended for diagnostic use only and should not be relied upon.typestringguaranteed: A string identifier for the type of error. This field is intended for diagnostic use only and should not be relied upon.responseRecord<string, unknown> | nullnullable: An object containing the response, if available. This field may benullif no response is available or if the error is not related to an HTTP request or if the response is not a JSON object.
Type declarations
Signature
ts
async function delete (hostname: string, scope: DomainsCustomTrackingScope): Promise<SuccessResponse>Response type declarations
ts
interface ErrorResponse {
message: string;
statusCode: number | null;
type: ErrorType;
response: Record<string, unknown> | null;
}ts
interface SuccessResponse {
success: boolean;
error: ErrorResponse | null;
}Custom Tracking Domain type declarations
ts
type DomainsCustomTrackingScope = "click" | "open" | "unsubscribe";Source
Source • Playground • Docs • Tests