Public WebsiteSubscribe to Newsletter

Subscribe to Newsletter

Subscribe an email address to the workspace's list from its public site — the Hub and Publishing Home subscribe forms. Rate limited to 10 requests per minute per IP, and 10 attempts per 10 minutes for the same email address. Returns only an outcome, never the subscriber record, since the endpoint is unauthenticated.

Signups that look like spam still get a success response: the most blatant are dropped silently, and likely spam is saved with a risk mark that Audience's spam cleanup takes into account.

curl -X POST "https://app.nashra.ai/api/v1/tenants/example_string/subscribe" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "reader@example.com",
  "name": "Jamie",
  "phone": "+966501234567",
  "phone_country": "SA",
  "tags": [
    "newsletter-widget"
  ],
  "visitor_id": "123e4567-e89b-12d3-a456-426614174000",
  "website": "example_string"
}'
{
  "data": {
    "subscribed": true,
    "reader_number": 1284
  },
  "message": "Successfully subscribed to newsletter",
  "meta": {}
}
POST
/tenants/{slug}/subscribe
POST
Base URLstring

Target server for requests. Edit to use your own host.

path
slugstring
Required

Tenant's subdomain slug, or its verified custom domain

Content-Typestring
Required

The media type of the request body

Options: application/json
emailstring
Required
Format: email
namestring

Stored as the subscriber's first name

Max length: 255
phonestring

Optional WhatsApp number. Send a full international number (+9665…), or a national number together with phone_country. Stored in E.164 format.

Max length: 32
phone_countrystring

Two-letter country code used to read a national-format phone

Min length: 2 • Max length: 2
tagsarray

Tag names to apply on success. Unknown names are created; matching names attach the existing tag.

visitor_idstring

The consented first-party visitor ID, so the visitor's earlier activity joins the new subscriber's journey

Format: uuid
websitestring

Spam trap — leave it out or empty. A request with a value here gets a normal-looking success, but no subscriber is created.

Request Preview
Response

Response will appear here after sending the request

Path Parameters

slugstring
Required

Tenant's subdomain slug, or its verified custom domain

Body

application/json
emailstring
Required
Example:
reader@example.com
namestring

Stored as the subscriber's first name

Example:
Jamie
phonestring

Optional WhatsApp number. Send a full international number (+9665…), or a national number together with phone_country. Stored in E.164 format.

Example:
+966501234567
phone_countrystring

Two-letter country code used to read a national-format phone

Example:
SA
tagsarray

Tag names to apply on success. Unknown names are created; matching names attach the existing tag.

Example:
["newsletter-widget"]
visitor_idstring

The consented first-party visitor ID, so the visitor's earlier activity joins the new subscriber's journey

websitestring

Spam trap — leave it out or empty. A request with a value here gets a normal-looking success, but no subscriber is created.

Responses