Subscribe API
Enroll subscribers programmatically from any external site or tool. The API reuses the same double opt-in flow as the on-site form: the person still receives a confirmation email and must click to confirm, so a key can never force-confirm anyone.
Endpoint
Send a JSON POST with a bearer API key.
POST https://phluentlabs.com/api/v1/subscribe
Authorization: Bearer <your api key>
Content-Type: application/jsonCreate and manage keys in the admin panel under API Keys. The raw key is shown only once at creation — store it securely.
Request body
email(required) — the subscriber's email address.firstName,lastName(optional) — name fields.ref(optional) — a referral code to credit a referrer; unknown codes are ignored.tags(optional) — an array of tags to apply to a brand-new subscriber (e.g. where the signup came from).
Example
curl -X POST https://phluentlabs.com/api/v1/subscribe \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "reader@example.com",
"firstName": "Ada",
"ref": "OPTIONAL_REFERRAL_CODE",
"tags": ["source:partner-site"]
}'Responses
200—{ "ok": true, "alreadySubscribed": false }a confirmation email was sent (or the email was already subscribed).400— invalid body / missing or malformed email.401— missing or invalid API key.429— rate limit exceeded (slow down and retry).
Prefer a no-code option? See the embeddable subscribe form.
Making sure your emails land in the inbox? See the deliverability guide.