/subscribe

Use the /subscribe endpoint to subscribe people to your list. 90% of the times, this is what you're looking for.

A confirmation email will be sent to subscribers to verify the email address. Make sure to inform them!

Example URI
https://maitreapp.co/api/v1/list/subscribe?uuid=XXX&api_token=YYY&email=john.doe@email.com&hosting_url=http://example.com


URI Parameters

uuid string
(required) Your widget UUID.

api_token string
(required) Your api_token.

email string
(required) Your subscriber's email.

hosting_url string
(required) We use this url to create the referral link your users will share. This is usually the url of the page where you have installed Maître.

name string
(optional) Your subscriber's name.

test_mode boolean
(optional) If set to true, the response will contain fake data and neither views nor registrations will be saved. Use this feature to test your integration before you go live without inflating your analytics.

points integer
(optional) Number of points you assign to the subscriber. Maître uses 'points' to calculate the subscriber's position in the list. By default is  1.

referral_points integer
(optional) Number of initial points you assign to the subscriber's referrer. If the subscriber has been referred by someone you can give this person an arbitrary number of points. By default Maître gives  1 point for a successful referral.

referral string
(optional) The referrer's code. We use this code to attribute the referral to the subscriber with that specific referral code.

source string
(optional) Source of the visit. Use it to attribute the visit and the conversion to a specific marketing channel (eg: facebook ads). Maître will automatically create beautiful reports about visits and conversions for each source in your Analytics page.

device string
(optional) Subscriber's Device. Use it to attribute the visit and the conversion to a specific device. Possible values are:  mobiletablet and desktop. Maître will automatically create beautiful reports about visits and conversions for each device in your Analytics page.


Response

200  success

{
  status: "ok",
  data: {
    response: "subscriber_created",
    name: "John",
    email: "john.doe@email.com",
    code: "MFXXXX",
    position: 3543
  }
  calls_left: 482, //Api calls left for this hour
  timestamp: 1469109759 //Timestamp request
}

4XX error

{
  status: "error",
  message: "Error explanation" // Eg: "Missing API token"
  code: "error_code" // Eg: no_token
}

Possible error codes

  • no_token
  • no_list_uuid
  • invalid_list_or_token
  • no_email_address
  • invalid_email_address
  • no_hosting_url
  • subscriber_already_exists
  • too_many_calls

Still need help? Contact Us Contact Us