What type of API does OnceHub provide?
Based on the search results provided, OnceHub has a REST API. Here are the key points about OnceHub's API:
API Type
OnceHub uses a REST API. The API is based on REST principles and sends HTTP requests, returning data in JSON format.
Key Features
-
REST-based: The API follows REST architectural principles.
-
JSON format: Data is returned in JSON format.
-
HTTP requests: The API uses HTTP requests for communication.
-
Access to booking data: The API provides access to booking data such as meeting time, customer details, location, and up-to-date booking status.
-
Webhook subscriptions: The API allows direct and reliable access to booking data via Webhook subscriptions.
-
Client-side API: OnceHub also offers a client-side API for extracting booking confirmation data at the time of scheduling.
Using the OnceHub API
To use the OnceHub API, you need to:
- Have a OnceHub account (you can sign up if you don't have one).
- Obtain an API key.
- Use the API to access booking data and integrate OnceHub with your application environment.
Best Practices
- Refer to the OnceHub Developer center for technical documentation and API reference.
- Consult the OnceHub Support center for information on advanced features like prepopulated booking forms, web form integration, source tracking, login integration, and website integration.
- Consider using Webhook subscriptions for real-time access to booking data.
In summary, OnceHub provides a REST API that allows developers to access booking data and integrate OnceHub functionality into their applications. The API uses JSON for data exchange and supports features like Webhook subscriptions for real-time data access.
Does the OnceHub API have webhooks?
Webhook Support
Yes, the official OnceHub API does have webhook support.
Event Types
OnceHub provides webhooks for various booking and conversation lifecycle events. The main types of events you can subscribe to include:
-
Booking lifecycle events:
- booking.scheduled
- booking.rescheduled
- booking.canceled
- booking.canceled_then_rescheduled
- booking.canceled_reschedule_requested
- booking.completed
- booking.no_show
-
Composite booking event trigger:
- booking (includes all specific booking event triggers)
-
Conversation events (mentioned but not detailed)
Key Points to Consider
- Webhooks allow you to receive automatic notifications when booking or conversation events occur in your OnceHub account.
- You can register webhooks for specific types of events or for any booking or conversation lifecycle event.
- When creating a webhook subscription, you define the set of events that will trigger POST messages to your URL endpoint.
- OnceHub provides both specific and composite event triggers.
- Webhook POST messages may contain sensitive customer data, so it's recommended to always use HTTPS when providing the receiving POST URL.
- If an event trigger fails to post, OnceHub retries posting the failed event data at regular intervals for up to 72 hours.
Best Practices
- Use HTTPS for the webhook endpoint to ensure data security.
- Implement proper error handling and retry mechanisms on your server to handle potential failures in receiving webhook data.
- Consider using a service like Webhook Tester to check that your webhook is configured correctly.
- Be aware of the different booking scenarios (e.g., automatic booking vs. booking with approval) and how they affect the webhook events you'll receive.
In summary, the OnceHub API offers comprehensive webhook support for various booking and conversation events, allowing developers to integrate OnceHub data into their applications efficiently and in real-time.
Rate Limits and other limitations
Based on the search results provided, there is no specific information about the API rate limits for the OnceHub API. However, I can provide some general information about API rate limiting and error handling for OnceHub:
Error Handling
OnceHub uses conventional HTTP response codes to indicate the success or failure of an API request:
- Successful requests are given status codes in the 2xx range
- Unsuccessful requests have status codes in the 4xx or 5xx range
- 4xx codes indicate an error that failed given the information provided (e.g., an invalid parameter, object not found, etc.)
- 5xx codes indicate an error with OnceHub servers
Error Types
OnceHub categorizes error responses into four types:
-
authentication_error: The server could not authenticate your request. Check that you've entered a valid API key in the correct format in the API-Key header.
-
invalid_request_error: One or more input parameters is not valid. Check that you've entered correct values for all required parameters.
-
rate_limit_error: The amount of API requests per second has exceeded the allowed amount.
-
api_error: There was an error on the OnceHub servers.
OnceHub uses cursor-based pagination for list API methods:
- The 'limit' parameter determines the number of objects returned per page (default 10, max 100)
- 'after' and 'before' parameters are used to navigate through pages
- A Link header is provided in responses to help with pagination
Key Points to Consider
-
While specific rate limits are not mentioned, OnceHub does implement rate limiting as evidenced by the "rate_limit_error" error type.
-
Best practice would be to implement proper error handling in your application, especially for rate limit errors.
-
Use the pagination features to efficiently retrieve large sets of data without overloading the API.
-
If you need higher rate limits, it's common practice to contact the API provider directly, as seen in other API documentation.
Best Practices
-
Handle rate limit errors gracefully in your application, potentially implementing backoff and retry logic.
-
Use pagination to efficiently retrieve large datasets.
-
Monitor your API usage to stay within limits.
-
If you need higher limits, contact OnceHub support for options.
While the specific rate limits are not provided in the search results, these general guidelines should help you work effectively with the OnceHub API. If you need exact rate limit information, I recommend contacting OnceHub support directly.
Latest API Version
The most recent version of the OnceHub API is v2.0.0.
Key points to consider:
- Version 2.0.0 is the default version to use when starting a new integration with the OnceHub API
- This version introduced some breaking changes compared to the previous version, including changes to objects like booking pages, master pages, event types, and user objects
- The booking object, which is included in webhook payloads, had significant changes in v2.0.0
- Any webhooks created with v2.0.0 will include the new booking data changes
- Previous versions of the API are still supported and can be viewed in the API reference documentation
Best practices:
- When starting a new integration, use the latest v2.0.0 version of the API
- Review the changelog and documentation to understand the changes if upgrading from a previous version
- Test your integration thoroughly when upgrading to ensure compatibility with the new object structures and data formats
How to get a OnceHub developer account and API Keys?
To get a developer account for OnceHub and create an API integration, follow these steps:
-
Sign up for a OnceHub account:
To use the OnceHub API, you need to have a OnceHub account. If you don't already have one, you can sign up at the OnceHub website.
-
Access the API & Webhooks Integration page:
Once you have a OnceHub account, log in and navigate to the API & Webhooks Integration page in your account settings.
-
View your API key:
On the API & Webhooks Integration page, you'll find your unique API key. This key is automatically generated the first time you access the API integration section of your account.
Key points to consider:
- Keep your API key secret: Your API key carries many privileges, so it's crucial to keep it secure. Don't share it in publicly accessible areas like GitHub or client-side code.
- API key validity: Your API key will remain valid until you regenerate a new one or delete your account.
- Authentication: You must authenticate each HTTP request you send to a OnceHub API endpoint by passing your valid API key via an HTTP header.
What can you do with the OnceHub API?
Based on the search results provided, here is a list of data models you can interact with using the OnceHub API, along with what is possible for each:
Booking Object
- Retrieve booking data such as:
- Meeting time
- Customer details
- Location
- Up-to-date booking status
- Access booking creation time
- Capture custom data [2][5]
Users
- Retrieve user data
- Capture deletes [5]
Booking Pages
- Access booking page information
- Capture deletes [5]
Master Pages
- Retrieve master page data
- Capture deletes [5]
Event Types
- Access event type information
- Capture deletes [5]
Contacts
- Retrieve contact information
- Capture custom data
- Export and delete contacts [4][5]
Webhooks
- Set up and manage webhook subscriptions
- Receive real-time updates on booking events
- Access webhook data payload [1][4]
Client-side API
- Redirect booking confirmation data
- Collect data from embedded booking pages [1][4]
Account Objects
- Generate reports on account objects [4]
Booking Activity
- Generate reports on booking activity [4]
Additional Features
- Filter report data [4]
- Use priority-first sync for Booking and Contact tables [5]
- Implement column-level data blocking and column hashing [5]
- Perform re-sync at the connector level [5]
The OnceHub API allows for comprehensive interaction with various data models, enabling developers to retrieve, manage, and report on booking-related information, user data, and account objects. It also provides real-time updates through webhooks and offers client-side capabilities for enhanced integration with existing applications.