Using Questions

Questions are used to collect information from an Attendee during the ticket purchase checkout process. There are two types of questions in Eventbrite:

  • Default Questions. For example first name, last name and email address.
  • Custom Questions. Questions and answers unique to the account and/or Event and created by the User. For example, to require the acknowledgement of terms and conditions as part of the ticket purchase process.

Working with the Eventbrite API, you can get a list of an Event's default and custom questions, display a list of the answers Attendees supplied to an Event's questions, and create custom questions for an Event.


Authenticating Your Access to the Eventbrite API

You must first authenticate your access to the Eventbrite API before using questions. To learn how, refer to Authenticating Your Access.


Getting Information on an Event's Default Questions

You can get a list of default questions for an Event by using the following URL

curl -X GET   https://www.eventbriteapi.com/v3/events/{event_id}/canned_questions/  -H 'Authorization: Bearer PERSONAL_OAUTH_TOKEN' 

This API call returns an array of Question objects as a paginated response, for example

{
    "pagination": {
        "object_count": 3,
        "page_number": 1,
        "page_size": 10000,
        "page_count": 1,
        "has_more_items": false
    },
    "questions": [
        {
            "resource_uri": "https://www.eventbriteapi.com/v3/events/12345/questions/first_name/",
            "id": "first_name",
            "question": {
                "text": "First Name",
                "html": "First Name"
            },
            "type": "text",
            "required": true,
            "choices": [],
            "ticket_classes": [],
            "group_id": "contact_information",
            "respondent": "ticket_buyer",
            "default_value": ""
        },
        {
            "resource_uri": "https://www.eventbriteapi.com/v3/events/12345/questions/last_name/",
            "id": "last_name",
            "question": {
                "text": "Last Name",
                "html": "Last Name"
            },
            "type": "text",
            "required": true,
            "choices": [],
            "ticket_classes": [],
            "group_id": "contact_information",
            "respondent": "ticket_buyer",
            "default_value": ""
        },
        {
            "resource_uri": "https://www.eventbriteapi.com/v3/events/12345/questions/email/",
            "id": "email",
            "question": {
                "text": "Email",
                "html": "Email"
            },
            "type": "email",
            "required": true,
            "choices": [],
            "ticket_classes": [],
            "group_id": "contact_information",
            "respondent": "ticket_buyer",
            "default_value": ""
        }
    ]
}

Getting Information on an Event's Custom Questions

If an Event has custom questions, you can display a list of those custom questions using this API call

curl -X GET   https://www.eventbriteapi.com/v3/events/{event_id}/questions/   -H 'Authorization: Bearer PERSONAL_OAUTH_TOKEN' 

This API call returns an array of Question objects as a paginated response, for example

{
  "pagination": {
    ...
  },
  "questions": [
    {
      "resource_uri": "https://www.eventbriteapi.com/v3/events/12345/questions/642123456/",
      "id": "642123456",
      "question": {
        "text": "Ticketing Terms of Service: I acknowledge that...",
        "html": "Ticketing Terms of Service: I acknowledge that..."
      },
      "type": "checkbox",
      "required": true,
      "choices": [
        {
          "answer": {
            "text": "yes",
            "html": "yes"
          },
          "id": "231231",
          "subquestion_ids": []
        }
      ],
      "ticket_classes": [],
      "respondent": "attendee"
    },
    ...
  ]
}

Getting a List of Answers to Default and Custom Questions

Answers to Questions are in Attendee object. You can get a list of the answers supplied by Event Attendees to default and custom questions using this GET request URL

curl -X GET   https://www.eventbriteapi.com/v3/events/{event_id}/attendees/   -H 'Authorization: Bearer PERSONAL_OAUTH_TOKEN' 

The result is an array object nested in the Attendee object. For default questions, the answers are in the 'profile' attribute; for custom questions the answers are in the 'answers' attribute.

Example response of answers to default questions

{
    "pagination": {
        ...
    },
    "attendees": [
        {
           ...
            "profile": {
                "first_name": "Kennedy",
                "last_name": "Singleton",
                "email": "kennedy@gmail.com",
               ...
            },
            ...
        },
        ...
    ]
}

Example response of an answer to a custom Question

{
    "pagination": {
        ...
    },
    "attendees": [
        {
           ...
             "answers": [
                {
                    "answer": "Eventbrite!",
                    "question": "What's your company?",
                    "type": "text",
                    "question_id": "123123"
                },
            ],
            ...
        },
        ...
    ]
}

Creating Custom Questions

Creating a custom question for an Event requires one API request. In this example, we are creating a required checkbox question for ticket class 1234.

curl -X POST   https://www.eventbriteapi.com/v3/events/{event_id}/questions/   -H 'Authorization: Bearer PERSONAL_OAUTH_TOKEN'   -H "Accept: application/json"
  -d '{
        "question": {
          "question": {
            "html": "Ticketing Terms of Service: I acknowledge that..."
          },
          "required": true,
          "type": "checkbox",
          "choices": [
            {
              "answer": {
                "html": "yes"
              }
            }
          ],
          "ticket_classes": [
            {
              "id": "1234"
            }
          ]
        }
      }'

When creating a custom question, you need to specify the question type and the user required to answer a question, as explained below.

Specifying the Custom Question Type

Eventbrite allows you to create custom questions of various types. These question types are checkbox, dropdown, text, radio, or waiver.

For the waiver question type, use the question.waiver attribute to show the wavier content.

The question types checkbox, dropdown, and radio are considered multiple choice questions, meaning that the Attendee selects the answer from a set of answer options. For these question types you need to include the question.choices attribute. The format to create a multiple choice custom question is:

{
        "question": {
          ...
          "choices":[
            {
                “answer”:{
                  “html”:“Choice goes here...”
                }
            },
            {
                “answer”:{
                  “html”:“Another choice goes here...”
                }
            }
          ],
         ...
        }
      }

Identifying the User Required to Answer a Question

Because default and custom questions can be answered either by the Order Owner or by each Attendee, you must specify the question.respondent attribute in the Question object when creating a question as either

ValueDescription
ticket_buyerOrder owner required to answer questions once during the ticket checkout process.
attendeeEach Attendee required to answer questions during the checkout process.

Next steps

These are the next articles to continue with your building

Working with Orders

Obtaining Attendee Information