Pro Account Feature
Calendar's REST APIs support the use of API Keys. An API Key allows you to use another method of authentication separate from your account username and password. API Keys add an additional layer of security for your account and can be assigned specific permission to limit which areas of your account they may be used to access. Access to your API key can also be limited to specific IP addresses. Unauthenticated requests will return an HTTP 401 response.
The API keys can be obtained in Workspace > Settings > Integrations > Round Robin API.
To use API keys, you must set a plain text header named "Authorization" with the contents of the header being "Bearer XXX" where XXX is your API Key.
Example:
POST https://gateway.api.calendar.com/e/v1/auto-schedule?timeslot=your_timeslot_id_here Authorization: Bearer your_api_key_here
Curl Example:
curl -X "POST" 'https://gateway.api.calendar.com/e/v1/auto-schedule? timeslot=your_timeslot_id_here' —header 'Content-Type: application/json' —header 'Authorization: Bearer your_api_key_here' —data-raw '{ "schedule_date": "2021-04-08 18:00:00", "timezone": "America/Los_Angeles", "schedulers": [{ "fist_name": "Sun", "last_name": "Tzu", "email": "suntzu@company.com" }] }'
Body Details:
{ "timezone": "America/Los_Angeles", "schedule_date": "2021-04-18 18:00:00", "duration_minutes": 60, "schedulers": [ { "first_name": "Sun", "last_name": "Tzu", "email": "suntzu@company.com" } ], "guest_emails": [ "guest1@company.com", "guest2@company.com" ], "description": "Message associated with the event." }
Field details:
- The only required fields are timezone, email, and first_name.
- The timezone is expected to use the IANA Time Zone Database name, for example ‘America/Los_Angeles’. Reference: https://www.iana.org/time-zones.
- The schedule_date (optional) should be in the format of YYYY-MM-DD HH:MM:SS. [HH] refers to a zero-padded hour between 00 and 23. Example: 2021-04-18 17:30:00. The time will be the earliest time a meeting can be booked for the timeslot on a given day.
- The duration_minutes (optional) should be an integer representing the length of the meeting in minutes.
- The guest_emails (optional) should be a list of quoted emails comma separated. For example: ["guest1@company.com", "guest2@company.com"].
- The description (optional) should be a text format message associated with the event.
Comments
0 comments
Please sign in to leave a comment.