export type CreateApiMarketingEmails202603EmailIdDraftResetArgs = {emailId: string}; export type CreateApiMarketingEmails202603EmailIdDraftResetOptions = {baseUrl?: string | undefined, privateApps?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reset the draft version * * POST /marketing/emails/2026-03/{emailId}/draft/reset * * Also accepts auth: developer_hapikey */ export const createApiMarketingEmails202603EmailIdDraftReset = async (args: CreateApiMarketingEmails202603EmailIdDraftResetArgs, options?: CreateApiMarketingEmails202603EmailIdDraftResetOptions) => { const {baseUrl = "https://api.hubapi.com", fetch: fetchFn = fetch, privateApps} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (privateApps !== undefined) headers.set('authorization', `Bearer ${privateApps}`) const url = `${baseUrl.replace(/\/+$/, '')}/marketing/emails/2026-03/${encodeURIComponent(String(args.emailId))}/draft/reset${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };