Skip to main content
POST
/
api
/
subscribers
/
subscribe
Subscribe to Blog
curl --request POST \
  --url https://api.example.com/api/subscribers/subscribe \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "blogId": "<string>",
  "subdomain": "<string>",
  "customDomain": "<string>"
}
'
{
  "ok": true,
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/subratomandal/dyeink/llms.txt

Use this file to discover all available pages before exploring further.

Authentication

This is a public endpoint and does not require authentication.

Request Body

email
string
required
Email address to subscribe. Must be a valid email format.
blogId
string
The unique identifier of the blog to subscribe to
subdomain
string
The subdomain of the blog to subscribe to (e.g., “myblog”)
customDomain
string
The custom domain of the blog to subscribe to (e.g., “blog.example.com”)
You must provide at least one of: blogId, subdomain, or customDomain to identify the blog.

Response

ok
boolean
required
Indicates whether the subscription was successful
message
string
required
Human-readable message describing the result. Possible values:
  • “Subscribed successfully” - New subscription created
  • “Subscription reactivated” - Previously unsubscribed email was reactivated
  • “Already subscribed” - Email is already an active subscriber

Example Request

cURL
curl -X POST https://api.dyeink.com/api/subscribers/subscribe \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "subdomain": "myblog"
  }'

Example Response

{
  "ok": true,
  "message": "Subscribed successfully"
}

Error Responses

400 Bad Request
Missing or invalid email address
{
  "error": "Email is required"
}
or
{
  "error": "Invalid email format"
}
404 Not Found
Blog with the specified identifier does not exist
{
  "error": "Blog not found"
}
500 Internal Server Error
Failed to process the subscription
{
  "error": "Failed to subscribe"
}

Notes

  • Email addresses are automatically converted to lowercase for consistency
  • If a subscriber previously unsubscribed, this endpoint will reactivate their subscription
  • New subscriptions start with verified: false status
  • The endpoint prevents duplicate active subscriptions to the same blog