Skip to main content
ContactsEarnware

Earnware API Post Documentation

Following are instructions for sending a POST payload to the Earnware API.

Your payload can be submitted either as:

  • JSON (application/json) or
  • Form data (x-www-form-urlencoded)

Example Payload (JSON):
{ "userId": "aaaaaaaaaaaaaaaaaaaaaaa", "sourceId": "yourSourceId", "placementId": "yourPlacementId", "email": "user@example.com", "firstName": "Fname", "lastName": "Lname", "regDate": "2017-10-30T22:48:15.092Z", "sourceUrl": "http://www.domain.com/registration-page", "ipAddress": "123.123.123.123", "lists": [ "bbbbbbbbbbbbbbbbbbbbbb", "cccccccccccccccccccccc" ] }

  • Use “lists” if you want to post to a specific list inside your Earnware account.
  • The userId and lists number referenced above are examples only. You’ll need your actual user and list IDs which you can get from an Earnware support team member.

  • Use the sourceId and placementId that you wish to post and keep in mind, you can use one or both of these values as filter criteria to target your desired list using an Earnware Workflow.

CURL EXAMPLE
curl -d '{"userId": "ddddddddddddddddddddddd", "sourceId": "yourSourceId", "placementId": "yourPlacementId", "email": "keith+curl-example@earnware.com", "firstName": "Fname", "lastName": "Lname", "regDate": "2017-10-30T22:48:15.092Z", "sourceUrl": "http://www.domain.com/registration-page", "ipAddress": "123.123.123.123"}' -H "Content-Type: application/json" -X POST https://api.earnware.com/production/contacts

IMPORTANT NOTE:

First, set your endpoint to the development endpoint: https://api.earnware.com/development/contacts

Once you have sent a successful payload, please have the Earnware team confirm receipt of your data. When Earnware verifies receipt, switch over to the production endpoint: https://api.earnware.com/production/contacts