The following API calls are currently available for the ContactCustomField object:
GET LIST - Get a list of all of your contact custom fields.
https://restapi.surveygizmo.com/v5/contactcustomfield
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
page | page=3 | False |
resultsperpage | resultsperpage=100 | False |
Response Example (.json format):
{ "result_ok": true, "data": { "1": { "id": "1", "name": "customer_id", "type": "Number" }, "2": { "id": "2", "name": "subscription_type", "type": "Text" }, "3": { "id": "3", "name": "renewal_date", "type": "Date/Time" } } }
GET CONTACTCUSTOMFIELD - Get information about a specific contact custom field.
https://restapi.surveygizmo.com/v5/contactcustomfield/1
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
page | page=3 | False |
resultsperpage | resultsperpage=100 | False |
Response Example (.json format):
{ "result_ok": true, "data": { "id": "1", "name": "customer_id", "type": "Number" } }
CREATE CONTACTCUSTOMFIELD- Create a new contact custom field.
https://restapi.surveygizmo.com/v5/contactcustomfield?_method=PUT&name=customfield&type=Text
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
name | Contact Custom Field Name (e.g. Customer ID) | True |
type* | Text, Date/Time, Currency, Number, Yes/No | False |
*type will default to Text if not specified
Response Example (.json format):
{ "result_ok": true, "data": { "id": "6", "name": "plan_type", "type": "Text" } }
CHANGE/UPDATE/ADD TO CONTACTCUSTOMFIELD- Update your contact custom field.
https://restapi.surveygizmo.com/v5/contactcustomfield/1?_method=POST&name=updatedname&type=Text
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
name | Contact Custom Field Name (e.g. Customer ID) | True |
type* | Text, Date/Time, Currency, Number, Yes/No | False |
*type will default to Text if not specified
Response Example (.json format):
{ "result_ok": true, "data": { "id": "6", "name": "updatethisfield", "type": "Text" } }
DELETE CONTACTCUSTOMFIELD - Delete a contact custom field.
https://restapi.surveygizmo.com/v5/contactcustomfield/1?_method=DELETE
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
Response Example (.json format):
{ "result_ok": true }