Python Example

ⓘ This example is purely and solely for example purposes and is by no mean production ready. If you have written a library based on our API please  keep in touch.

Find below an example of using Python to subscribe an email address.

import requests

base_url = "https://maitreapp.co/api/v1/list/subscribe"
payload = {
  api_token: "YOUR_API_TOKEN",
  uuid: "YOUR_LIST_UUID",
  hosting_url: "YOUR_HOSTING_URL",
  email: "support@maitreapp.co"
}

response = requests.post( base_url, data = payload )

if response["status"] == "ok"
  // Email successful subscribed
else
  // Handle error
end

Still need help? Contact Us Contact Us