Surveys are used to collect feedback from contacts or anonymous users.

Survey object

Attributes:

id string
Unique identifier.

type string

Type of survey. Allowed values: customer, employee, embed

count integer
Amount of answers in the survey.

name string
User defined name of the survey.

created_at ISO 8601 with timezone
Time when the object was created.

updated_at ISO 8601 with timezone
Time of last action performed on the object.

deleted_at ISO 8601 with timezone or null
If the object was deleted, time of the last deletion.

{
"id": "kcSBv12f",
"type": "customer",
"count": 175,
"name": "Customer survey",
"created_at": "2021-03-26T13:13:19.972Z",
"updated_at": "2021-04-19T19:57:31.122Z",
"deleted_at": null
}

Getting Surveys

GET /surveys

Body attributes:

type string
Type of surveys to retrieve. Allowed values: customer, employee, embed

offset integer (optional)
You will get only first 1000 surveys, when you want the next 1000 surveys use offset 1000 and so on.

{
"type": "customer"
}

Returning

An array of Survey objects.

Getting Surveys

GET /survey/:survey_id

Returning

Fields contains the available fields.

Example:

{
"id": "ack1fc9cx",
"name": "SaaS product NPS",
"organization_id": "masc1XO6",
"type": "customer",
"status": "open",
"fields": [
{
"name": "nps",
"type": "nps",
"label": "How likely are you to recommend our online service to a friend or colleague?"
},
{
"name": "feedback",
"type": "comment",
"label": "What is the primary reason for your score?"
},
{
"name": "comment",
"type": "comment",
"label": "Can we publish your feedback on our website and social media?",
"description": "You can edit your public comment here."
},
{
"name": "noPublicConsent",
"type": "checkbox",
"label": "I don't want to publish my feedback"
},
{
"name": "custom.l7-TsIClE",
"type": "content",
"label": "Thanks and review"
}
]
}

Did this answer your question?