> ## Documentation Index
> Fetch the complete documentation index at: https://formpaste.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom success message

> Customize the confirmation message your JavaScript form shows after a successful submit, set from the dashboard.

<Info>**Free** - included on every plan.</Info>

When a form is submitted with `fetch` (an AJAX/JavaScript form), `/submit`
returns a JSON body with a `message` field. By default that message is
`"Submission received."` You can replace it with your own wording from the
dashboard, so your form can show something like "Thanks, we'll reply within a
day" without hardcoding the copy in your page.

## Setting it

In the dashboard, open your form and go to **Configuration -> Delivery**. Enter
your text in the **Success message** field and save. Leave it blank to keep the
default.

## What the visitor's code receives

On a successful submit with no `redirect` field, `/submit` returns your message
in the `message` field of the JSON response:

```json theme={null}
{ "success": true, "message": "Thanks, we'll reply within a day.", "id": "sub_..." }
```

Read `message` from the response in your submit handler and render it in your
own UI:

```js theme={null}
const res = await fetch("https://api.formpaste.com/submit", {
  method: "POST",
  body: new FormData(form),
});
const data = await res.json();
if (data.success) {
  showConfirmation(data.message); // your own success UI
}
```

If you never set a success message, `message` is the default
`"Submission received."` - existing integrations are unchanged.

## Plain text only

The success message is returned as a plain string. It is not rendered as HTML
or Markdown - your own page decides how to display it. Keep it to a short
sentence (up to 500 characters).

## Redirect forms use a page instead

The success message applies only to the JSON response. If your form uses a
`redirect` field (typical for no-JavaScript HTML forms), `/submit` responds
with a `303` redirect and no JSON body, so the message is not used - the visitor
lands on your own thank-you page instead. See [Redirects](/docs/features/redirects)
for that flow.
