Create New Member - PurposeOpen/Platform GitHub Wiki
POST /api/movements/:movement_id/members(.:format)
Creates a new Member on Platform for given movement id. Note: This is intended to be used from a non-action page join form (for example a join form on the homepage or about page). The movement must have a join page named 'join' set up.
Parameters | |
---|---|
movement_id Mandatory |
Movement Id for which we want to create a new Member |
member[email] Mandatory |
New Member Email Adress |
member[language] Mandatory |
New Member Language ISO Code |
member[opt_in_ip_address] Optional |
IP address of the new member |
member[opt_in_url] Optional |
URL of the page from which the new member subscribed |
t Optional |
Email tracking hash |
Response
Status Code
201
if Successful
422
if Failed
Content
Field | Description |
---|---|
success | Boolean value indicating if member creation succedeed or not |
next_page_identifier | Slug of the page to redirect users after member's creation |
member_id | Created member's internal ID |
errors | Array of error messages (if success=false ) |
Member's fieldsi.e.: first_name, last_name, email, etc. | See Member |
Example Request
POST /api/movements/test-movement/members.json Content-Type: application/x-www-form-urlencoded
member%5Bemail%5D=newmember%40example.com%26member%5Blanguage%5D=en
Example Response
201 (Created) Content-Type: application/json
{"success":true,
"next_page_identifier":1001,
"member_id":123,
"country_iso":null,
"email":"[email protected]",
"first_name":null,
"home_number":null,
"id":123,
"last_name":null,
"mobile_number":null,
"postcode":null,
"street_address":null,
"suburb":null,
}