Search⌘ K
AI Features

API Model for Graph and Calendar Services

Explore how to model a productivity suite API for organizational graphs, calendar events, meeting scheduling, resource booking, and webhook notifications. Learn to define endpoint methods and message formats, handle pagination and time zones, prevent conflicts with ETags and atomic checks, and support reliable integrations with idempotency and subscription validation.

We are now familiar with the services involved in a productivity suite API and their workflow. Let us now shift our focus to discussing the API endpoints required to fulfill our functional requirements. Moreover, we will discuss the essential data entities and the message format for each endpoint in detail.

Let's start with the base URL of our API.

Base URL and API endpoints

The following URL is used as the base URL for our productivity suite services. The api.suite.example.com is the host URL, and v1 represents the version of our API.

The base URL for a productivity suite
The base URL for a productivity suite

Users can use the following endpoints and methods to access different services of the productivity suite’s API.

While most of the endpoints are self-explanatory, we’ll focus on three services in particular.

  • The organizational graph service is the backbone of the platform, reporting hierarchies, team memberships, and department affiliations are the foundation on which meeting scheduling, permission resolution, and calendar delegation are all built.

  • The calendar and meeting service introduces concurrency challenges (ETag-based conflict detection) and multi-participant coordination that differ from simple CRUD endpoints.

  • The notification service eliminates the need for polling by pushing change events to registered webhook URLs, which is essential for keeping third-party integrations in sync without overwhelming the API with repeated read requests.

Endpoints for multiple operations for a productivity suite

Message format for API endpoints

Let’s discuss the data entities involved in the productivity suite API and the message format for them in detail. Since the platform spans six functional areas, user graph management, calendar events, meeting scheduling, resource management, notifications, and search, our focus will be on the endpoints that carry the most design complexity: organizational graph traversal, full event lifecycle management, meeting scheduling with availability checks, resource booking with conflict prevention, and notification subscription. Search across users, events, and resources is served by the reusable Search API building block covered elsewhere in the course, so its endpoints are not repeated here.

Data entities

Let's start by highlighting the core data entities that will be of use to us in the productivity suite API.

YAML
type ProductivitySuite
{
userID: string // Unique identifier for a user in the system
displayName: string // Full display name of the user
email: string // Work email address of the user
jobTitle: string // Professional title of the user
department: string // Department the user belongs to
managerID: string // User ID of the user's direct manager (org graph traversal)
memberOf: list // List of organization or group IDs the user belongs to
orgID: string // Unique identifier for an organizational unit
orgName: string // Name of the organization or team
domain: string // Email domain associated with the organization
members: list // Paginated list of user references in the organization
calendarID: string // Unique identifier for a calendar container
ownerID: string // User ID of the calendar's owner
calendarName: string // Display name of the calendar
timeZone: string // IANA time zone identifier for the calendar (e.g., "America/New_York")
defaultReminders: list // List of default reminder rules for the calendar
eventID: string // Unique identifier for a calendar event
subject: string // Title or subject line of the event
body: object // Content body with contentType ("html" or "text") and content string
start: object // Start time as { dateTime, timeZone } (e.g., { "dateTime": "2025-09-15T10:00:00", "timeZone": "America/Los_Angeles" })
end: object // End time as { dateTime, timeZone }
location: object // Object containing displayName and address of the event location
attendees: list // List of attendee objects, each with emailAddress, type ("required"/"optional"), and responseStatus
isAllDay: boolean // Whether the event spans an entire day without specific start/end times
recurrence: object // Recurrence pattern object (frequency, interval, endDate)
organizer: string // User ID of the person who created and owns the event
eTag: string // ETag value used for optimistic concurrency control on PATCH and DELETE
resourceID: string // Unique identifier for a bookable resource (room, projector, equipment)
resourceName: string // Display name of the resource
resourceType: string // Category of the resource: "room", "projector", "equipment"
capacity: int // Maximum occupancy for rooms
bookingID: string // Unique identifier for a resource reservation
bookedBy: string // User ID of the person who made the booking
subscriptionID: string // Unique identifier for a registered webhook subscription
resourcePath: string // The API path being monitored (e.g., "/v1/calendars/{calendar_id}/events")
callbackUrl: hyperLink // HTTPS URL where the server pushes change notifications
expiresAt: string // ISO 8601 expiry timestamp for the subscription
searchQuery: string // Free-text search string entered by the user
searchScope: string // Entity type to search within: "users", "events", "resources", or "all"
searchResults: list // Ranked list of matched entities returned by the search service
nextPageToken: string // Opaque token returned with a page; pass it back as pageToken to fetch the next page
top: int // Number of results to return per page
createdAt: string // ISO 8601 creation timestamp for any resource
updatedAt: string // ISO 8601 last-updated timestamp for any resource
}

Note: All datetime fields follow ISO 8601 format, and all time zone fields use IANA time zone identifiers. Avoid inventing custom date formats, ISO 8601 combined with IANA time zones eliminates an entire class of parsing bugs in third-party integrations.

Manage user profiles and organizational graph

In this section we discuss the message format for creating and updating user profiles, and for traversing the organizational reporting hierarchy. The graph traversal endpoints are the foundation on which meeting scheduling, permission resolution, and calendar delegation are all built.

  • HTTP method: The POST method ...