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

# useAlertSubmit()

- 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/alerting/state/useAlertSubmit.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).
> 

Submits the alerting dialog's draft: creates a new alert or saves the edited one, deriving a title when the draft has none, and routes the result to the matching callback. Guards against a second submit while one is in flight.

Reads the draft, the supported measures, the edited alert and the separators from the alerting contexts, so it throws outside the alerting dialog's state providers.

**Signature:**

```typescript
export declare function useAlertSubmit(input: IUseAlertSubmitCallbacks): IAlertSubmitState;
```

## Parameters

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

**Returns:**

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