Skip to content

Latest commit

 

History

History
235 lines (181 loc) · 9.18 KB

File metadata and controls

235 lines (181 loc) · 9.18 KB
title Create virtualEventRegistrationCustomQuestion
description Create a registration question for a webinar.
author halleclottey-msft
ms.localizationpriority medium
ms.subservice cloud-communications
doc_type apiPageType
ms.date 08/13/2024

Create virtualEventRegistrationCustomQuestion

Namespace: microsoft.graph

Create a registration question for a webinar.

You can create either a predefined registration question or a custom registration question.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

POST /solutions/virtualEvents/webinars/{webinarId}/registrationConfiguration/questions

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of etiher a virtualEventRegistrationCustomQuestion or a virtualEventRegistrationPredefinedQuestion object.

You can specify the following properties when you create a virtualEventRegistrationCustomQuestion.

Property Type Description
answerChoices String collection Answer choices when answerInputType is singleChoice or multiChoice.
answerInputType virtualEventRegistrationQuestionAnswerInputType Input type of the registration question answer. The supported values are text, multilineText, singleChoice, multiChoice, boolean, and unknownFutureValue.
displayName String Display name of the registration question.
isRequired Boolean Indicates whether an answer to the question is required. Default value is false.

You can specify the following property when you create a virtualEventRegistrationPredefinedQuestion.

Property Type Description
label virtualEventRegistrationPredefinedQuestionLabel Label of the predefined registration question. The following label values accept a single line of text: street, city, state, postalCode, countryOrRegion, industry, jobTitle, organization, and unknownFutureValue.

Response

If successful, this method returns a 201 Created response code and either a virtualEventRegistrationCustomQuestion or virtualEventRegistrationPredefinedQuestion object in the response body.

Examples

Example 1: Add a custom registration question to a webinar registration

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrationConfiguration/questions
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.virtualEventRegistrationCustomQuestion",
  "displayName": "What's your job position?",
  "answerInputType": "multiChoice",
  "answerChoices": [
    "Software Engineer",
    "Engineer Manager",
    "Product Manager"
  ],
}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]




Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-type: application/json

{
  "@odata.type": "#microsoft.graph.virtualEventRegistrationCustomQuestion",
  "id": "f3115d4c-9896-42fc-a649-8ca5e3c3a43f",
  "displayName": "What's your job position?",
  "answerInputType": "multiChoice",
  "answerChoices": [
    "Software Engineer",
    "Engineer Manager",
    "Product Manager"
  ],
  "isRequired": false
}

Example 2: Add a predefined registration question to a webinar registration

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrationConfiguration/questions

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]



Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.virtualEventRegistrationPredefinedQuestion",
  "label": "street"
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-type: application/json

{
  "@odata.type": "#microsoft.graph.virtualEventRegistrationPredefinedQuestion",
  "id": "7a852983-013a-4062-9e97-f784c6a57ec8",
  "label": "street",
  "displayName": "Address",
  "isRequired": false
}