🚫 Suppressions module Email API
Manage your MailChannels account suppressions list.
Methods
Type declarations
ts
class Suppressions {
constructor (protected mailchannels: MailChannelsClient);
async create (options: SuppressionsCreateOptions): Promise<SuccessResponse>;
async delete (recipient: string, source?: SuppressionsSource): Promise<SuccessResponse>;
async list (options?: SuppressionsListOptions): Promise<SuppressionsListResponse>;
}All type declarations
Response type declarations
ts
interface ErrorResponse {
message: string;
statusCode: number | null;
type: ErrorType;
}ts
type DataResponse<T> = {
data: T;
error: null;
} | {
data: null;
error: ErrorResponse;
};ts
interface SuccessResponse {
success: boolean;
error: ErrorResponse | null;
}Create type declarations
ts
type SuppressionsTypes = "transactional" | "non-transactional";ts
interface SuppressionsCreateOptions {
addToSubAccounts?: boolean;
entries: {
notes?: string;
recipient: string;
types?: SuppressionsTypes[];
}[];
}List type declarations
ts
type SuppressionsSource = "api" | "unsubscribe_link" | "list_unsubscribe" | "hard_bounce" | "spam_complaint" | "all";ts
interface SuppressionsListOptions {
recipient?: string;
source?: Exclude<SuppressionsSource, "all">;
createdBefore?: string;
createdAfter?: string;
limit?: number;
offset?: number;
}ts
interface SuppressionsListEntry {
createdAt: string;
notes?: string;
recipient: string;
sender?: string;
source: SuppressionsSource;
types: SuppressionsTypes[];
}ts
type SuppressionsListResponse = DataResponse<SuppressionsListEntry[]>;Source
Source • Playground • Docs • Tests
Changelog
Unreleased on May 26, 2026
f49c49f— feat(errors): introduce error type keys
v0.8.0 on May 23, 2026
ab66dc1— refactor: split internal utils into focused modules