> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# useSaveScheduledEmailToBackend()

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: function
- Stability: beta
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/presentation/automations/scheduledEmail/state/useSaveScheduledEmailToBackend.ts

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Saves the scheduled-export dialog's draft: creates a new schedule or updates the edited one after sanitizing it, keeps a 400 response's detail as an in-dialog error message, and routes everything else to the matching callback.

Reads the draft from the scheduled-export state contexts, so it throws outside them.

**Signature:**

```typescript
export declare function useSaveScheduledEmailToBackend(input: IUseSaveScheduledEmailCallbacks): IScheduledEmailSaveState;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { onCreateSuccess, onCreateError, onUpdateSuccess, onUpdateError, } | (not declared) |  |
| input | [IUseSaveScheduledEmailCallbacks](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iusesavescheduledemailcallbacks/index.md) |  |

**Returns:**

[IScheduledEmailSaveState](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.ischeduledemailsavestate/index.md)
