{"id":139,"date":"2016-10-17T17:42:37","date_gmt":"2016-10-17T17:42:37","guid":{"rendered":"http:\/\/themayesfamily.com\/blogs\/b\/?p=139"},"modified":"2017-02-24T18:53:39","modified_gmt":"2017-02-24T18:53:39","slug":"eventbrite-api-creating-custom-survey-questions-via-api","status":"publish","type":"post","link":"https:\/\/themayesfamily.com\/blogs\/b\/2016\/10\/17\/eventbrite-api-creating-custom-survey-questions-via-api\/","title":{"rendered":"Eventbrite API &#8211; Creating Custom Survey Questions via API"},"content":{"rendered":"<p>Here is a code snippet using cURL to post to the Eventbrite REST API and add a custom survey question to your event.<\/p>\n<div><b>Get Custom Questions:<\/b><\/div>\n<pre>curl -X GET -H \"Authorization: Bearer \u00a0<span style=\"color: #0000ff;\">[API TOKEN HERE]<\/span>\" -H \"Cache-Control: no-cache\" -H \"<a href=\"https:\/\/www.eventbriteapi.com\/v3\/events\/\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=en&amp;q=https:\/\/www.eventbriteapi.com\/v3\/events\/&amp;source=gmail&amp;ust=1476812274919000&amp;usg=AFQjCNFoISkcdSn2DaseXj8p2mWwLvwbmw\">https:\/\/www.eventbriteapi.<wbr \/>com\/v3\/events\/<\/a>[EVENT ID HERE]\/questions\/?is_owner=1\"<\/pre>\n<div><b>Get Specific Question:<\/b><\/p>\n<pre>curl -X GET -H \"Authorization: Bearer \u00a0<span style=\"color: #0000ff;\">[API TOKEN HERE]<\/span>\" -H \"Cache-Control: no-cache\" -H \"<a href=\"https:\/\/www.eventbriteapi.com\/v3\/events\/\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=en&amp;q=https:\/\/www.eventbriteapi.com\/v3\/events\/&amp;source=gmail&amp;ust=1476812274919000&amp;usg=AFQjCNFoISkcdSn2DaseXj8p2mWwLvwbmw\">https:\/\/www.eventbriteapi.<wbr \/>com\/v3\/events\/<\/a>[EVENT ID HERE]\/questions\/<span style=\"color: #0000ff;\">[!!---question_id--!!]<\/span>\/\"<\/pre>\n<\/div>\n<div><b>Set Custom Question:<\/b><\/div>\n<pre>curl -X POST -H \"Authorization: Bearer <span style=\"color: #0000ff;\">[API TOKEN HERE]<\/span>\" -H \"Content-Type: application\/json\" -H \"Cache-Control: no-cache\" -H -d '{\r\n\u00a0 \u00a0 \"question\": {\r\n\u00a0 \u00a0     \"question\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0     \"html\": \"Another Question - What should it be?\"\r\n\u00a0 \u00a0     },\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"required\": true,\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"choices\": [],\r\n\u00a0 \u00a0 \u00a0 \u00a0 \"ticket_classes\": [], \r\n\u00a0 \u00a0 \u00a0 \u00a0 \"respondent\": \"attendee\"\r\n\u00a0 \u00a0 }\r\n}' \"<a href=\"https:\/\/www.eventbriteapi.com\/v3\/events\/\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=en&amp;q=https:\/\/www.eventbriteapi.com\/v3\/events\/&amp;source=gmail&amp;ust=1476812274919000&amp;usg=AFQjCNFoISkcdSn2DaseXj8p2mWwLvwbmw\">https:\/\/www.eventbriteapi.<wbr \/>com\/v3\/events\/<\/a><span style=\"color: #0000ff;\">[EVENT ID HERE]<\/span>\/questions\/\"<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here is a code snippet using cURL to post to the Eventbrite REST API and add a custom survey question to your event. Get Custom Questions: curl -X GET -H &#8220;Authorization: Bearer \u00a0[API TOKEN HERE]&#8221; -H &#8220;Cache-Control: no-cache&#8221; -H &#8220;https:\/\/www.eventbriteapi.com\/v3\/events\/[EVENT ID HERE]\/questions\/?is_owner=1&#8221; Get Specific Question: curl -X GET -H &#8220;Authorization: Bearer \u00a0[API TOKEN HERE]&#8221; -H &hellip; <a href=\"https:\/\/themayesfamily.com\/blogs\/b\/2016\/10\/17\/eventbrite-api-creating-custom-survey-questions-via-api\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Eventbrite API &#8211; Creating Custom Survey Questions via API&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[60,59,64],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-eventbrite","tag-api","tag-eventbrite","tag-rest"],"_links":{"self":[{"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":5,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":154,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/posts\/139\/revisions\/154"}],"wp:attachment":[{"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}