Creating new meetings
Using the 24sessions API you can create new meetings by sending a POST request to the /meetings endpoint.
Creating new meetings through our API is useful when
- Creating booking forms with a customized user interface
- Combining data from different sources when creating the meeting. For example, if you create meetings from a logged in environment, there is no need to type in user information twice
- Making the video-call journey integrated to other journeys, such as office visit
- Applying custom logic to the user journey. For example, you could allow the user to select a meeting type or select a meeting type automatically based on answers to different fiels
∞ Step 1: Fetch access token
Before every API request, we recommend fetching the access token. The access token is valid for one hour, so you can also consider storing it for that time period.
For fetching the access token, please refer to this article.
∞ Step 2: Create the meeting
For creating the meeting, you will need to create a POST request to the /meetings endpoint.
As authorization, use the token from step 1. You can add this as a Bearer token as a header to the request.
Add the meeting details in the body of the API request. For recognizing the user, the ID of the user is required. We recommend sending only the ID of the user in the request. The below body is the minimum information required to create a meeting.
{
"date": "2021-11-18T14:00:00+00:00",
"status": "scheduled",
"description": "Some optional description of the meeting context (purposes, topics etc.)",
"user": {
"@id": "/users/123"
},
"guest": {
"name": "Guest Person",
"email": "guest.person@example.com"
},
"type": {
"@id": "/meeting_types/2"
}
}
24sessions offers the possibility to send multiple email notifications for the user and the guest. The user is the host of the meeting.
When scheduling a meeting, it is a good practice to send a confirmation email to the user and to the guest. The confirmation email includes typically meeting information, an ICS file to add the meeting to a calendar, and a link to join the meeting.
Please note, when creating a meeting through the 24sessions API, the meeting confirmation email is not automatically sent. To send the confirmation email, please use the /notifications endpoint. The following emails, such as reminders, are sent automatically.
∞ Step 3: Response
As the response, you will receive all meeting details upon successful creation of the meeting. You will need this response in the next tutorial where we join meetings.