انتقل إلى المحتوى الرئيسي

Newsletter

The Newsletter API allows users to subscribe to and manage their subscription to a newsletter service. It also provides functionality for administrators to send newsletters to subscribed users.

  • Endpoint: api/customer/newsletter

  • Http Method: POST

معلومات

Before using the Newsletter API, ensure that you have configured the Mailchimp integration by filling in the following keys in your application's configuration:

  • Mailchimp Configuration:

    • MAILCHIMP_APIKEY: Your Mailchimp API key for authentication with the Mailchimp service.
    • MAILCHIMP_LIST_ID: The ID of the Mailchimp list where user emails will be stored.

Without configuring these keys, the Newsletter API may not function as intended and could lead to errors in subscription and newsletter sending.

  • Request Body:

    • email: String (required) — The email of the user who wants to subscribe to the newsletter.
  • Success Response:

{
"code": 200,
"message": "Thank you for your subscription",
"data": null,
"meta": []
}
معلومات

Check the following section to learn more about the Newsletter Api Reference