Back

OnceHub API Essential Guide

Aug 12, 20246 minute read

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

  1. REST-based: The API follows REST architectural principles.

  2. JSON format: Data is returned in JSON format.

  3. HTTP requests: The API uses HTTP requests for communication.

  4. Access to booking data: The API provides access to booking data such as meeting time, customer details, location, and up-to-date booking status.

  5. Webhook subscriptions: The API allows direct and reliable access to booking data via Webhook subscriptions.

  6. 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:

  1. Have a OnceHub account (you can sign up if you don't have one).
  2. Obtain an API key.
  3. Use the API to access booking data and integrate OnceHub with your application environment.

Best Practices

  1. Refer to the OnceHub Developer center for technical documentation and API reference.
  2. Consult the OnceHub Support center for information on advanced features like prepopulated booking forms, web form integration, source tracking, login integration, and website integration.
  3. 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:

  1. Booking lifecycle events:

    • booking.scheduled
    • booking.rescheduled
    • booking.canceled
    • booking.canceled_then_rescheduled
    • booking.canceled_reschedule_requested
    • booking.completed
    • booking.no_show
  2. Composite booking event trigger:

    • booking (includes all specific booking event triggers)
  3. 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

  1. Use HTTPS for the webhook endpoint to ensure data security.
  2. Implement proper error handling and retry mechanisms on your server to handle potential failures in receiving webhook data.
  3. Consider using a service like Webhook Tester to check that your webhook is configured correctly.
  4. 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:

  1. 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.

  2. invalid_request_error: One or more input parameters is not valid. Check that you've entered correct values for all required parameters.

  3. rate_limit_error: The amount of API requests per second has exceeded the allowed amount.

  4. api_error: There was an error on the OnceHub servers.

Pagination

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

  1. While specific rate limits are not mentioned, OnceHub does implement rate limiting as evidenced by the "rate_limit_error" error type.

  2. Best practice would be to implement proper error handling in your application, especially for rate limit errors.

  3. Use the pagination features to efficiently retrieve large sets of data without overloading the API.

  4. If you need higher rate limits, it's common practice to contact the API provider directly, as seen in other API documentation.

Best Practices

  1. Handle rate limit errors gracefully in your application, potentially implementing backoff and retry logic.

  2. Use pagination to efficiently retrieve large datasets.

  3. Monitor your API usage to stay within limits.

  4. 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:

  1. 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.

  2. 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.

  3. 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.