Skip to main content
ContactsEarnware

Earnware API Post Documentation

By June 17, 2019August 18th, 2021No Comments

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

Development Endpoint:
https://api.earnware.com/development/contacts

Production Endpoint:
https://api.earnware.com/production/contacts

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.

Your payload can be submitted either as:

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

Once you have sent a successful payload, please have the Earnware team confirm receipt of your data. Once receipt has been verified, switch over to the production endpoint.

 

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