{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/mindbody/refs/heads/main/json-schema/webhooks-api-subscription-schema.json",
  "title": "Subscription",
  "description": "Implementation of the 'Subscription' model. A webhook subscription",
  "type": "object",
  "properties": {
    "eventIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The events that are to be sent to this subscription's `webhookUrl`.",
      "example": [
        "example-value"
      ]
    },
    "eventSchemaVersion": {
      "type": "number",
      "format": "double",
      "description": "The event schema version associated with the subscription. Currently, this is always `1`.",
      "example": 1.0
    },
    "referenceId": {
      "type": "string",
      "description": "An arbitrary ID that can be specified in the POST Subscription request body, and is saved for the requesting developer's use.",
      "example": "example-value"
    },
    "status": {
      "type": "string",
      "description": "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\u2019s 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. `DeactivatedTooManyFailedMe",
      "example": "example-value"
    },
    "statusChangeDate": {
      "type": "string",
      "format": "date-time",
      "description": "The UTC date and time when the subscription's status was last updated.",
      "example": "2026-05-28T14:30:00Z"
    },
    "statusChangeMessage": {
      "type": "string",
      "description": "A message generated by Mindbody that explains why a subscription's status changed.",
      "example": "example-value"
    },
    "statusChangeUser": {
      "type": "string",
      "description": "The first name of the developer or Mindbody staff member who changed the subscription's status.",
      "example": "example-value"
    },
    "subscriptionCreationDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The UTC date and time when the subscription was created.",
      "example": "2026-05-28T14:30:00Z"
    },
    "subscriptionId": {
      "type": "string",
      "description": "The subscription's ID (a GUID).",
      "example": "example-value"
    },
    "webhookUrl": {
      "type": "string",
      "description": "The webhook to which the listed `eventIds` are sent.",
      "example": "https://example.mindbodyonline.com/resource/abc123"
    }
  }
}