Skip to main content
Contacts
Artur Zbiejcik avatar
Written by Artur Zbiejcik
Updated over a week ago

A contact is a record in a user’s database that contains at least an email address and is not associated with any survey in the account.

To add a respondent to a survey, a contact must be created. A contact is a link between the respondent entity and the survey.

Neither contacts nor respondents have to be unique within a user account.

Operations on respondents can be found in the next section called ‘Respondents’

List of operations for a resource

Name

URL

Description

/contacts

Returns a contact list. Contacts are sorted according to the email address, alphabetically.

/contacts/search

Searches contacts according to the criteria specified in the POST table

/contacts/add

Adds contact to the contact list of a logged in user

/contacts/add-offline

Adds contact to the contact list (for offline distribution, the email is not required)

/contacts/group-list

Returns a list of contact groups on the user account.

Description of the response parameters

Name/path

Description

Possible values

id

Contact ID

email

Email address

label1

Value of the first optional label. Label active if defined in the user account.

label2

Value of the second optional label. Label active if defined in the user account.

label3

Value of the third optional label. Label active if defined in the user account.

label4

Value of the fourth optional label. Label active if defined in the user account.

label5

Value of the fifth optional label. Label active if defined in the user account.

label6

Value of the sixth optional label. Label active if defined in the user account.

label7

Value of the seventh optional label. Label active if defined in the user account.

label8

Value of the eighth optional label. Label active if defined in the user account.

label9

Value of the ninth optional label Label active if defined in the user account.

label10

Value of the tenth optional label. Label active if defined in the user account.

label11

Value of the eleventh optional. label Label active if defined in the user account.

label12

Value of the twelfth optional label. Label active if defined in the user account.

label13

Value of the thirteenth optional label. Label active if defined in the user account.

label14

Value of the fourteenth optional label. Label active if defined in the user account.

label15

Value of the fifteenth optional label. Label active if defined in the user account.

Contact list

URL

(GET) https://www.startquestion.com/api/v2/contacts

Optional parameters (POST)

Name

Description

id_group

Contact group ID

limit

Limit for the number of fillings

offset

Offset for the list

Sample response

{
"total":"20",
"list":[{
"id":100824,
"email":"jan@kowalski.pl",
"label1":"Jan",
"label2":"Kowalski",
"label3":"600 700 800",
"label4":"",
"label5":""
},{
...
}]
}

Returned errors

  • 401 Unauthorized – If the user refers to a foreign resource

  • 404 Not Found – If a group with the specified: id_group was not found.

  • 404 Not Found – If no contacts were found.

Contact search

URL

(GET) https://www.startquestion.com/api/v2/contacts

Optional parameters (POST)

Name

Description

limit

Limit for the number of fillings

offset

Offset for the list

email

Searching for a respondent by email address

label1

Searching for a respondent by label 1 value

label2

Searching for a respondent by label 2 value

label3

Searching for a respondent by label 3 value

label4

Searching for a respondent by label 4 value

label5

Searching for a respondent by label 5 value

label6

Searching for a respondent by label 6 value

label7

Searching for a respondent by label 7 value

label8

Searching for a respondent by label 8 value

label9

Searching for a respondent by label 9 value

label10

Searching for a respondent by label 10 value

Sample response

{
"total":"20",
"list":[{
"id":100824,
"email":"jan@kowalski.pl",
"label1":"Jan",
"label2":"Kowalski",
"label3":"600 700 800",
"label4":"",
"label5":""
},{
...
}]
}

Returned errors

  • 401 Unauthorized – If the user refers to a foreign resource

Adding contacts

URL

(GET) https://www.startquestion.com/api/v2/contacts/add

Parameters (POST)

Name

Description

email

Email address (mandatory parameter)

id_group

ID of the group to which the contact will be added. Optional parameter

label1

Label 1 value

label2

Label 2 value

label3

Label 3 value

label4

Label 4 value

label5

Label 5 value

label6

Label 6 value

label7

Label 7 value

label8

Label 8 value

label9

Label 9 value

label10

Label 10 value

label11

Label 11 value

label12

Label 12 value

label13

Label 13 value

label14

Label 14 value

label15

Label 15 value

Sample response

{ 
"id_contact":"149768"
}

Returned errors

  • 406 Not Acceptable – If mandatory parameters were not specified.

Adding offline contacts (without email address)

URL

(GET) https://www.startquestion.com/api/v2/contacts/add

Parameters (POST)

Name

Description

user_token

User token (mandatory parameter)

id_group

ID of the group to which the contact will be added. Optional parameter

label1

Label 1 value

label2

Label 2 value

label3

Label 3 value

label4

Label 4 value

label5

Label 5 value

label6

Label 6 value

label7

Label 7 value

label8

Label 8 value

label9

Label 9 value

label10

Label 10 value

label11

Label 11 value

label12

Label 12 value

label13

Label 13 value

label14

Label 14 value

label15

Label 15 value

Sample response

{ 
"id_contact":"149768"
}

Returned errors

  • 406 Not Acceptable – If mandatory parameters were not specified.

Contact group list

URL

(GET) https://www.startquestion.com/api/v2/contacts/group-list

Sample response

[
{
"id":9,
"name":"Pracownicy"
},
{
"id":15,
"name":"Klienci"
}
]

Returned errors

None

Did this answer your question?