| title | Create virtualEventTownhall |
|---|---|
| description | Create a new virtualEventTownhall object in draft mode. |
| author | frankpeng7 |
| ms.localizationpriority | medium |
| ms.subservice | cloud-communications |
| doc_type | apiPageType |
| ms.date | 08/08/2024 |
Namespace: microsoft.graph
Create a new virtualEventTownhall object in draft mode.
[!INCLUDE national-cloud-support]
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]
POST /solutions/virtualEvents/townhalls| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
In the request body, supply a JSON representation of the supported derived types of virtualEventTownhall object.
You can specify the following properties when you create a virtualEventTownhall.
| Property | Type | Description |
|---|---|---|
| audience | meetingAudience | The audience to whom the town hall is visible. The possible values are: everyone, organization, and unknownFutureValue. |
| coOrganizers | communicationsUserIdentity collection | The identity information of coorganizers of the town hall. |
| description | itemBody | A description of the town hall. |
| displayName | String | Display name of the town hall. |
| endDateTime | dateTimeTimeZone | The date and time when the town hall ends. |
| invitedAttendees | identity collection | The identities of the attendees invited to the town hall. The supported identities are: communicationsGuestIdentity and communicationsUserIdentity. |
| isInviteOnly | Boolean | Indicates whether the town hall is only open to invited people and groups within your organization. The isInviteOnly property can only be true if the value of the audience property is set to organization. |
| settings | virtualEventSettings | The virtual event settings. |
| startDateTime | dateTimeTimeZone | The date and time when the town hall starts. |
If successful, this method returns a 201 Created response code and a virtualEventTownhall object in the response body.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/solutions/virtualEvents/townhalls
Content-Type: application/json
{
"displayName": "The Impact of Tech on Our Lives",
"description": {
"contentType": "text",
"content": "Discusses how technology has changed the way we communicate."
},
"startDateTime": {
"dateTime": "2023-03-30T10:00:00",
"timeZone": "Pacific Standard Time"
},
"endDateTime": {
"dateTime": "2023-03-30T17:00:00",
"timeZone": "Pacific Standard Time"
},
"audience": "organization",
"coOrganizers": [
{
"id": "7b7e1acd-a3e0-4533-8c1d-c1a4ca0b2e2b",
"tenantId": "77229959-e479-4a73-b6e0-ddac27be315c"
}
],
"settings": {
"isAttendeeEmailNotificationEnabled": false
}
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
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
{
"id": "bce9a3ca-a310-48fa-baf3-1cedcd04bb3f@4aa05bcc-1cac-4a83-a9ae-0db84b88f4ba",
"status": "draft",
"displayName": "The Impact of Tech on Our Lives",
"description": {
"contentType": "text",
"content": "Discusses how technology has changed the way we communicate."
},
"startDateTime": {
"dateTime": "2023-03-30T10:00:00",
"timeZone": "Pacific Standard Time"
},
"endDateTime": {
"dateTime": "2023-03-30T17:00:00",
"timeZone": "Pacific Standard Time"
},
"audience": "organization",
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "b7ef013a-c73c-4ec7-8ccb-e56290f45f68",
"displayName": "Diane Demoss",
"tenantId": "77229959-e479-4a73-b6e0-ddac27be315c"
}
},
"coOrganizers": [
{
"id": "7b7e1acd-a3e0-4533-8c1d-c1a4ca0b2e2b",
"displayName": "Kenneth Brown",
"tenantId": "77229959-e479-4a73-b6e0-ddac27be315c"
}
],
"settings": {
"isAttendeeEmailNotificationEnabled": false
},
"invitedAttendees": [],
"isInviteOnly": false,
"externalEventInformation": []
}