API Usage
Onsite provides a REST API that allows Enterprise users and authorised partners to programmatically interact with Onsite.
Getting Started
Before we provide API access, we need to understand your use case and goals. This helps us:
- Provide appropriate guidance for your integration
- Notify you of any planned changes that might affect your application
- Ensure the API meets your specific requirements
Please contact us to discuss your API integration needs and register your application. After registration, we’ll provide full API documentation and support you to integrate with the API.
API Documentation
Registered developers can access API documentation at https://api.onsite.fm/docs.
Authentication
Onsite API uses OAuth 2.0 client credentials flow for authentication. When you register your application, you’ll receive a client ID and client secret that you can use to obtain access tokens.
curl -X POST https://auth.onsite.fm/oauth/token \-d "grant_type=client_credentials" \-d "client_id={CLIENT_ID}" \-d "client_secret={CLIENT_SECRET}"
Your application will be associated with a service account which will be added as a user to each relevant site, enabling granular permissions and access control.
Making API Requests
Once you have an access token, you can make API requests by including it in the Authorization header:
curl -H "Authorization: Bearer {ACCESS_TOKEN}" \https://api.onsite.fm/v1/sites
API Scope
The API provides access to all the functionality available in the Onsite application, including:
- Sites
- Units, Residents, Keys, Vehicles, Pets
- Cases, Maintenance
- Work orders, Quotes, Invoices
- Contractors, Attendance records
- Requests
- Packages
- Assets, Documents, Accounts, Knowledge
- Amenities, Contacts, Parking, Events
Examples
Create Resident
Request
curl -X POST https://api.onsite.fm/v1/residents \-H "Authorization: Bearer {ACCESS_TOKEN}" \-H "Content-Type: application/json" \-d '{ "site": "{SITE_ID}", "unit": "{UNIT_ID}", "first": "John", "last": "Doe", "email": "[email protected]", "phone": "+61412345678", "type": "tenant"}'
List Cases
Request
curl -H "Authorization: Bearer {ACCESS_TOKEN}" \https://api.onsite.fm/v1/cases?sites={SITE_ID}&page=1&limit=50&search=John
Response
{ "count": 1, "items": [ { "id": "{CASE_ID}", "code": "LA-1", "type": "Waste Management", "title": "Recycling Rubbish left in common area", "status": "closed", // todo, inProgress, closed "due": null, "priority": "2", // 1-5 "Assignee": { "id": "{ASSIGNEE_ID}", "first": "John", "last": "Appleseed" }, "Site": { "id": "{SITE_ID}", "label": "Lux Apartments" }, "createdAt": "2025-04-17T23:55:59.719Z", "updatedAt": "2025-04-17T23:58:33.380Z" } // Truncated for brevity ]}
Webhooks
Onsite provides webhooks for real-time updates with a limited set of events. Contact us to discuss your webhook needs. We’ll evaluate your requirements and can add custom webhook events to support your use case.
Breaking Changes
We strive to maintain backward compatibility, but occasionally we may need to make breaking changes to the API. When this happens:
- We’ll provide advance notice to all registered application owners
- We’ll maintain the previous version for a reasonable transition period
- We’ll provide migration guidance to help you update your integration
This is why registering your application is essential - it allows us to contact you directly about any changes that might affect your integration.