---
title: "A visitor signs up. Form-encoded (email, name, page, optional lang) so browsers skip the preflight; JSON is also accepted. Messages and the confirmation email follow the form's language, else lang, else Accept-Language. With double opt-in a confirmation email is sent and the person joins the list after confirming."
method: POST
path: "/v1/forms/{publicId}/subscribe"
---

# A visitor signs up. Form-encoded (email, name, page, optional lang) so browsers skip the preflight; JSON is also accepted. Messages and the confirmation email follow the form's language, else lang, else Accept-Language. With double opt-in a confirmation email is sent and the person joins the list after confirming.

`POST /v1/forms/{publicId}/subscribe`

## Request

- Base URL: `https://api.bangermail.com`
- URL: `https://api.bangermail.com/v1/forms/{publicId}/subscribe`
- Auth: none required

## Request body

- object: Custom answers use x_<field key> (or the unprefixed key). Required answers depend on the form configuration. The handler reads the first 8000 characters of the body.
  - `email` string, email, required
  - `name` string
  - `page` string
  - `elapsed` union: Milliseconds elapsed since displaying the form.
    - number
    - string
  - `lang` string
  - `locale` string
  - `website` string: Honeypot; leave empty.

## Response `200`

Signup accepted.

- object
  - `ok` true, required
  - `status` 'pending_confirmation' | 'subscribed' | 'already_subscribed', required
  - `redirect_url` string

## Other responses

- `default`: Request failed.

---

[API](https://skmtc.dev/bangermail/apis/banger-api.md) · [All operations](https://skmtc.dev/bangermail/apis/banger-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bangermail/apis/banger-api/revisions/a149909267f9?raw)
