Skip to content

Post subscriber

Subscription with double optin

You can benefit from our double opt-in mechanism by integrating your HTML forms with our API. Your subscribers will immediately receive a confirmation email. In case they don't answer it after a few days, they will receive a reminder aswell. You need to have your Ownpage form key and tracking key. If you have any question please contact us.

1
POST https://services.ownpage.fr/v1/subscribe/TRACKING_KEY

Accepted parameters for a subscriber:

  • email : (mandatory) the user's email address
  • form_key : (mandatory) the form key
  • data_* : you can attach additional data to your subscribers using parameters prefixed by data_. Example : data_firstname
  • update : specify this parameter with value true if you want to update data of an existing user without resending a confirmation email

The number of requests is limited to prevent flooding. The limits are the following: 5 requests/IP/min, up to 10 requests/min. Be wary of that, especially if you have to subscribe your users to different lists (error code 429).

Examples

Subscribe user

Request
1
curl -X POST --header "Content-Type:application/json" --data REQUEST_DATA https://services.ownpage.fr/v1/subscribe/TRACKING_KEY
With REQUEST_DATA
1
2
3
4
5
{
    "form_key": "YOUR FORM KEY",
    "email": "email@ownpage.fr",
    "data_firstname" : "Jean"
}
Response (example)
1
2
3
4
HTTP/1.1 200 OK
{
    "success": "Thank you for registering! You will receive a confirmation email in a few moments. Don't forget to validate your registration."
}
1
2
3
4
5
HTTP/1.1 400 Invalid request
{
    "status": 400,
    "cause": "Invalid request"
}

Update user data

Request
1
curl -X POST --header "Content-Type:application/json" --data REQUEST_DATA https://services.ownpage.fr/v1/subscribe/TRACKING_KEY
With REQUEST_DATA
1
2
3
4
5
6
{
    "form_key": "YOUR FORM KEY",
    "email": "email@ownpage.fr",
    "data_lastname" : "Todt",
    "update": true
}
Response (example)
1
2
3
4
HTTP/1.1 200 OK
{
    "success": "Subscriber has been successfully updated."
}
1
2
3
4
5
HTTP/1.1 400 Invalid request
{
    "status": 400,
    "cause": "Could not update. Unknown subscriber email@ownpage.fr."
}

Comments