NAV Navbar

Mindbody Webhooks API

The Mindbody Webhooks API notifies you when specific events are triggered by a business that uses Mindbody. You can use this API to create an application that shows near real-time updates to a business’s data without having to long-poll the Public API. This API is Mindbody’s implementation of an HTTP push API.

The Webhooks API uses the HTTP protocol, so it works with any language that has an HTTP library. Requests use standard HTTP verbs such as GET, POST, and DELETE. All endpoints accept and return JSON. The API documentation uses the JSON data types defined by W3Schools. The resource documentation describes requests and responses in detail for each endpoint.

Getting Started

  1. Go to our developer portal and create your developer account.
  2. While logged into your developer account, request to go live with your developer account. Make sure you are logged in before you click this link.
  3. Once Mindbody approves you for live access, activate the link between your developer account and at least one Mindbody business. Follow the instructions for activation in the Public API documentation.
  4. While logged into your developer account, go to the API Keys section on the API Credentials page of your developer portal account, and create an API Key named something like “Webhooks.”
  5. Use the POST subscription endpoint to create a subscription for one or more events. This subscription should point to a webhook that you use for testing.
  6. Use the PATCH subscription endpoint to activate your subscription.
  7. Thoroughly test your application.
  8. Optionally, use the DELETE subscription endpoint to deactivate the webhook you used for testing.

Authentication and Security

If you make a call without an API-Key header, you receive a 401 HTTP status code and the following error response:

{
    "errors": [{
        "errorCode": "14010001",
        "errorType": "missingAPIKeyHeader",
        "errorMessage": "An API-Key Header was expected in the request but was not provided."
    }]
}

The Webhooks API uses API keys from your developer account, which are located on the API Credentials page. You can use the same API keys created for the Public API for the Webhooks API. If you already have an API key issued during the Webhooks open beta, that key is still valid for use.

To make a successful API call, pass an API key as an API-Key header.

If you make a call and the API-Key header contains an invalid value, you receive a 401 HTTP status code and an error response body.

X-Mindbody Signature Header

/// <summary>
/// Validates whether the webhook hash is contained in the request and is correct
/// </summary>

public class ValidateWebhookSignatureAttribute : ActionFilterAttribute
{
    private const string EnvSignatureKey = "ENVSIGNATUREKEY";
    public override void OnActionExecuting(HttpActionContext actionContext)
    {
        // Find signature in request headers
        if (!actionContext.Request.Headers.TryGetValues("X-Mindbody-Signature", out var values))
        {
            actionContext.Response = actionContext.Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Request not signed. Expected X-Mindbody-Signature not found on request.");

            return;
        }

        var requestHash = values.First();

        // Get signature key stored from subscription creation
        var signatureKey = Environment.GetEnvironmentVariable(EnvSignatureKey);

        if (string.IsNullOrWhiteSpace(signatureKey))
        {
            throw new NullReferenceException($"Signature key, {EnvSignatureKey}, not found in the environment");
        }

        string computedHash;
        using (var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(signatureKey)))
        {
            // Read request body, encode with UTF-8 and compute hash
            var payload = actionContext.Request.Content.ReadAsStringAsync().Result;

            var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(payload));
            computedHash = $"sha256={Convert.ToBase64String(hash)}";
        }

        // Compare the computed hash with the request's hash
        if (computedHash != requestHash)
        {
            actionContext.Response = actionContext.Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Invalid signature. X-Mindbody-Signature value was not as expected.");

            return;
        }

        base.OnActionExecuting(actionContext);
    }
}

When Mindbody sends an event notification to a registered webhook, we include a signature header so that you know the request was sent from our servers. The header name is X-Mindbody-Signature and the value is a UTF-8 encoded hash. We strongly recommend that you verify this signature when you receive a request at your webhook endpoint.

To validate the webhook signature, you:

  1. Encode the request body using an HMAC-SHA-256 library in your coding language of choice. When you do this, use the messageSignatureKey returned from the POST Subscription endpoint as the key for the algorithm.
  2. Prepend sha256= to the encoded signature.
  3. Compare the string with the header value. If they match, then the message came from our servers.

Look at the C# example on the right to see how to do this.

HTTPS

All calls to the Webhooks API must use HTTPS connections, using TLS v1.2 or higher. Connections made using an older version of TLS may not work correctly.

Webhook URL Requirements

To correctly handle events delivered to your webhook URL, please keep the following information in mind when designing your application:

  1. Webhook URLs must accept HTTPS connections using TLS v1.2 or higher.
  2. Webhook URLs must accept both POST and HEAD HTTP requests. Mindbody uses POST requests to deliver events to the URL, and HEAD requests to check the URL’s validity when creating a subscription.
  3. Events are not guaranteed to be delivered only once.
  4. Events are not guaranteed to be delivered in chronological order.
  5. If Mindbody does not receive a 2xx response within 10 seconds of posting an event to your webhook URL, we try to resend the event every 15 minutes. After 3 hours, Mindbody stops trying to resend the event.

    To avoid some failures and prevent retries, add incoming events to a queue for future processing so you can return a response to our API as quickly as possible.

Follow these steps to be successful in your integration:

  1. Receive your webhook.
  2. Queue your webhook.
  3. Respond to your webhook.
  4. Process your data.

Best Practices

To avoid duplicates if your endpoints receive multiple copies of a single event, we recommend that you make your event processing idempotent. For example, you can log processed events, and make sure that your application does not reprocess events that have already been logged.

To ensure your system has the most up-to-date data, please sync your cached data using the Public API every 24 hours.

Pairing with the Public API

Because the event notification posted to your webhook only contains certain data, you may need to use the Public API to collect additional information about an item that has changed. Each event documented here tells you which fields you can use to query the Public API for more information.

Transaction Key

Example header included with an UpdateClient API request

Transaction-Key: "c1ad6020-ee69-4dc3-ba8b-562727a60dbf"

Example payload included with the resulting client.updated event

{
    "messageId": "6AMKfY2dBB8MqvfiPzkZcr",
    "eventId": "client.updated",
    "eventSchemaVersion": 1,
    "eventInstanceOriginationDateTime": "2020-04-17T19:03:14Z",
    "transactionKey": "c1ad6020-ee69-4dc3-ba8b-562727a60dbf",
    "eventData": {
        "siteId": -1517,
        ...
    }
}

Many actions taken via Public API endpoints will trigger a webhook event dispatch. For example, if POST UpdateClient is called, a client.updated event will be dispatched if any updates to a client are made. To optimize the number calls made to Public API, a transaction key may be used with API calls to track events dispatched as a result of API actions.

When calling the Public API, integrations may populate an optional Transaction-Key header. This header is a string limited to 50 characters (anything beyond 50 will be truncated). Events dispatched, as a result of API calls, will set a transactionKey property in event payloads. This property will only be populated if the API source matches the Webhooks subscription source. API keys may differ, but the sourcename making the API call must be the same used to create the webhooks subscription. If the header is not populated, the event did not originate from an API call, or the sourcename does not match, transactionKey will not exist in the event payload.

Base URL

https://mb-api.mindbodyonline.com/push/api/v1

Versioning

If Mindbody introduces an API change that breaks preexisting API contracts, we create a new API version number and provide you with a transition guide.

Current Version: 1
Previous Version: NA

Dates and Times

The Webhooks API returns dates and times in ISO 8601 format as defined by the RFC 339 specification. All returned dates and times are UTC dates and times. For example, a class that occurs on January 5th, 2017 at 2:15PM (EST) is represented as "2017-01-05T19:15:00Z" because EST is five hours behind UTC. All date/time pairs are returned in the format YYYY-MM-DDTHH:mm:ssZ.

Rate Limits

Rate limits differ from one endpoint to the next. There are two kinds of rate limits: daily call limits and system limits. Your daily call limits are defined when you receive your API Key. System limits are in place to ensure faster response times and stability. If you need Mindbody to increase your rate limits, contact your account manager.

Errors

In the Webhooks API, HTTP response codes indicate the status of a request.

  • Codes in the 200 range indicate success.
  • Codes in the 400 range indicate errors in the provided information, for example, a required parameter was omitted, a parameter violated its minimum or maximum constraint, and so on.
  • Codes in the 500 range indicate errors from our servers. Please contact us immediately if you receive a 500 error.
{
    "errors": [{
        "errorCode": "14000001",
        "errorType": "missingAPIKeyHeader",
        "errorMessage": "An API-Key Header was expected in the request but was not provided."
    }]
}

The Webhooks API returns errors for many reasons. We recommend that you write code that gracefully handles all possible errors as documented for each endpoint.

In addition to HTTP codes, the API returns a JSON error response object, as shown in the example on the right.

Name Type Description
errors list of objects Contains a list of all the errors generated by the call.
errorCode string A code for the specific error returned. You can safely parse these values to numbers.
errorType string A categorical code indicating which aspect of the request was invalid.
errorMessage string A brief message explaining why you received the error.

Subscription Deactivation

Your subscription may be deactivated because Mindbody stopped receiving a 2xx HTTP status code from the webhookUrl when posting events. When this occurs, Mindbody will send an email to the developer portal email account with which the subscription was created. After you have resolved the delivery issues, please update the subscription’s status to Active using the PATCH Subscription endpoint. In the meantime, we recommend using the Mindbody Public API to perform a manual sync of cached data.

Resources

Subscriptions

Subscriptions

A subscription lets you choose which event notifications are sent to a webhook URL. Mindbody must activate subscriptions before the associated webhook can receive event notifications.

Event Schema Versions

The event schema version controls the payload that is sent to a webhook. Currently, there is only one version for every available event type, so this field is always 1.

GET

curl -X GET \
-H "API-Key: {yourAPIKey}" \
-A "{yourAppName}" \
"https://mb-api.mindbodyonline.com/push/api/v1/subscriptions"
var client = new RestClient("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions");
var request = new RestRequest(Method.GET);
request.AddHeader("api-key", "{yourAPIKey}");
IRestResponse response = client.Execute(request);
<?php

$request = new HttpRequest();
$request->setUrl('https://mb-api.mindbodyonline.com/push/api/v1/subscriptions');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'api-key' => '{yourAPIKey}'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
import http.client

conn = http.client.HTTPSConnection("mb-api.mindbodyonline.com")

headers = {
    'api-key': "{yourAPIKey}",
    }

conn.request("GET", "/push/api/v1/subscriptions", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["api-key"] = '{yourAPIKey}'

response = http.request(request)
puts response.read_body

https://mb-api.mindbodyonline.com/push/api/v1/subscriptions

This endpoint searches for subscriptions associated with your developer portal account:

You can retrieve a specific subscription by calling GET (by ID).

Headers

Name Type Description
API-Key string Your API key.

Response

HTTP Status Code: 200 OK

{
    "items" : [
        {
            "subscriptionId" : "0b2f2a18-5003-4d4e-a793-d16c95f72496",
            "status" : "PendingActivation",
            "subscriptionCreationDateTime" : "2018-01-01T08:00:00Z",
            "statusChangeDate" : "2018-01-01T08:00:00Z",
            "statusChangeMessage" : null,
            "statusChangeUser" : "ACMEDeveloper",
            "eventIds" : [
                "classSchedule.created",
                "classSchedule.updated",
                "classSchedule.cancelled",
                "class.updated"
            ],
            "eventSchemaVersion" : 1,
            "referenceId" : "2bf12eec-30b5-492d-95eb-803c1705ddf4",
            "webhookUrl" : "https://acmebusinessdoman.com/webhook"
        },
        ...
    ]
}

Name Type Description
subscriptionId string The subscription’s ID (a GUID).
status string The subscription’s current status.
Possible Values:
  1. PendingActivation - The subscription is created but not receiving event notifications. To start receiving event notifications, set the subscription’s status to Active using the PATCH Subscription endpoint.
  2. Active - The subscription is active and can receive event notifications.
  3. DeactivatedByUser - You deactivated the subscription.
  4. DeactivatedByAdmin - Mindbody deactivated your subscription.
  5. DeactivatedTooManyFailedMessageDeliveryAttempts - The subscription was deactivated because Mindbody stopped receiving a 2xx HTTP status code from the webhookUrl when posting events.
  6. DeactivatedByEventDeactivation - One of the event IDs associated with the subscription was deactivated, which invalidated and deactivated the subscription. If this occurs, you must create a new subscription using only up-to-date event IDs.
subscriptionCreationDateTime string The UTC date and time when the subscription was created.
statusChangeDate string The UTC date and time when the subscription’s status was last updated.
statusChangeMessage string A message generated by Mindbody that explains why a subscription’s status changed.
statusChangeUser string The first name of the developer or Mindbody staff member who changed the subscription’s status.
eventIds list of strings The events that are to be sent to this subscription’s webhookUrl.
eventSchemaVersion number The event schema version associated with the subscription. Currently, this value is always 1.
referenceId string An arbitrary ID that can be specified in the POST Subscription request body, and is saved for the requesting developer’s use.
webhookUrl string The webhook to which the listed eventIds are sent.

Errors

Example Error:

{
    "errors": [{
        "errorCode": "14030002",
        "errorType": "developerAccountNotActive",
        "errorMessage": "Your developer account must be activated before you can use this API."
    }]
}

This endpoint may return the following errors. Mindbody recommends that you catch and handle each error for an optimal user experience. Mindbody also recommends that you attempt to reproduce each error during your development and test process to ensure that your application handles them correctly.

HTTP Status Code errorCode errorType Description
401 14010001 missingAPIKeyHeader An API-Key header was not included in the request.
403 14030001 forbidden You are not authorized to use this endpoint.
403 14030002 developerAccountNotActive Your developer portal account does not have live access. Request to go live, then re-try your request.

GET (by ID)

curl -X GET \
-H "API-Key: {yourAPIKey}" \
-A "{yourAppName}" \
"https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}"
var client = new RestClient("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}");
var request = new RestRequest(Method.GET);
request.AddHeader("api-key", "{yourAPIKey}");
IRestResponse response = client.Execute(request);
<?php

$request = new HttpRequest();
$request->setUrl('https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'api-key' => '{yourAPIKey}'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
import http.client

conn = http.client.HTTPSConnection("mb-api.mindbodyonline.com")

headers = {
    'api-key': "{yourAPIKey}"
    }

conn.request("GET", "/api/v1/subscriptions/{subscriptionId}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["api-key"] = '{yourAPIKey}'

response = http.request(request)
puts response.read_body

https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}

This endpoint finds and returns the single subscription associated with the passed ID.

Headers

Name Type Description
API-Key string Your API key.

URL Parameters

Name Type Description
subscriptionId string Returns the single location identified by this ID (a GUID). This is the id property on the subscription object returned from the POST Subscription endpoint.

Response

Partial example of response content structure:

{
    "subscriptionId" : "0b2f2a18-5003-4d4e-a793-d16c95f72496",
    "status" : "PendingActivation",
    ...
}

This response object is the same as one of the objects contained in the items field in the GET Subscriptions response. See that endpoint’s documentation for detailed information about the response object’s fields.

Errors

Example Error:

{
    "errors": [{
        "errorCode": "14040001",
        "errorType": "resourceNotFound",
        "errorMessage": "The requested resource could not be found."
    }]
}

This endpoint may return the following errors. Mindbody recommends that you catch and handle each error for an optimal user experience. Mindbody also recommends that you attempt to reproduce each error during your development and test process to ensure that your application handles them correctly.

HTTP Status Code errorCode errorType Description
401 14010001 missingAPIKeyHeader An API-Key header was not included in the request.
403 14030001 forbidden You are not authorized to use this endpoint.
403 14030002 developerAccountNotActive Your developer portal account does not have live access. Request to go live, then re-try your request.
404 14040001 resourceNotFound The subscriptionId passed as a URL Parameter was not found.

POST

curl -X POST \
-A "{yourAppName}" \
-H "API-Key: {yourAPIKey}" \
-H "Content-Type: application/json" \
-d '{requestBody}' \
"https://mb-api.mindbodyonline.com/push/api/v1/subscriptions"
var client = new RestClient("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("api-key", "{yourAPIKey}");
request.AddParameter("application/json", "{requestBody}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$request = new HttpRequest();
$request->setUrl('https://mb-api.mindbodyonline.com/push/api/v1/subscriptions');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'content-type' => 'application/json',
  'api-key' => '{yourAPIKey}'
));

$request->setBody('{requestBody}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
import http.client

conn = http.client.HTTPSConnection("mb-api.mindbodyonline.com")

payload = "{requestBody}"

headers = {
    'api-key': "{yourAPIKey}",
    'content-type': "application/json"
    }

conn.request("POST", "/push/api/v1/subscriptions", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["api-key"] = '{yourAPIKey}'
request["content-type"] = 'application/json'
request.body = "{requestBody}"

response = http.request(request)
puts response.read_body

https://mb-api.mindbodyonline.com/push/api/v1/subscriptions

This endpoint creates a pending subscription that is linked to your developer portal account. After you have created a subscription, you can activate it using the PATCH Subscription endpoint.

Headers

Name Type Description
API-Key string Your API key.

Request Body

{
    "eventIds" : [
        "classSchedule.created",
        "classSchedule.updated",
        "classSchedule.cancelled"
    ],
    "eventSchemaVersion" : 1,
    "referenceId" : "7796d1bd-5554-46d4-a8fc-7016f8142b13",
    "webhookUrl" : "https://acmebusinessdoman.com/webhook"
}
Name Type Description
eventIds list of strings The events you want to be sent to the specified webhookUrl.
eventSchemaVersion number The event schema version for this subscription. 1 is currently the only accepted value.
referenceId string An arbitrary field that you can set to a value of your choice. Mindbody stores and returns this value for the subscription you are creating. Most commonly, this field stores a GUID that you can use in your application.
webhookUrl string The URL that Mindbody posts the event notifications to. Webhook URL Requirements lists considerations and requirements for this URL.

Response

{
    "subscriptionId" : "0b2f2a18-5003-4d4e-a793-d16c95f72496",
    "status" : "PendingActivation",
    "subscriptionCreationDateTime" : "2018-01-01T08:00:00Z",
    "statusChangeDate" : "2018-01-01T08:00:00Z",
    "statusChangeMessage" : null,
    "statusChangeUser" : "ACMEDeveloper",
    "eventIds" : [
        "classSchedule.created",
        "classSchedule.updated",
        "classSchedule.cancelled"
    ],
    "eventSchemaVersion" : 1,
    "referenceId" : "2bf12eec-30b5-492d-95eb-803c1705ddf4",
    "webhookUrl" : "https://acmebusinessdoman.com/webhook",
    "messageSignatureKey" : "fruFor651QwsHmiZDq3REmVmtKpHCydSkommfrILxEg="
}
Name Type Description
subscriptionId string The subscription’s ID (a GUID).
status string The subscription’s current status. When returned from this call, the status is always PendingActivation, which means that the subscription is created but not receiving event notifications. To start receiving event notifications, set the subscription’s status to Active using the PATCH Subscription endpoint.
subscriptionCreationDateTime string The UTC date and time when the subscription was created.
statusChangeDate string The UTC date and time when the subscription’s status was last updated.
statusChangeMessage string A message generated by Mindbody that explains why a subscription’s status changed.
statusChangeUser string The first name of the developer or Mindbody staff member who changed the subscription’s status.
eventIds list of strings The events that are to be sent to this subscription’s webhookUrl.
eventSchemaVersion number The event schema version associated with the subscription. Currently, this is always 1.
referenceId string An arbitrary ID that can be specified in the POST Subscription request body, and is saved for the requesting developer’s use.
webhookUrl string The webhook to which the listed eventIds are sent.
messageSignatureKey string The subscription’s security key that you can use to verify an event payload’s authenticity. It is important that you store this value because this is the only endpoint that returns it.
See X-Mindbody Signature Header for more details.

Errors

Example Error:

{
    "errors": [{
        "errorCode": "14000013",
        "errorType": "invalidWebhookURLMissingHTTPS",
        "errorMessage": "URLs must start with HTTPS."
    }]
}

This endpoint may return the following errors. Mindbody recommends that you catch and handle each error for an optimal user experience. Mindbody also recommends that you attempt to reproduce each error during your development and test process to ensure that your application handles them correctly.

HTTP Status Code errorCode errorType Description
400 14000010 invalidValueWebhookURLRequired The webhookUrl was either missing from the request body, or it was null.
400 14000011 invalidValueWebhookURLCannotBeBlank The webhookUrl was passed as an empty string.
400 14000012 invalidValueWebhookURLTooLong The webhookUrl exceeded 2083 characters in length.
400 14000013 invalidWebhookURLMissingHTTPS The webhookUrl started with http when it should have started with https.
400 14000014 invalidWebhookURLNoResponse The webhookUrl either returned a response outside of the 2xx HTTP status code range or it timed out.
400 14000003 invalidEventSchemaVersionRequired The eventSchemaVersion was either missing from the request body, or it was passed as 0.
400 14000005 invalidEventSchemaVersion The eventSchemaVersion either does not exist or one or more of the passed eventIds does not support the eventSchemaVersion.
400 14000006 invalidValueEventIdsRequired The eventIds property was either missing from the request body, or it was null.
400 14000007 invalidValueEventIdsCannotBeBlank The eventIds list was passed as an empty list.
400 14000008 invalidValueEventIds One or more of the passed eventIds was not valid.
400 14000009 invalidValueReferenceIdTooLong The referenceId exceeded 256 characters in length.
401 14010001 missingAPIKeyHeader An API-Key header was not included in the request.
403 14030001 forbidden You are not authorized to use this endpoint.
403 14030002 developerAccountNotActive Your developer portal account does not have live access. Request to go live, then re-try your request.

PATCH

Example patch request to reactivate a subscription and update the WebhookUrl

curl -X PATCH \
  'https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}' \
  -H 'Api-Key: {yourApiKey}' \
  -H 'Content-Type: application/json' \
  -A '{yourAppName}' \
  -d '{
    "Status": "Active",
    "WebhookUrl": "https://yournewwebhookurl.com"
}'
var client = new RestClient("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Api-Key", "{yourApiKey}");
request.AddParameter("application/json", "{\n\t\"Status\": \"Active\",\n\t\"WebhookUrl\": \"https://yournewwebhookurl.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

HttpRequest::methodRegister('PATCH');
$request = new HttpRequest();
$request->setUrl('https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders(array(
  'Api-Key' => '{yourApiKey}',
  'Content-Type' => 'application/json' 
));

$request->setBody('{
    "Status": "Active",
    "WebhookUrl": "https://yournewwebhookurl.com"
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
import http.client

conn = http.client.HTTPSConnection("mb-api.mindbodyonline.com")

payload = "{\n\t\"Status\": \"Active\",\n\t\"WebhookUrl\": \"https://yournewwebhookurl.com\"\n}"

headers = {
    'Api-Key': "{yourApiKey}",
    'Content-Type': "application/json"
    }

conn.request("PATCH", "/push/api/v1/subscriptions/{subscriptionId}", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Patch.new(url)
request["Api-Key"] = '{yourApiKey}'
request["Content-Type"] = 'application/json'
request.body = "{\n\t\"Status\": \"Active\",\n\t\"WebhookUrl\": \"https://yournewwebhookurl.com\"\n}"

response = http.request(request)
puts response.read_body

https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}

This endpoint can activate a new subscription or reactivate an inactive subscription that is associated with your developer portal account, by updating the status. You can also update your subscription’s eventIds, eventSchemaVersion, referenceId, and webhookUrl.

Headers

Name Type Description
API-Key string Your API key.

URL Parameters

Name Type Description
subscriptionId string The subscription’s ID (a GUID).

Request Body

Name Type Description
eventIds list of strings A list of event IDs that you want to update or subscribe to.
eventSchemaVersion number The event schema version associated with the subscription. Currently, this is always 1.
referenceId string An arbitrary field that you can set to a value of your choice. Mindbody stores and returns this value for the subscription you are activating. Most commonly, this field stores a GUID that you can use in your application.
webhookUrl string The URL registered as the target of the webhook deliveries. Mindbody posts the event notifications to this URL. Webhook URL Requirements lists considerations and requirements for this URL.
status string The subscription’s desired status. Possible values are Active or DeactivatedByUser.

Response

Example Response

{
    "subscriptionId": "85c8b693-e9ab-8f29-81e0-a9239ddb27d8",
    "status": "Active",
    "subscriptionCreationDateTime": "2019-03-19T06:52:21Z",
    "statusChangeDate": "2019-03-26T09:04:09Z",
    "statusChangeMessage": "TestSource changed status from DeactivatedByAdmin to Active",
    "statusChangeUser": "TestSource",
    "eventIds": [
        "classRosterBooking.created",
        "classRosterBookingStatus.updated",
        "classRosterBooking.cancelled",
        "classWaitlistRequest.created",
        "classWaitlistRequest.cancelled",
        "siteBusinessDayClosure.created",
        "siteBusinessDayClosure.cancelled",
        "client.created",
        "client.updated",
        "client.deactivated",
        "clientProfileMerger.created",
        "clientMembershipAssignment.created",
        "clientMembershipAssignment.cancelled",
        "clientSale.created",
        "site.created",
        "site.updated",
        "site.deactivated",
        "location.created",
        "location.updated",
        "location.deactivated",
        "staff.created",
        "staff.updated",
        "staff.deactivated",
        "appointmentBooking.created",
        "appointmentBooking.cancelled",
        "appointmentAddOn.created",
        "appointmentAddOn.deleted"
    ],
    "eventSchemaVersion": 1,
    "referenceId": "12345678",
    "webhookUrl": "https://yournewwebhookurl.com"
}
Name Type Description
subscriptionId string The subscription’s ID (a GUID).
status string The subscription’s current status, as of the last update.
subscriptionCreationDateTime string The UTC date and time when the subscription was created.
statusChangeDate string The UTC date and time when the subscription’s status was last updated.
statusChangeMessage string A message generated by Mindbody that explains why a subscription’s status changed.
statusChangeUser string The source name of the developer who changed the subscription’s status.
eventIds list of strings The events that are to be sent to this subscription’s webhookUrl.
eventSchemaVersion number The event schema version associated with the subscription. Currently, this is always 1.
referenceId string An arbitrary ID that can be specified in the POST Subscription request body, and is saved for the requesting developer’s use.
webhookUrl string The webhook to which the listed eventIds are sent.
messageSignatureKey string The subscription’s security key that you can use to verify an event payload’s authenticity. It is important that you store this value.
See X-Mindbody Signature Header for more details.

Errors

This endpoint may return the following errors. Mindbody recommends that you catch and handle each error for an optimal user experience. Mindbody also recommends that you attempt to reproduce each error during your development and test process to ensure that your application handles them correctly.

HTTP Status Code errorCode errorType Description
400 14000021 invalidSubscriptionId The subscriptionId that was returned is invalid.
404 14040001 resourceNotFound The subscriptionId passed as a URL Parameter was not found.
403 14030001 forbidden You are not authorized to use this endpoint.
400 14000010 invalidValueWebhookURLRequired The webhookUrl was either missing from the request body, or it was null.
400 14000011 invalidValueWebhookURLCannotBeBlank The webhookUrl was passed as an empty string.
400 14000012 invalidValueWebhookURLTooLong The webhookUrl exceeded 2083 characters in length.
400 14000016 invalidWebhookUrlBadFormat The webhookUrl uses an invalid format.
400 14000013 invalidValueWebhooksURLMissingHTTPS The webhookUrl is missing HTTPS.
400 14000014 invalidWebhookURLNoResponse The webhookUrl either returned a response outside of the 2xx HTTP status code range or it timed out.
400 14000015 invalidWebhookUrlError The webhookUrl is invalid.
400 14000006 invalidValueEventIdsRequired The eventIds property was either missing from the request body, or it was null.
400 14000007 invalidValueEventIdsCannotBeBlank The eventIds list was passed as an empty list.
400 14000008 invalidValueEventIds One or more of the passed eventIds was not valid.
400 14000009 invalidValueReferenceIdTooLong The referenceId exceeded 256 characters in length.
400 14000003 invalidEventSchemaVersionRequired The eventSchemaVersion was either missing from the request body, or it was passed as 0.
400 14000005 invalidEventSchemaVersion The eventSchemaVersion either does not exist or one or more of the passed eventIds does not support the eventSchemaVersion.
400 14000020 subscriptionStatusNotValid The status of the subscription is not valid.

DELETE

curl -X DELETE \
-H "API-Key: {yourAPIKey}" \
-A "{yourAppName}" \
"https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}"
var client = new RestClient("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}");
var request = new RestRequest(Method.DELETE);
request.AddHeader("api-key", "{yourAPIKey}");
IRestResponse response = client.Execute(request);
<?php

$request = new HttpRequest();
$request->setUrl('https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'api-key' => '{yourAPIKey}'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
import http.client

conn = http.client.HTTPSConnection("mb-api.mindbodyonline.com")

headers = {
    'api-key': "{yourAPIKey}"
    }

conn.request("DELETE", "/api/v1/subscriptions/{subscriptionId}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["api-key"] = '{yourAPIKey}'

response = http.request(request)
puts response.read_body

https://mb-api.mindbodyonline.com/push/api/v1/subscriptions/{subscriptionId}

This endpoint deactivates a subscription associated with the passed ID.

Headers

Name Type Description
API-Key string Your API key.

URL Parameters

Name Type Description
subscriptionId string The subscription ID (a GUID) that you are deactivating. This ID is the id property on the subscription object returned from the POST Subscription endpoint.

Response

{
    "message" : "Subscription deactivated successfully.",
    "deactivationDateTime" : "2018-01-01T08:00:00Z",
    "subscriptionId" : "0b2f2a18-5003-4d4e-a793-d16c95f72496",
    "referenceId" : "2bf12eec-30b5-492d-95eb-803c1705ddf4"
}
Name Type Description
message string A message about the deactivation request. Unless an error occurs, this message always "Subscription deactivated successfully.".
deactivationDateTime string The UTC date and time when the deactivation took place.
subscriptionId string The subscription’s ID (a GUID).
referenceId string The subscription’s reference ID, assigned when the subscription was created.

Errors

Example Error:

{
    "errors": [{
        "errorCode": "14040001",
        "errorType": "resourceNotFound",
        "errorMessage": "The requested resource could not be found."
    }]
}

This endpoint may return the following errors. Mindbody recommends that you catch and handle each error for an optimal user experience. Mindbody also recommends that you attempt to reproduce each error during your development and test process to ensure that your application handles them correctly.

HTTP Status Code errorCode errorType Description
400 14000018 genericDomainError The subscription has already been deactivated.
401 14010001 missingAPIKeyHeader An API-Key header was not included in the request.
403 14030001 forbidden You are not authorized to use this endpoint.
403 14030002 developerAccountNotActive Your developer portal account does not have live access. Request to go live, then re-try your request.
404 14040001 resourceNotFound The subscriptionId passed as a URL Parameter was not found.

Metrics

Metrics

Metrics allow you to check the state of all the subscriptions associated with your Public API account and to see their statistics.

GET

curl -X GET \
-H "API-Key: {yourAPIKey}" \
-A "{yourAppName}" \
"https://mb-api.mindbodyonline.com/push/api/v1/metrics"
var client = new RestClient("https://mb-api.mindbodyonline.com/push/api/v1/metrics");
var request = new RestRequest(Method.GET);
request.AddHeader("API-Key", "{yourAPIKey}");
IRestResponse response = client.Execute(request);
<?php

$request = new HttpRequest();
$request->setUrl('https://mb-api.mindbodyonline.com/push/api/v1/metrics');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'API-Key' => '{yourAPIKey}'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
?>
import http.client

conn = http.client.HTTPSConnection("mb-api.mindbodyonline.com")

headers = {
    'API-Key': "{yourAPIKey}"
    }

conn.request("GET", "/api/v1/metrics", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://mb-api.mindbodyonline.com/push/api/v1/metrics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["API-Key"] = '{yourAPIKey}'

response = http.request(request)
puts response.read_body

https://mb-api.mindbodyonline.com/push/api/v1/metrics

This endpoint gets metrics for all the subscriptions associated with your Public API developer account.

Headers

Name Type Description
API-Key string Your API key.

Response

HTTP Status Code: 200 OK

{
    "items": [
        {
            "subscriptionId" : "0b2f2a18-5003-4d4e-a793-d16c95f72496",
            "status" : "Active",
            "statusChangeDate" : null,
            "creationDateTime" : "2018-01-01T08:00:00Z",
            "messagesAttempted" : 10,
            "messagesDelivered" : 8,
            "messagesUndelivered" : 1,
            "messagesFailed" : 1
        }
    ]
}
Name Type Description
subscriptionId string The subscription’s ID (a GUID).
status string The subscription’s current status.
Possible Values:
  1. PendingActivation - The subscription is created but not receiving event notifications. To start receiving event notifications, set the subscription’s status to Active using the PATCH Subscription endpoint.
  2. Active - The subscription is active and can receive event notifications.
  3. DeactivatedByUser - You deactivated the subscription.
  4. DeactivatedByAdmin - Mindbody deactivated your subscription.
  5. DeactivatedTooManyFailedMessageDeliveryAttempts - The subscription was deactivated because Mindbody stopped receiving a 2xx HTTP status code from the webhookUrl when posting events. An automated email will be sent to the developer portal email on the account with additional details.
  6. DeactivatedByEventDeactivation - One of the event IDs associated with the subscription was deactivated, which invalidated and deactivated the subscription. If this occurs, you must create a new subscription using only up-to-date event IDs.
statusChangeDate string The UTC date and time when the subscription’s status was last updated.
creationDateTime string The UTC date and time when the subscription was created.
messagesAttempted number The number of event notifications Mindbody attempted to deliver to the subscription’s webhookUrl, including retries.
messagesDelivered number The number of event notifications Mindbody successfully delivered to the subscription’s webhookUrl.
messagesUndelivered number The number of event notifications where MINDBODy received a failure response from the subscription’s webhookUrl.
messagesFailed number The number of event notifications that Mindbody stopped trying to send after 3 hours.

Errors

Example Error:

{
    "errors": [{
        "errorCode": "14030002",
        "errorType": "developerAccountNotActive",
        "errorMessage": "Your developer account must be activated before you can use this API."
    }]
}

This endpoint may return the following errors. Mindbody recommends that you catch and handle each error for an optimal user experience. Mindbody also recommends that you attempt to reproduce each error during your development and test process to ensure that your application handles them correctly.

HTTP Status Code errorCode errorType Description
401 14010001 missingAPIKeyHeader An API-Key header was not included in the request.
403 14030001 forbidden You are not authorized to use this endpoint.
403 14030002 developerAccountNotActive Your developer portal account does not have live access. Request to go live, then re-try your request.

Events

Webhook API events are only delivered to subscriptions that are active at the time the event occurs. Events are not stored and delivered to subscriptions at a later time.

Event Base

Webhooks API events are structured identically, except for the event-specific information contained in the eventData property.

Event Body

{
    "messageId": "ASwFMoA2Q5UKw69g3RDbvU",
    "eventId": "site.created",
    "eventSchemaVersion": 1,
    "eventInstanceOriginationDateTime": "2018-04-18T10:02:55Z",
    "eventData": {eventDataObject}
}
Name Type Description
messageId string The event’s unique ID.
eventId string The ID that can be passed in the POST Subscription request’s eventIds list. This ID identifies the object structure returned in the eventData property. You can find all possible event data objects and their properties listed further down the page.
eventSchemaVersion number The message’s event schema version. Currently, this value is always 1.
eventInstanceOriginationDate string The date and time when a Mindbody business triggered the event.
eventData object The event data object. This value can be determined by the eventId property. You can find all possible event data objects and their properties listed further down the page.

Site

Site events encapsulate changes made to a Mindbody business’s details.

site.created

Summary

Mindbody sends this event when a new business subscribes to Mindbody’s services. This event is useful for integrations with cross-regional businesses. It is not needed when you develop an integration with a single Mindbody business.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "name": "ACME Yoga",
    "description": "A place for all ACME practitioners to refine their yoga-craft.",
    "logoURL": "https://clients.mindbodyonline.com/studios/ACMEYoga/logo_mobile.png?osv=637207744820527893",
    "pageColor1": "#000000",
    "pageColor2": "#000000",
    "pageColor3": "#000000",
    "pageColor4": "#000000",
    "pageColor5": "#000000",
    "acceptsVisa": true,
    "acceptsDiscover": false,
    "acceptsMasterCard": true,
    "acceptsAmericanExpress": false,
    "isEmailContactApproved": true,
    "isSmsPackageEnabled": false,
    "subscriptionLevel": "Accelerate 2.0",
    "isActive": true
}
Name Type Description
siteId number The Mindbody ID for the business.
name string The name of the business.
description string A description of the business.
logoURL string A URL that points to the logo image for the business.
pageColor1 string A hex code for a color the business owner uses in their marketing. This color can be used to “theme” an integration so that it matches the configured color-scheme for the business.
pageColor2 string The hex code for a second color, to be used in the same manner as pageColor1.
pageColor3 string The hex code for a third color, to be used in the same manner as pageColor1.
pageColor4 string The hex code for a fourth color, to be used in the same manner as pageColor1.
pageColor5 string The hex code for a fifth color, to be used in the same manner as pageColor1.
acceptsVisa bool When true, indicates that the business accepts Visa credit cards.
acceptsDiscover bool When true, indicates that the business accepts Discover credit cards.
acceptsMasterCard bool When true, indicates that the business accepts Master Card credit cards.
acceptsAmericanExpress bool When true, indicates that the business accepts American Express credit cards.
isEmailContactApproved bool When true, indicates that the business uses email to communicate with its clients.
isSmsPackageEnabled bool When true, indicates that the business uses SMS text messages to communicate with its clients.
pricingLevel string The Mindbody pricing level for the business. This property is now deprecated. Use subscriptionLevel instead.
subscriptionLevel string The Mindbody subscription level for the business.

Possible Values:
  1. No Subscription
  2. Accelerate
  3. Essential
  4. Legacy
  5. Connect Listing
  6. Pro
  7. Solo
  8. Essential 2.0
  9. Accelerate 2.0
  10. Ultimate 2.0
  11. Starter
isActive bool When true, indicates that the business is an active business with Mindbody.

site.updated

Summary

Mindbody sends this event when the business changes any of the fields in the site.created event object.

Event Data Object

This event object is the same as the site.created event object.

site.deactivated

Summary

Mindbody sends this event when a business is deactivated.

Event Data Object

This event object is the same as the site.created event object.

Business Day Closure

Mindbody sends site business day closure events when a business owner or staff member schedules or cancels a closed business day.

siteBusinessDayClosure.created

Summary

Mindbody sends this event when a business schedules a day or date-range for which the business is closed.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "businessDayClosureId": 10,
    "nameClosedDay": "Memorial Day",
    "startDateTime": "2018-05-28T00:00:00",
    "endDateTime": "2018-05-29T00:00:00",
    "serviceCategoriesAffectedIds": [1, 3, 6]
}
Name Type Description
siteId number The Mindbody ID for the business.
businessDayClosureId int The ID of the business day closure.
nameClosedDay string The display name of the closure.
startDateTime string The first day in a date range for which the business is to be closed.
endDateTime string The last day in a date range for which the business is to be closed.
serviceCategoriesAffectedIds list of int The service category IDs that are to be removed from the business’ schedule between the closure’s startDateTime and endDateTime.

siteBusinessDayClosure.cancelled

Summary

Mindbody sends this event when a business removes a closed business day from their schedule.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "businessDayClosureId": 10
}
Name Type Description
siteId number The Mindbody ID for the business.
businessDayClosureId int The ID of the closure that the business removed from their schedule.

Location

Mindbody sends location events when changes are made to locations of a business.

location.created

Summary

Mindbody sends this event when a business owner asks Mindbody to add a new location for their business.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "locationId": 2,
    "name": "ACME Yoga (Downtown)",
    "description": "Our downtown location.",
    "hasClasses": true,
    "phoneExtension": null,
    "addressLine1": "123 ABC Ct",
    "addressLine2": null,
    "city": "San Luis Obispo",
    "state": "CA",
    "postalCode": "93401",
    "phone": "8055551234",
    "latitude": 150.0,
    "longitude": 120.0,
    "tax1": .10,
    "tax2": 0,
    "tax3": 0,
    "tax4": 0,
    "tax5": 0,
    "webColor5": "#000000"
}
Name Type Description
siteId number The Mindbody ID for the business.
locationId number The location ID.
name string The location name.
description string The location description.
hasClasses bool When true, indicates that the location has classes scheduled at it.
phoneExtension string The location’s phone number extension.
addressLine1 string Line one of the location’s street address.
addressLine2 string Line two of the location’s street address.
city string The city the location is in.
state string The state the location is in.
postalCode string The location’s postal code.
phone string The location’s phone number.
latitude number The location’s latitude coordinate.
longitude number The location’s longitude coordinate.
tax1 number One of the tax rates used at the location to tax products and services.
tax2 number One of the tax rates used at the location to tax products and services.
tax3 number One of the tax rates used at the location to tax products and services.
tax4 number One of the tax rates used at the location to tax products and services.
tax5 number One of the tax rates used at the location to tax products and services.
webColor5 string A hex code for a color the business owner uses in their marketing. This color can be used to “theme” an integration so that it matches the configured color-scheme for this location.

location.updated

Summary

Mindbody sends this event when a business changes any of the fields in the location.created event object.

Event Data Object

This event object is the same as the location.created event object.

location.deactivated

Summary

Mindbody sends this event when a business deactivates one of its locations.

Event Data Object

This event object is the same as the location.created event object.

Appointment

Mindbody sends appointment events when an appointment is booked or cancelled at a business.

appointmentBooking.created

Summary

Mindbody sends this event when a client or staff member adds an appointment to a staff member’s schedule.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
  "siteId": 123,
  "appointmentId": 121,
  "status": "Scheduled",
  "isConfirmed": true,
  "hasArrived": false,
  "locationId": 1,
  "clientId": "100000120",
  "clientFirstName": "John",
  "clientLastName": "Smith",
  "clientEmail": "[email protected]",
  "clientPhone": "8055551234",
  "staffId": 5,
  "staffFirstName": "Jane",
  "staffLastName": "Doe",
  "startDateTime": "2018-03-15T17:12:00Z",
  "endDateTime": "2018-03-15T18:12:00Z",
  "durationMinutes": 60,
  "genderRequested": null,
  "resources": [
    {
      "id": 1,
      "name": "Room A"
    }
  ],
  "notes": null,
  "formulaNotes": null,
  "icdCodes": [
    {
        "code": "123abc",
        "description": "Deep muscular repair"
    }
  ],
  "providerId": null,
  "sessionTypeId": 17,
  "appointmentName": "60 min deep muscular repair massage"
}
Name Type Description
siteId number The Mindbody ID for the business.
appointmentId number The appointment ID.
status string The appointment status.

Possible Values:
  1. Scheduled - The appointment is on the business calendar.
  2. Cancelled - The appointment was cancelled and is no longer on the business calendar.
isConfirmed bool When true, indicates that the client confirmed the appointment reservation.
hasArrived bool When true, indicates that a staff member noted that the client arrived for the appointment.
locationId int The ID of the location where the appointment is booked.
clientId string The public ID of the client for whom the appointment is booked.
clientFirstName string The client’s first name.
clientLastName string The client’s last name.
clientEmail string The client’s email address.
clientPhone string The client’s phone number.
staffId number The ID of the staff member who is to provide the appointment service.
staffFirstName string The staff member’s first name.
staffLastName string The staff member’s last name.
startDateTime string The UTC date and time when the appointment starts.
endDateTime string The UTC date and time when the appointment ends.
Note: Appointments cannot span multiple days.
durationMinutes number The duration of the appointment in minutes.
genderRequested string Indicates which gender of staff member the client prefers for the appointment.

Possible Values:
  1. null - The client did not specify a preferred staff member gender.
  2. Male - The client prefers that a male staff member provide the appointment service.
  3. Female - The client prefers that a female staff member provide the appointment service.
resources list of objects Contains a list of the room(s) where this appointment may be held, or resource(s) it may use.
resources[].id number The room/resource ID.
resources[].name string The room/resource name.
notes string Appointment notes added by staff members.
formulaNotes string The most recent formula note added to the client’s profile by a staff member.
icdCodes list of objects Contains a list of the ICD or CPT codes attached to the appointment.
icdCodes[].code string The ICD or CPT code.
icdCodes[].description string A brief description of the ICD or CPT code.
providerId string The staff member’s provider ID.
sessionTypeId number The session type associated with the new appointment.
appointmentName string The name of the appointment type.

appointmentBooking.updated

Summary

Mindbody sends this event when a change is made to any of the properties in the appointmentBooking.created event object.

Event Data Object

This event object is the same as the appointmentBooking.created event object.

appointmentBooking.cancelled

Summary

Mindbody sends this event when a business removes an appointment from the schedule.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "appointmentId": 121
}
Name Type Description
siteId number The Mindbody ID for the business.
appointmentId number The ID of the appointment that was cancelled.

appointmentAddOn.created

Summary

Mindbody sends this event when an add-on is created.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{ 
  "messageId": "MpPJtHF3732inxZ7n9BrxS", 
  "eventId": "appointmentAddOn.created", 
  "eventSchemaVersion": 1, 
  "eventInstanceOriginationDateTime": "2020-08-05T16:51:31Z", 
  "eventData": { 
    "siteId": 123, 
    "appointmentId": 30275, 
    "addOnAppointmentId": 30276, 
    "addOnName": "Hot stones add-on", 
    "clientId": "100000120", 
    "staffId": 12 
} 
Name Type Description
siteId number The Mindbody ID for the business.
appointmentId number The appointment ID the add-on was added to.
addOnAppointmentId number The appointment add-on ID.
addOnName string The name of the appointment add-on.
clientId string The public ID of the client for whom the appointment add-on is booked.
staffId number The ID of the staff member who is to provide the appointment add-on service.

appointmentAddOn.deleted

Summary

Mindbody sends this event when an add-on is deleted.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{ 
  "messageId": "BCzdSUNDmR9aTuzpEiHH7e", 
  "eventId": "appointmentAddOn.deleted", 
  "eventSchemaVersion": 1, 
  "eventInstanceOriginationDateTime": "2020-08-15T00:04:05Z", 
  "eventData": { 
    "siteId": 123, 
    "addOnAppointmentId": 30276 
  } 

} 
Name Type Description
siteId number The Mindbody ID for the business.
addOnAppointmentId number The appointment add-on ID.

Class Schedule

Mindbody sends class schedule events when changes are made to a scheduled class. Class schedules group classes together and define on which days and at what times classes occur. Class schedules represent the group of classes added to a business, not individual classes.

classSchedule.created

Summary

Mindbody sends this event when a business schedules a new class offering.

Public API Actions

If you receive this event and are caching classes, you can call the GetClasses endpoint in the Public API and add the new classes to your system’s caches.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
  "siteId": 123,
  "locationId": 1,
  "classScheduleId": 8,
  "classDescriptionId": 15,
  "resources": [
    {
      "id": 1,
      "name": "Room A"
    }
  ],
  "maxCapacity": 24,
  "webCapacity": 20,
  "staffId": 5,
  "staffName": "Jane Doe",
  "isActive": true,
  "startDate": "2018-07-22",
  "endDate": "2020-07-22",
  "startTime": "10:30:00",
  "endTime": "11:30:00",
  "daysOfWeek": [
    "Monday",
    "Wednesday",
    "Friday"
  ],
  "assistantOneId": 123,
  "assistantOneName": "Maria Rodriguez",
  "assistantTwoId": 345,
  "assistantTwoName": "Patricia Wang"
}
Name Type Description
siteId number The Mindbody ID for the business.
locationId number The ID of the location where the class schedule was added.
classScheduleId number The class schedule’s ID.
classDescriptionId number The class schedule’s class description ID. Used to link to a class description.
resources list of objects Contains a list of the room(s) where the classes offered in this class schedule may be held, or resource(s) that any of the classes offered in this class schedule may use.
resources[].id number The room/resource ID.
resources[].name string The room/resource name.
maxCapacity number The total number of spaces available in each class associated with the class schedule.
webCapacity number The total number of spaces that clients can reserve.
staffId number The ID of the staff member that is teaching the class.
staffName string The staff member’s name.
isActive bool When true, the class schedule is active and shown on the schedule.
startDate string The first date on which classes in this schedule are held.
endDate string The last date on which classes in this schedule are held.
startTime string The time of day when the class starts.
endTime string The time of day when the class ends.
daysOfWeek list of strings The days of the week on which this class schedule adds classes to the business schedule.
assistantOneId nullable number The first assistant’s staff ID.
assistantOneName string The first assistant’s name.
assistantTwoId nullable number The second assistant’s staff ID.
assistantTwoName string The second assistant’s name.

classSchedule.updated

Summary

Mindbody sends this event when a business changes any of the fields in the classSchedule.created event object. Note that if the class schedule’s endDate changes, classes are added or removed from the schedule accordingly.

Public API Actions

If you receive this event and are caching classes, you can call the GetClasses endpoint in the Public API and update your system’s caches.

Event Data Object

This event object is the same as the classSchedule.created event object.

classSchedule.cancelled

Summary

Mindbody sends this event when a business cancels a class schedule. When this occurs, all of the classes associated with the schedule are removed.

Public API Actions

If you receive this event and are caching classes, you can remove classes associated with the deleted class schedule from your system’s caches.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

Name Type Description
siteId number The Mindbody ID for the business.
classScheduleId number The class schedule’s ID.

Class

Mindbody sends class events when changes are made to a single class instance, that is, one class on a specific date at a specific time, not a range of classes.

class.updated

Summary

Mindbody sends this event when a business changes a single class.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "locationId": 1,
    "classId": 201,
    "classScheduleId": 5,
    "isCancelled": false,
    "isStaffASubstitute": false,
    "isWaitlistAvailable": true,
    "isIntendedForOnlineViewing": true,
    "staffId": 10,
    "staffName": "Jane Doe",
    "startDateTime": "2018-07-17T12:00:00Z",
    "endDateTime": "2018-07-17T13:00:00Z",
    "classDescriptionId": 21,
    "assistantOneId": 456,
    "assistantOneName": "Linda Da Silva",
    "assistantTwoId": null,
    "assistantTwoName": null,
    "resources": [
        {
            "id": 1,
            "name": "Room A"
        }
    ]
}
Name Type Description
siteId number The Mindbody ID for the business.
locationId number The ID of the location where the class takes place.
classId number The individual class’s ID.
classScheduleId number The ID of the class schedule to which the class belongs.
isCancelled bool When true, indicates that the class is cancelled.
isStaffASubstitute bool When true, indicates that the teacher for this class is a substitute teacher, and not the regularly scheduled teacher.
isWaitlistAvailable bool When true, indicates that the class has a waiting list to which clients can be added if the class is already full.
isIntendedForOnlineViewing bool When true, indicates that the class should be shown to clients. Otherwise, this class should not be visible to the clients of the business.
staffId number The ID of the staff member teaching the class.
staffName string The name of the staff member teaching the class.
startDateTime string The UTC date and time when the class starts.
endDateTime string The UTC date and time when the class ends.
classDescriptionId number The class schedule’s class description ID. Used to link to a class description.
assistantOneId nullable number The first assistant’s staff ID.
assistantOneName string The first assistant’s name.
assistantTwoId nullable number The second assistant’s staff ID.
assistantTwoName string The second assistant’s name.
resources list of objects Contains a list of the room(s) where this individual class may be held, or resource(s) it may use.
resources[].id number The room/resource ID.
resources[].name string The room/resource name.

Class Booking

Mindbody sends class booking events when a client is booked into a class at a business.

classRosterBooking.created

Summary

Mindbody sends this event when a client is booked into a class.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "locationId": 1,
    "classId": 201,
    "classRosterBookingId": 11,
    "classStartDateTime": "2018-07-17T12:00:00Z",
    "classEndDateTime": "2018-07-17T13:00:00Z",
    "signedInStatus": "SignedIn",
    "staffId": 12,
    "staffName": "Jane Doe",
    "maxCapacity": 20,
    "webCapacity": 15,
    "totalBooked": 10,
    "webBooked": 8,
    "totalWaitlisted": 0,
    "clientId": "100000009",
    "clientUniqueId": 100000009,
    "clientFirstName": "John",
    "clientLastName": "Smith",
    "clientEmail": "[email protected]",
    "clientPhone": "8055551234",
    "clientPassId": "112",
    "clientPassSessionsTotal": 10,
    "clientPassSessionsDeducted": 1,
    "clientPassSessionsRemaining": 9,
    "clientPassActivationDateTime": "2017-07-17T00:00:00Z",
    "clientPassExpirationDateTime": "2018-07-17T00:00:00Z",
    "bookingOriginatedFromWaitlist": false,
    "clientsNumberOfVisitsAtSite": 6,
    "itemId": 12345,
    "itemName": "Yoga 5 Pass",
    "itemSiteId": 1234567
}
Name Type Description
siteId number The Mindbody ID for the business.
locationId number The ID of the location where the class being booked takes place.
classId number The ID of the class for which the booking was made.
classRosterBookingId number The booking ID.
classStartDateTime string The UTC date and time when the class starts.
classEndDateTime string The UTC date and time when the class ends.
signedInStatus string The current status of the booking.

Possible Values:
  1. "SignedIn" - Indicates that the client has been signed in for the class.
  2. "NotSignedIn" - Indicates that the client is on the class roster, but is not yet marked as signed in for the class.
  3. "LateCancelled" - Indicates that the booking was late cancelled.
  4. "EarlyCancelled" - Indicates that the booking was early cancelled
staffId number The ID of the staff member who teaches the class.
staffName string The name of the staff member who teaches the class.
maxCapacity number The total number of spaces available on the class roster.
webCapacity number The total number of bookings that can be made by clients from a mobile application, the Public API, or the online schedule for the business.
totalBooked number The number of spaces booked in the class.
webBooked number The number of spaces booked in the class that originated from a mobile app, the Public API, or the online schedule for the business.
totalWaitlisted number The number of clients currently on the waiting list for the class.
clientId string The public ID of the client booking the class.
clientUniqueId number The client’s system generated ID at the business. This value cannot be changed by business owners and is always unique across all clients at the business.
clientFirstName string The client’s first name.
clientLastName string The client’s last name.
clientEmail string The client’s email.
clientPhone string The client’s phone number.
clientPassId string The ID of the pass used to pay for the booking. This value is null if the client does not have a pass to pay for the booking.
clientPassSessionsTotal nullable number The total number of visits the pass can pay for. This value is null if the client does not have a pass to pay for the booking.
clientPassSessionsDeducted nullable number The total number of visits that the pass has already paid for. This value is null if the client does not have a pass to pay for the booking.
clientPassSessionsRemaining nullable number The total number of visits remaining on this pass. The value is null if the client does not have a pass to pay for the booking.
clientPassActivationDateTime string The date on and after which the pass can pay for visits. The pass will pay for visits before this date if the business has disabled the Pricing Option Activation Dates - Enforce option on their General Setup & Options page. This value is null if the client does not have a pass to pay for the booking.
clientPassExpirationDateTime string The date after which the pass expires and can no longer pay for visits. This value is null if the client does not have a pass to pay for the booking.
bookingOriginatedFromWaitlist bool When true, indicates that the booking was moved from the waiting list into the class.
clientsNumberOfVisitsAtSite number The total number of visits the client has made to the business.
itemId number The business’s ID for the pricing option used to pay for the class booking. This is Services[].ProductId returned by GET Services in Public API.
itemName string The business’s name for the pricing option used to pay for the class booking.
itemSiteId number For a cross-regional booking, this is the site ID at which the pricing option used to pay for the class booking was purchased. For a non-cross-regional booking, the value will be null.

classRosterBookingStatus.updated

Summary

Mindbody sends this event when a booking is altered in a way that does not result in it being cancelled.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "locationId": 1,
    "classId": 201,
    "classRosterBookingId": 11,
    "classDateTime": "2018-07-17T12:00:00Z",
    "signedInStatus": "SignedIn",
    "staffId": 12,
    "clientId": "100000009",
    "clientUniqueId": 100000009,
    "clientFirstName": "John",
    "clientLastName": "Smith",
    "clientEmail": "[email protected]",
    "clientPhone": "8055551234",
    "itemId": 2401,
    "itemName": "Hot Yoga Drop In",
    "itemSiteId": 12345,
    "clientPassId": "46791"
}
Name Type Description
siteId number The Mindbody ID for the business.
locationId number The ID of the location where the class being booked takes place.
classId number The ID of the class for which the booking was made.
classRosterBookingId number The booking ID.
classDateTime string The UTC date and time when the class starts.
signedInStatus string The current status of the booking.

Possible Values:
  1. "SignedIn" - Indicates that the client has been signed in for the class.
  2. "NotSignedIn" - Indicates that the client is on the class roster, but is not yet marked as signed in for the class.
  3. "LateCancelled" - Indicates that the booking was late cancelled.
  4. "EarlyCancelled" - Indicates that the booking was early cancelled
staffId number The ID of the staff member who teaches the class.
clientId string The public ID of the booking client.
clientUniqueId number The client’s system generated ID for whom you want to update class roster. This value cannot be changed by business owners and is always unique across all clients at the business.
clientFirstName string The booking client’s first name.
clientLastName string The booking client’s last name.
clientEmail string The booking client’s email.
clientPhone string The booking client’s phone number.
itemId number The business’s ID for the pricing option used to pay for the class booking. This is Services[].ProductId returned by GET Services in Public API.
itemName string The business’s name for the pricing option used to pay for the class booking.
itemSiteId number For a cross-regional booking, this is the site ID at which the pricing option used to pay for the class booking was purchased. For a non-cross-regional booking, the value will be null.
clientPassId string The ID of the pass used to pay for the booking. This value is null if the client does not have a pass to pay for the booking.

classRosterBooking.cancelled

Summary

Mindbody sends this event when a booking is cancelled.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "locationId": 1,
    "classId": 201,
    "classRosterBookingId": 11,
    "clientId": "100000009",
    "clientUniqueId": 100000009
}
Name Type Description
siteId number The Mindbody ID for the business.
locationId number The ID of the location where the class being booked takes place.
classId number The ID of the class for which the booking was made.
classRosterBookingId number The ID of the booking.
clientId string The public ID of the booking client.
clientUniqueId number The client’s system generated ID for whom you want to cancel class roster. This value cannot be changed by business owners and is always unique across all clients at the business.

Class Waitlist

Mindbody sends class waiting list events when a client is added to or removed from a class waiting list.

classWaitlistRequest.created

Summary

Mindbody sends this event when a client is added to a class waiting list.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "locationId": 1,
    "classId": 201,
    "classScheduleId": 6,
    "waitlistEntryId": 157,
    "waitlistMaxSize": 5,
    "clientId": "100000009",
    "clientUniqueId": 100000009,
    "clientEmail": "[email protected]",
    "clientPhone": "8055551234",
    "classStartDateTime": "2018-07-17T12:00:00Z",
    "classEndDateTime": "2018-07-17T13:00:00Z",
    "clientsNumberOfVisitsAtSite": 6
}
Name Type Description
siteId number The Mindbody ID for the business.
locationId number The ID of the location where the class with this waiting list takes place.
classId number The ID of the class the waiting list is for.
classScheduleId number The class schedule’s ID.
waitlistEntryId number The ID for this specific client and waiting list pairing.
waitlistMaxSize number The total number of spaces available on the waiting list.
clientId string The public ID of the client being added to the waiting list.
clientUniqueId number The client’s system generated ID whom you want to add to a class waiting list. This value cannot be changed by business owners and is always unique across all clients at the business.
clientEmail string The email of the client who is trying to book the class.
clientPhone string The phone number of the client who is trying to book the class.
classStartDateTime string The UTC date and time when the class starts.
classEndDateTime string The UTC date and time when the class ends.
clientsNumberOfVisitsAtSite number The total number of visits the client has made to the business.

classWaitlistRequest.cancelled

Summary

Mindbody sends this event when a client is removed from a class waiting list.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "waitlistEntryId": 157
}
Name Type Description
siteId number The Mindbody ID for the business.
waitlistEntryId number The ID for this specific client and waiting list pairing.

Class Description

Mindbody sends class description events when an owner or staff member changes a class name or description.

classDescription.updated

Summary

Mindbody sends this event when a change is made to a class’s name or description. When this event is sent, you should update all class names and descriptions for classes associated with class schedules that use this description.

Public API Actions

If you receive this event and you caching class descriptions, you can call the GetClassDescriptions endpoint in the Public API and refresh your system’s caches.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "id": 11,
    "name": "Beginning Hatha Yoga",
    "description": "A great, gentle introduction to the Hatha practice."
}
Name Type Description
siteId number The Mindbody ID for the business.
id number The ID of the class description.
name string The name for all classes associated with class schedules that use this class description.
description string The description for all classes associated with class schedules that use this class description.

Client

Mindbody sends client events when a staff member or client changes the client’s information.

client.created

Summary

Mindbody sends this event when a new client is added to a business.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "clientId": "100000009",
    "clientUniqueId": 100000009,
    "creationDateTime": "2018-08-28T06:45:58Z",
    "status": "Non-Member",
    "firstName": "John",
    "lastName": "Smith",
    "email": "[email protected]",
    "mobilePhone": "8055551234",
    "homePhone": null,
    "workPhone": null,
    "addressLine1": "123 ABC Ct",
    "addressLine2": ,
    "city": "San Luis Obispo",
    "state": "CA",
    "postalCode": "93401",
    "country": "US",
    "birthDateTime": "1989-07-02T00:00:00Z",
    "gender": "Male",
    "appointmentGenderPreference": null,
    "firstAppointmentDateTime": "2018-08-29T06:45:58Z",
    "referredBy": null,
    "isProspect": false,
    "isCompany": false,
    "isLiabilityReleased": true,
    "liabilityAgreementDateTime": "2018-08-29T06:45:58Z",
    "homeLocation": 1,
    "clientNumberOfVisitsAtSite": 2,
    "indexes": [
        {
            "indexName": "LongtermGoal",
            "indexValue": "IncreasedFlexibility"
        }
    ],
    "sendPromotionalEmails": true,
    "sendScheduleEmails": true,
    "sendAccountEmails": true,
    "sendPromotionalTexts": false,
    "sendScheduleTexts": false,
    "sendAccountTexts": false,
    "creditCardLastFour": "1445",
    "creditCardExpDate": "2025-06-30T00:00:00Z",
    "directDebitLastFour": "7754",
    "notes": "Notes about the client.",
    "photoUrl": "https://clients.mindbodyonline.com/studios/ACMEYoga/clients/100000009_large.jpg?osv=637136734414821811",
    "previousEmail": null
}
Name Type Description
siteId number The Mindbody ID for the business.
clientId string The client’s public ID, used frequently in the Public API.
clientUniqueId number The client’s system generated ID when a new client is added to a business. This value cannot be changed by business owners and is always unique across all clients at the business.
creationDateTime string The UTC date and time when the client was added to the business.
status string The client’s membership status. Because each business can add custom statuses, these values can differ from one business to another. The Mindbody standard status values follow:
  1. "Active" - The client has an active membership on file.
  2. "Non-member" - The client has never purchased a membership pricing option.
  3. "Expired" - The client has purchased a membership pricing option at least once, but the pricing option has either expired or has been used up.
  4. "Suspended" - The client had an active membership, but either the contract associated with the membership or the client’s account is suspended.
  5. "Terminated" - The client had an active membership, but its associated contract was terminated.
  6. "Declined" - The client’s last automatic membership payment was declined.
firstName string The client’s first name.
lastName string The client’s last name.
email string The client’s email address.
mobilePhone string The client’s mobile phone number.
homePhone string The client’s home phone number.
workPhone string The client’s work phone number.
addressLine1 string Line one of the client’s street address.
addressLine2 string Line two of the client’s street address.
city string The city in which the client’s address is located.
state string The state in which the client’s address is located.
postalCode string The client’s postal code.
country string The country in which client’s address is located.
birthDateTime string The client’s birth date.
gender string The client’s gender. Note that this field may be any value, depending on the gender options configured by the business.
appointmentGenderPreference string Indicates which gender of staff member the client prefers to provide their appointment services.

Possible Values:
  1. "Male" - The client prefers male staff members to perform their appointment services.
  2. "Female" - The client prefers female staff members to provide their appointment services.
  3. null - The client does not have a gender preference for appointment services.
firstAppointmentDateTime string The UTC date and time of the client’s first visit to the site.
referredBy string How the client was referred to the business.
isProspect bool When true, indicates that the client is a prospect.
isCompany bool When true, indicates that the client represents a company, not an individual.
isLiabilityReleased bool When true, indicates that the client has agreed to the liability waiver for the business.
liabilityAgreementDateTime string The UTC date and time when the client agreed to the business’s liability waiver.
homeLocation number The business location where the client will most frequently obtain services.
clientNumberOfVisitsAtSite number The total number of visits the client has made to the business.
indexes list of objects Contains information about the client’s client indexes and their values.
indexes.indexName string The name of the client index.
indexes.indexValue string The value of the client index.
sendPromotionalEmails bool When true, indicates that the client is to receive Promotional emails, if the subscriber has enabled these emails. When false, indicates that the client is not to receive these emails from the subscriber.
sendScheduleEmails bool When true, indicates that the client is to receive Client Schedule emails, if the subscriber has enabled these emails. When false, indicates that the client is not to receive these emails from the subscriber.
sendAccountEmails bool When true, indicates that the client is to receive Account Update emails, if the subscriber has enabled these emails. When false, indicates that the client is not to receive these emails from the subscriber.
sendPromotionalTexts bool When true, indicates that the client is to receive Promotional text messages, if the subscriber has enabled these text messages. When false, indicates that the client is not to receive these text messages from the subscriber.
sendScheduleTexts bool When true, indicates that the client is to receive Client Schedule text messages, if the subscriber has enabled these text messages. When false, indicates that the client is not to receive these text messages from the subscriber.
sendAccountTexts bool When true, indicates that the client is to receive Account Update text messages, if the subscriber has enabled these text messages. When false, indicates that the client is not to receive these text messages from the subscriber.
creditCardLastFour string The last four characters of the client’s stored credit card.
creditCardExpDate string The expiration date of the client’s stored credit card.
directDebitLastFour string The last four characters of the client’s stored bank account.
notes string The first thousand characters of the client’s account notes.
photoUrl string The URL of the client’s profile picture.
previousEmail string The client’s email address before the client was updated. When null, indicates that the email is unchanged. All other values represent the previous email.

client.updated

Summary

Mindbody sends this event when a business or client changes any of the properties in the client.created event object.

Public API Actions

Mindbody strongly recommends that developers call the GetClients endpoint in the Public API daily to re-pull all clients and update caches.

Event Data Object

This event object is the same as the client.created event object.

client.deactivated

Summary

Mindbody sends this event when a business or client deactivates a client at the business.

Event Data Object

This event object is the same as the client.created event object.

Merge

Mindbody sends merge events when an owner or staff member merges one client into another.

clientProfileMerger.created

Summary

Mindbody sends this event when a business merges one client into another.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "mergeDateTime": "2016-08-28T06:45:58Z",
    "mergedByStaffId": 11,
    "keptClientId": "100000009",
    "keptClientUniqueId": 100000009,
    "removedClientUniqueId": 100000008
}
Name Type Description
siteId number The Mindbody ID for the business.
mergeDateTime string The UTC date and time when the merge happened.
mergedByStaffId number The ID of the staff member who merged the two clients.
keptClientId string The client’s public ID, used frequently in the Public API.
keptClientUniqueId number The client’s system generated ID whom you want to keep in the system. This value cannot be changed by business owners and is always unique across all clients at the business.
removedClientUniqueId number The client’s system generated ID whom you want to remove from the system. This value cannot be changed by business owners and is always unique across all clients at the business.

Membership

Mindbody sends membership events when a client gets or loses a membership.

clientMembershipAssignment.created

Summary

Mindbody sends this event when a client gets a new membership.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "clientId": "100000009",
    "clientUniqueId": 100000009,
    "clientFirstName": "John",
    "clientLastName": "Smith",
    "clientEmail": "[email protected]",
    "membershipId": 12,
    "membershipName": "Gold Level Member"
}
Name Type Description
siteId number The Mindbody ID for the business.
clientId string The client’s public ID, used frequently in the Public API.
clientUniqueId number The client’s system generated ID whom a new membership gets assigned. This value cannot be changed by business owners and is always unique across all clients at the business.
clientFirstName string The client’s first name.
clientLastName string The client’s last name.
clientEmail string The client’s email address.
membershipId number The ID of the membership that is being added to the client’s account.
membershipName string The name of the membership that is being added to the client’s account.

clientMembershipAssignment.cancelled

Summary

Mindbody sends this event when a business removes a membership from a client’s account.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "clientId": "100000009",
    "membershipId": 12
}
Name Type Description
siteId number The Mindbody ID for the business.
clientId string The client’s public ID, used frequently in the Public API.
membershipId number The ID of the membership that is being added to the client’s account.

Contract

Mindbody sends contract events when changes are made to a client’s contract.

clientContract.created

Summary

Mindbody sends this event when a client purchases a contract, or a staff member sells a contract to a client.

Public API Actions

If you receive this event and are caching client contracts, we strongly suggest that you call the GetClientContracts endpoint in the Public API so you can cache all of the contract’s details.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "clientId": "100000009",
    "clientUniqueId": 100000009,
    "clientFirstName": "John",
    "clientLastName": "Smith",
    "clientEmail": "[email protected]",
    "agreementDateTime": "2018-03-20T10:29:42Z",
    "contractSoldByStaffId": 12,
    "contractSoldByStaffFirstName": "Jane",
    "contractSoldByStaffLastName": "Doe",
    "contractOriginationLocation": 1,
    "contractId": 3,
    "contractName": "Gold Membership Contract",
    "clientContractId": 117,
    "contractStartDateTime": "2018-03-20T00:00:00Z",
    "contractEndDateTime": "2019-03-20T00:00:00Z",
    "isAutoRenewing": true
}
Name Type Description
siteId number The Mindbody ID for the business.
clientId string The client’s public ID, used frequently in the Public API.
clientUniqueId number The client’s system generated ID for whom contract is purchased or a staff member sells a contract. This value cannot be changed by business owners and is always unique across all clients at the business.
clientFirstName string The client’s first name.
clientLastName string The client’s last name.
clientEmail string The client’s email address.
agreementDateTime string The UTC date and time when the client agreed to the contract’s terms and conditions.
contractSoldByStaffId number The ID of the staff member who sold the contract to the client. This value is null if the client purchased the contract using a mobile application, the Public API, or the business’s online store.
contractSoldByStaffFirstName string The first name of the staff member who sold the contract to the client. This value is null if the client purchased the contract using a mobile application, the Public API, or the business’s online store.
contractSoldByStaffLastName string The last name of the staff member who sold the contract to the client. This value is null if the client purchased the contract using a mobile application, the Public API, or the business’s online store.
contractOriginationLocation number The ID of the location from which the contract was sold. 98 indicates that it was purchased by a client using a mobile application, the Public API, or the business’s online store.
contractId number The contract’s ID.
contractName string The contract’s name.
clientContractId number The unique identifier for the contract and client pairing.
contractStartDateTime string The date when the contract’s billing cycle starts.
contractEndDateTime string The date when the contract’s billing cycle ends.
isAutoRenewing bool When true, indicates that the contract automatically renews once it reaches its contractEndDateTime.

clientContract.updated

Summary

Mindbody sends this event when a client’s contract is changed. Note that both contract suspensions and terminations count as changes, not as cancellations.

Public API Actions

If you receive this event and are caching client contracts, we strongly suggest that you call the GetClientContracts endpoint in the Public API so you can cache all of the contract’s details.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "agreementDateTime": "2018-03-20T10:29:42Z",
    "clientId": "100000009",
    "clientUniqueId": 100000009,
    "clientContractId": 117,
    "contractStartDateTime": "2018-03-20T00:00:00Z",
    "contractEndDateTime": "2019-03-20T00:00:00Z",
    "isAutoRenewing": true
}
Name Type Description
siteId number The Mindbody ID for the business.
agreementDateTime string The UTC date and time when the client agreed to the contract’s terms and conditions.
clientId string The client’s public ID, used frequently in the Public API.
clientUniqueId number The client’s system generated ID for whom contract is updated (suspensions and terminations). This value cannot be changed by business owners and is always unique across all clients at the business.
clientContractId number The unique identifier for the contract and client pairing.
contractStartDateTime string The date when the contract’s billing cycle starts.
contractEndDateTime string The date when the contract’s billing cycle ends.
isAutoRenewing bool When true, indicates that the contract automatically renews once it reaches its contractEndDateTime.

clientContract.cancelled

Summary

Mindbody sends this event when a client’s contract is deleted.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "clientId": "100000009",
    "clientUniqueId": 100000009,
    "clientContractId": 117
}
Name Type Description
siteId number The Mindbody ID for the business.
clientId string The client’s public ID, used frequently in the Public API.
clientUniqueId number The client’s system generated ID for whom contract is deleted. This value cannot be changed by business owners and is always unique across all clients at the business.
clientContractId number The unique identifier for the contract and client pairing.

Sale

Mindbody sends sale events when a sale is made to a client. A staff member at the business may make the sale or clients may create their own sales using a mobile application, the Public API, or the online schedule for the business.

clientSale.created

Summary

Mindbody sends this event when a sale is made to a client.

Event Data Object

The following example shows the structure of the object contained in the event’s eventData property.

{
    "siteId": 123,
    "saleId": 96,
    "purchasingClientId": "100000009",
    "payments": [
        {
            "paymentId": 103,
            "paymentMethodId": 14,
            "paymentMethodName": "Cash",
            "paymentAmountPaid": 150,
            "paymentLastFour": null,
            "paymentNotes": null
        }
    ],
    "saleDateTime": "2018-05-03T16:52:23Z",
    "soldById": 10,
    "soldByName": "Jane Doe",
    "locationId": 1,
    "totalAmountPaid": 150,
    "items": [
        {
            "itemId": 78,
            "type": "Service",
            "name": "10 Punch Pass",
            "amountPaid": 150,
            "amountDiscounted": 0,
            "quantity": 1,
            "recipientClientId": "100000009",
            "paymentReferenceId": 44
        }
    ]
}
Name Type Description
siteId number The Mindbody ID for the business.
saleId number The ID of the sale.
purchasingClientId string The client’s public ID, used heavily in the Public API.
payments list of objects Contains information about the payment methods used for the sale.
payments.paymentId number The payment’s ID.
payments.paymentMethodId number The ID of the payment method associated with the payment.
payments.paymentMethodName string The name of the payment method associated with the payment.
payments.paymentAmountPaid number The monetary amount of the payment.
payments.paymentLastFour string The last four digits of the credit card associated with the payment. This value is null if a credit card was not used.
payments.paymentNotes string Any payment notes left on this payment by a staff member at the time of the sale.
saleDateTime string The UTC date and time when the sale took place.
soldById number The ID of the client or staff member who made the sale.
soldByName string The name of the client or staff member who made the sale.
locationId number The location where the sale took place. This value is 98 if the client made the sale from a mobile application, the Public API, or the business’s online store.
totalAmountPaid number The sale total, including taxes and discounts.
items list of objects Contains information about the items sold.
items.itemId number The item’s product ID.
items.type string The item type.

Possible Values:
  • "Product" - The item was a retail product.
  • "Service" - The item was a pricing option.
  • "Contract" - The item was a contract.
  • "Package" - The item was a package.
  • "AccountPayment" - The item was an account payment.
  • "GiftCard" - The item was a gift card.
  • "Tip" - The item was a tip.
  • items.name string The item’s name.
    items.amountPaid number The total amount paid for the item, including taxes and discounts.
    items.amountDiscounted number The amount that was not paid because the item was discounted.
    items.quantity number When this value is more than one, it indicates that this item record represents multiple items. For example, if the item is a 10 Punch Pass and the quantity is 2, then this single item represents two punch passes.
    items.recipientClientId string The public ID of the client who received the product.
    items.paymentReferenceId number The item’s payment reference ID.

    Staff

    Mindbody sends staff events when an owner or staff member changes staff member information.

    staff.created

    Summary

    Mindbody sends this event when a business adds a new staff member.

    Event Data Object

    The following example shows the structure of the object contained in the event’s eventData property.

    {
        "staffId": 12,
        "siteId": 123,
        "addressLine1": "123 ABC Ct",
        "addressLine2": null,
        "staffFirstName": "Jane",
        "staffLastName": "Doe",
        "city": "San Luis Obispo",
        "state": "CA",
        "country": "US",
        "postalCode": "93401",
        "sortOrder": 1,
        "isIndependentContractor": true,
        "alwaysAllowDoubleBooking": false,
        "providerIds": [
            "688135485"
        ],
        "imageUrl": "https://clients.mindbodyonline.com/studios/ACMEYoga/staff/12_large.jpg?osv=637160121420806704",
        "biography": null,
        "gender": "Female"
    }
    
    Name Type Description
    staffId number The staff member’s ID.
    siteId number The Mindbody ID for the business.
    addressLine1 string Line one of the staff member’s street address.
    addressLine2 string Line two of the staff member’s street address.
    staffFirstName string The staff member’s first name.
    staffLastName string The staff member’s last name.
    city string The city in which the staff member’s address is located.
    state string The state in which the staff member’s address is located.
    country string The country in which the staff member’s address is located.
    postalCode string The staff member’s postal code.
    sortOrder number The staff member’s sort weight. Smaller weights should appear at the top of lists.
    isIndependentContractor bool When true, indicates that the staff member is an independent contractor.
    alwaysAllowDoubleBooking bool When true, indicates that the staff member can be booked for the same time slot by multiple clients.
    providerIds list of strings Contains all of the provider IDs associated with the staff member.
    imageUrl string A URL to an image of the staff member.
    biography string The staff member’s biography text.
    gender string The staff member’s gender.

    Possible Values:
    1. "Male" - Indicates that the staff member is male.
    2. "Female" - Indicates that the staff member is female.

    staff.updated

    Summary

    Mindbody sends this event when someone updates the information about a staff member.

    Event Data Object

    This event object is the same as the staff.created event object.

    staff.deactivated

    Summary

    Mindbody sends this event when a business deactivates one of its staff members.

    Event Data Object

    This event object is the same as the staff.created event object.

    ;