Appearance
Newsletter Subscribe
Subscribe an email address to the newsletter.
Endpoint
POST /newsletter/subscribe1
Request
Headers
Content-Type: application/json1
Body
json
{
"email": "user@example.com"
}1
2
3
2
3
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Valid email address to subscribe |
The body must be a JSON object. email is validated by VineJS as a required email string; no other request fields are used.
Response
Success (201 Created)
json
{
"messages": [
{
"title": "Successfully subscribed to the newsletter."
}
]
}1
2
3
4
5
6
7
2
3
4
5
6
7
Error (422 Unprocessable Entity)
json
{
"errors": [
{
"field": "email",
"message": "The email field must be a valid email address",
"code": "input.email.email"
}
]
}1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Error (409 Conflict)
json
{
"errors": [
{
"message": "Subscriber already exists",
"code": "common.resource.conflict"
}
]
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Error (500 Internal Server Error)
A provider failure returns the application error envelope with code common.server.internal. The message is the caught provider error message when the provider throws an Error; otherwise it is Failed to subscribe to the newsletter.
json
{
"errors": [
{
"message": "Failed to subscribe to the newsletter.",
"code": "common.server.internal"
}
]
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Notes
- No authentication required (public endpoint)
- Contact creation completes before the welcome email is sent.
- A failure in either step prevents the
201response. - Duplicate subscriptions return
409 Conflict. - The route-level limit is 30 requests per IP address per minute and is disabled in tests.