π’Events
Microsoft Outlook Calendar Events
Get All Events From a Calendar
GET https://api.pyas.io/microsoft/events
Query Parameters
calendarId*
String
The id of the Microsoft Outlook calendar
accountId*
String
The user's Pyas account id. This is returned when you connect an account to Pyas.
startDate
Date String
Filter events from a start date
(ex: 01-01-2022)
endDate
Date String
Filter events up to an end date
(ex: 01-01-2023)
search
String
Free text search to filter events based on the subject field.
nextPageToken
String
Token string used to get the next page of results (paginate)
maxResults
Integer
Max number of results to
return per page
$expand
String
query to include single or multi value extended properties on events that have an extended property.
More Info
Ex: $expand=singleValueExtendedProperties($filter=id eq '{id_value}')
$filter
String
query to filter events by single or multi extended properties. More Info
Ex:
$filter=singleValueExtendedProperties/Any(ep: ep/id eq '{id_value}' and ep/value eq '{property_value}'
Headers
x-api-key*
String
API key
{
"success": true,
"data": {
"count": 1,
"events": [
{
"@odata.etag": "W/\"some-id\"",
"id": "some-event-id",
"createdDateTime": "2023-04-06T21:48:43.8341359Z",
"lastModifiedDateTime": "2023-04-06T21:48:44.2375882Z",
"changeKey": "some-key",
"categories": [],
"transactionId": null,
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"iCalUId": "some-id",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "Example Event",
"bodyPreview": "This is an appoinemtment test",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.live.com/owa/?itemid=some-event-id&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"isOnlineMeeting": false,
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n</head>\r\n<body>\r\nThis is an appoinemtment test\r\n</body>\r\n</html>\r\n"
},
"start": {
"dateTime": "2023-04-06T21:48:42.3800000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2023-04-06T22:18:42.3800000",
"timeZone": "UTC"
},
"location": {
"displayName": "712 Applesauce Rd",
"locationUri": "",
"locationType": "default",
"uniqueId": "712 Applesauce Rd",
"uniqueIdType": "private",
"address": {
"street": "712 Applesauce Rd",
"city": "Austin",
"state": "TX",
"countryOrRegion": "USA",
"postalCode": "73301"
},
"coordinates": {}
},
"locations": [
{
"displayName": "712 Applesauce Rd",
"locationUri": "",
"locationType": "default",
"uniqueId": "712 Applesauce Rd",
"uniqueIdType": "private",
"address": {
"street": "712 Applesauce Rd",
"city": "Austin",
"state": "TX",
"countryOrRegion": "USA",
"postalCode": "73301"
},
"coordinates": {}
}
],
"recurrence": null,
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Jane Doe",
"address": "[email protected]"
}
}
],
"organizer": {
"emailAddress": {
"name": "John Doe",
"address": "[email protected]"
}
},
"onlineMeeting": null,
"[email protected]": "https://graph.microsoft.com/v1.0/users('[email protected]')/calendars('some-id')/$ref",
"[email protected]": "https://graph.microsoft.com/v1.0/users('[email protected]')/calendars('some-id')"
}
],
"nextPageToken": null
}
}Get Event by ID
GET https://api.pyas.io/microsoft/events/{id}
Gets a calendar event by id
Path Parameters
{id}*
String
The event id
Query Parameters
calendarId*
String
The Microsoft Outlook Calendar id
accountId*
String
The user's Pyas account id. This is returned when you connect an account to Pyas.
Headers
x-api-key*
String
API key
Create Event
POST https://api.pyas.io/microsoft/events
Creates a calendar event
Headers
x-api-key*
String
API key
Request Body
accountId*
String
The user's Pyas account id. This is returned when you connect an account to Pyas.
calendarId*
String
The Microsoft calendar id
eventData.title*
String
The event title
eventData.description*
String
Event description
eventData.startDate*
DateTime
RFC3339 Timestamp
eventData.endDate*
DateTime
RFC3339 Timestamp
eventData.timeZone
String
Time Zone in IANA format
eventData.phone
String
Phone number
eventData.phonePin
String
Optional pin if one is required to join the meeting
eventData.meta
Object
Optional. Use this to add additional/extra event body fields.
Event Data Object Example:
Event Location Object Example:
Attendee Object Example:
Event Conferencing Object:
Event Data With Zoom Conferencing Example:
Event Data With Teams Conferencing Example:
**Important: In order for Microsoft Teams conferencing to be automatically generated with the calendar event, users must have Teams enabled as their Default Online Meeting Provider or be part of their Allowed Online Meeting Providers list in Outlook.
Recurrence Object:
Here's an example of a recurrence object for a meeting that repeats weekly every Wednesday:
Event Data Meta Object Example
More request body fields from the official Microsoft Docs can be found here: https://learn.microsoft.com/en-us/graph/api/resources/event?view=graph-rest-1.0
Simply include the extra fields you need to eventData.meta like in the example below.
Note: eventData.meta should only be used to include fields that aren't already a part of the standard body fields in the eventData object.
Example EventData with Meta Object
Example EventData with Extended Properties
Update Event
PATCH https://api.pyas.io/microsoft/events/{id}
Updates an Existing Event
Path Parameters
{id}*
String
The event ID
Headers
x-api-key*
String
API Key
Request Body
accountId*
String
The user's Pyas account id. This is returned when you connect an account to Pyas.
calendarId*
String
The Microsoft calendar id
eventData*
Object
Event data object with the fields to update. See the Example Update Event Date Object below.
eventData.meta
Object
Optional. Additional fields to include in the update request. See the Event Data Meta Object above.
Update Event Data Object Example:
Delete Event
DELETE https://api.pyas.io/microsoft/events/{id}
Deletes an existing event
Path Parameters
{id}*
String
The event ID
Query Parameters
accountId
String
The user's Pyas account id. This is returned when you connect an account to Pyas.
calendarId*
String
The Microsoft Outlook calendar ID
Headers
x-api-key*
String
API Key
Last updated