Webhooks notify a URL when an appointment is scheduled, canceled, or rescheduled. Acuity can also send webhooks when packages/gift certificates/subscription orders are completed.

You can create static webhooks in your Acuity account settings, or create webhooks dynamically using our API.

Static Webhooks

Under Integrations set the Webhook integration with the URL to be notified on changes to appointments. The URL you provide must be accessible by port 443 (for HTTPS) or 80(for HTTP).

Webhook requests are application/x-www-form-urlencoded POST requests with these variables:

  • action

    • For appointments:

      • scheduled is called once when an appointment is initially booked

      • rescheduled is called when the appointment is rescheduled to a new time

      • canceled is called whenever an appointment is canceled

      • changed is a catch-all webhook called when the appointment is changed in any way

        • This includes when it is initially scheduled, rescheduled, or canceled, as well as when appointment details such as e-mail address or intake forms are updated. Using the changed webhook concurrently with the scheduled, rescheduled or canceled webhooks may lead to duplicate requests from Acuity.
    • For Packages, Gift Certificates and Subscription orders:

      • order.completed is called when an order is completed
  • id the ID for the appointment or order

  • calendarID the ID of the calendar for the appointment.

    • Note: This is only sent for appointments.
  • appointmentTypeID the ID of the type of the appointment.

    • Note: This is only sent for appointments

Dynamic Webhooks

This new feature allows you to create new Webhook subscriptions through the Webhooks API. Click here to learn all details.

Verifying Webhook Requests

Webhook notifications are signed by Acuity using the main admin's API key for static webhooks or your user account's API key for dynamic webhooks. You can use this signature to verify that a notification is from Acuity. First compute the base64 HMAC-SHA256 signature of the notification using the request's body as the message and your API key as the shared secret. Then compare this signature to the request header x-acuity-signature . If they match, the notification is authentic.

<?php
// Get hash of message using shared secret:
$body = file_get_contents('php://input');
$hash = base64_encode(hash_hmac('sha256', $body, $secret, true));

// Compare the two:
if ($hash !== $_SERVER['HTTP_X_ACUITY_SIGNATURE']) {
	throw new Exception('This message was forged!');
}
// Get hash of message using shared secret:
var hasher = crypto.createHmac('sha256', secret);
hasher.update(buf.toString());
var hash = hasher.digest('base64');

// Compare hash to Acuity signature:
if (hash !== req.header('x-acuity-signature')) {
	throw new Error('This message was forged!');
}
require 'openssl'
require 'base64'

def verify_message_signature(secret, body, signature)
  hash = Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), secret, body))
  if hash.strip() != signature
    raise 'This message was forged!'
  end
end
POST https://example.com/webhook-callback

action=changed&id=13&calendarID=1&appointmentTypeID=13

👍

Simulate Acuity Webhooks

You can use curl to simulate Acuity webhooks:

curl -d "action=changed&id=1&calendarID=1&appointmentTypeID=1" "https://example.com/webhook-callback"

Webhook Retries

Webhook calls are retried with exponential backoff over a 24 hour period. Acuity will stop attempting if there is not a successful response after 24 hours. We only retry webhooks if they return a 500 internal server error, or if we experience network related connection errors when attempting to send the webhook.

Retry NumberInterval
12 seconds
230 seconds
31 minute
45 minutes
510 minutes
615 minutes
730 minutes
81 hour
912 hours

NOTE If a webhook continues to fail because of a 500 HTTP error or because of connection issues over a period of 5 days, we will disable the webhook. It will have to be manually re-enabled by you, either through the API for API webhooks or through the Integrations page for static webhooks.