This API adds or updates user. You can then use this data for survey targeting.

POST https://app.satismeter.com/api/users

Request Headers: 

Content-Type: application/json

Request Body:

{
  "userId": "007",
  "traits": {
    "name": "James Bond",
    "email": "007@sis.gov.uk",
    "createdAt": "2015-06-16T09:19:47.155Z",
    "plan": "Gold"
  },
  "writeKey": "WRITE_KEY"
}
  • Replace the WRITE_KEY above with your real write key (see Integration Settings / API)

Optional: Change next survey date for a user

You can change the date when the survey is shown to a make sure someone is surveyed earlier/later than based on the targeting rules.

Request Body:

{
  "userId": "007",
  "writeKey": "WRITE_KEY",
  "surveyDate": "2100-01-01T00:00:00.000Z"
}

Did this answer your question?