The user's Pyas account id. This is returned when you connect an account to Pyas.
startDate
Date String
Filter events by start date
(ex: 01-01-2022)
endDate
Date String
Filter events by end time
(ex: 01-01-2023)
search
String
Free text search terms to find events that match these terms in the following fields: summary, description, location, attendee's displayName, attendee's email.
nextPageToken
String
Token string used to get the next page of results (paginate)
maxResults
Integer
Max number of results to return per page
syncToken
String
Token obtained from the nextSyncToken field returned on the last page of results
filters
JSON
All other filters provides as JSON key-value pairs.
{"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}
List of Possible Filters
Below is a list of flags/filters that can be used when listing events. Simply send these as JSON in the filters parameter.
{"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 an Event
Create Event
POSThttps://api.pyas.io/google/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.
{"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.}
{"provider": string,// Required. Possible values: "google-meet", "zoom" "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}
{ 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 an Event
Delete Event
DELETEhttps://api.pyas.io/google/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.