Articles on: Developers

Surveys (developers)

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


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)

By default, you'll only get the 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


Survey structure that can be used to see which fields represent what in the answers. Fields contains the available fields.


{    
	"id": "ack1fc9cx",
    "name": "SaaS product NPS",
    "organization_id": "masc1XO6",
    "type": "customer",
    "status": "open",
    "fields": [        
    	{           
        	"name": "nps",
           	"webhook_name": "nps",
           	"type": "nps",
            "label": "How likely are you to recommend our online service to a friend or colleague?"
         },
         {            
            "name": "feedback",
            "webhook_name": "feedback",
            "type": "comment",
            "label": "What is the primary reason for your score?"
         },


Updated on: 28/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!