export type DeleteApiMarketingEmails202603EmailIdArgs = {emailId: string, archived?: boolean | undefined}; export type DeleteApiMarketingEmails202603EmailIdOptions = {baseUrl?: string | undefined, privateApps?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a marketing email * * DELETE /marketing/emails/2026-03/{emailId} * * Also accepts auth: developer_hapikey */ export const deleteApiMarketingEmails202603EmailId = async (args: DeleteApiMarketingEmails202603EmailIdArgs, options?: DeleteApiMarketingEmails202603EmailIdOptions) => { const {baseUrl = "https://api.hubapi.com", fetch: fetchFn = fetch, privateApps} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.archived != null) query.append("archived", String(args.archived)) if (privateApps !== undefined) headers.set('authorization', `Bearer ${privateApps}`) const url = `${baseUrl.replace(/\/+$/, '')}/marketing/emails/2026-03/${encodeURIComponent(String(args.emailId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };