{"errors": [ {"msg":"a calendar id is required.","param":"calendarId","location":"query" } ]}
{"errors": [ {"msg":"an account id is required.","param":"accountId","location":"query" } ]}
{"errors": [ {"msg":"an account id is required.","param":"accountId","location":"query" }, {"msg":"a calendar id is required.","param":"calendarId","location":"query" } ]}
{"success":false,"error":"Invalid account id. Account Not Found","code":404}
{"success":false,"error":"Not Found","code":404}
Get Event by ID
GEThttps://api.pyas.io/microsoft/events/{id}
Gets a calendar event by id
Path Parameters
Name
Type
Description
{id}*
String
The event id
Query Parameters
Name
Type
Description
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.
{"errors": [ {"msg":"calendar id is required","param":"calendarId","location":"query" }, {"msg":"calendar id must be a string","param":"calendarId","location":"query" } ]}
{"success":false,"error":"Not Found","code":404}
{"success":false,"error":"Invalid account id. Account Not Found","code":404}
Create Event
POSThttps://api.pyas.io/microsoft/events
Creates a calendar event
Headers
Name
Type
Description
x-api-key*
String
API key
Request Body
Name
Type
Description
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
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.location
Object
eventData.attendees
Array
eventData.conferencing
Object
eventData.phone
String
Phone number
eventData.phonePin
String
Optional pin if one is required to join the meeting
eventData.recurrence
Object
eventData.meta
Object
Optional. Use this to add additional/extra event body fields.
{"success":false,"error":"Invalid account id. Account Not Found","code":404}
{"success":false,"error":"Not Found","code":404}
{"errors": [ {"value": {"description":"example","startDate":"2023-03-06T23:12:25.069Z","endDate":"2023-03-06T23:42:25.069Z","timeZone":"America/New_York","location": {"street":"712 Applesauce Rd","city":"Austin","state":"TX","zipCode":"73301","country":"USA" },"attendees": [ {"name":"Jane Doe","email":"example@gmail.com" } ] },"msg":"eventData.title is required and must be a string","param":"eventData","location":"body" } ]}
Event Data Object Example:
{"title":"Example Event",// String - Required."description":"example",// String - Required."startDate":"2023-03-06T22:51:08.434Z",// RFC3339 timestamp - Required."endDate":"2023-03-06T23:21:08.434Z",// RFC3339 timestamp - Required."timeZone":"America/New_York",// IANA Time Zone format - Optional."location": {"street":"712 Applesauce Rd","city":"Austin","state":"TX","zipCode":"73301","country":"USA" },// Object - Optional. (required when creating an event with a physocal location)"attendees": [ {"name":"Jane Doe","email":"example@gmail.com" } ] // Required."phone": ""// string - Optional. Use if the meeting will be over phone"onlineMeetingUrl": ""// string - Optional. (Use this if you have an already generated conferencing url, like a Google Meet url for example)}
{"provider": string,// Required. Possible values: "zoom", "teams""accountId": string,// Optional. - Only Required if provider = zoom. This is the ID for the connected Zoom account in Pyas."waitingRoom": boolean // Optional. - Only Required if provider = zoom}
**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.
{ type: string // daily, weekly, or monthly - Required. interval: number|string // Define the interval at which the meeting should recur. (ex. 2 for every two weeks with type of weekly) - Required. startDate?: string // the dateTime of when the recurring meeting will start (used for Microsoft Outlook only) endDate?: string // the dateTime of when the recurring meeting will end dayOfMonth?: number|string // day of month for a monthly meeting. 1 - 31 (ex. 15 for the 15th of every month) daysOfWeek?: Array<string>// days of week for a weekly meeting type (ex. ['monday', 'wednesday']) month?: number|string // The month in which the event occurs. This is a number from 1 to 12. (Microsoft and Google only)}
Here's an example of a recurrence object for a meeting that repeats weekly every Wednesday:
{"success":false,"error":"Invalid account id. Account Not Found","code":404}
{"errors": [ {"msg":"eventData is required.","param":"eventData","location":"body" }, {"msg":"eventData must be an object","param":"eventData","location":"body" }, {"msg":"Invalid value","param":"eventData","location":"body" } ]}
Update Event Data Object Example:
{"title":"Interview","description":"Interview with Elon","startDate":"2023-03-06T22:51:08.434Z","endDate":"2023-03-06T23:21:08.434Z","timeZone":"America/New_York"}
Delete Event
DELETEhttps://api.pyas.io/microsoft/events/{id}
Deletes an existing event
Path Parameters
Name
Type
Description
{id}*
String
The event ID
Query Parameters
Name
Type
Description
accountId
String
The user's Pyas account id. This is returned when you connect an account to Pyas.