POST/v1/public/{church}/subscribe
Subscribe an email address#
Subscribes an email address to the church's updates from your own form. The person gets a confirmation email and is subscribed only after confirming. Every message carries a one-click unsubscribe.
Auth. None. This route is public.
Plan. The church needs the audience feature.
- Auth
- No key
- Plan
- The church needs the audience feature.
- Operation id
publicSubscribe
Parameters
| Name | In | Description |
|---|---|---|
church required | path | The church slug, such as grace-chapel. For partner routes, the customer church id (org_) or slug. (string, e.g. grace-chapel) |
Request body
| Field | Type | Description |
|---|---|---|
email | string | The email address. |
first_name | string | The subscriber's first name. |
source | string | Where the signup came from, such as website. |
{
"email": "[email protected]",
"first_name": "Ada",
"source": "website"
}Responses
200 Success. Subscribe an email address.
{
"status": true,
"message": "subscriber",
"data": {
"id": "0192f7a8-3b1c-7d2e-9a40-5c6d7e8f9012",
"status": "pending"
}
}400 The request could not be read.
{
"status": false,
"message": "the page cursor is not valid",
"error": {
"code": "invalid_argument",
"status": 400,
"request_id": "req_b337770ecebe03b03a88a8998b59263d"
}
}422 A field failed validation, or an Idempotency-Key was reused with a different body.
{
"status": false,
"message": "A field is not valid.",
"error": {
"code": "validation",
"status": 422,
"request_id": "req_b337770ecebe03b03a88a8998b59263d"
}
}500 Something went wrong. Quote error.request_id.
{
"status": false,
"message": "Something went wrong. Quote the request id to support.",
"error": {
"code": "internal",
"status": 500,
"request_id": "req_b337770ecebe03b03a88a8998b59263d"
}
}Code samples
curl -X POST "$FOLIO_API_URL/v1/public/grace-chapel/subscribe" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"first_name": "Ada",
"source": "website"
}'