Browse the docs

Grants

Grants in Allpage: its screens, what you can do there and its operations.

Availability. Works when the business has it turned on and its plan includes it. Otherwise its tools answer needs (kind module) with how to turn it on: business.useTool, or a plan that includes it.

Screens

  • Memberships & packs (/memberships)

What you can do

  • Set what a pack or membership covers: the assistant asks you first
  • Set up a pack: the assistant asks you first
  • Set up a membership: the assistant asks you first
  • Freeze a membership: the assistant asks you first
  • End a freeze: the assistant asks you first
  • Sell a pack in person: the assistant can do it on its own
  • Change what’s left on a pack: the assistant can do it on its own
  • End a customer’s pack or membership: the assistant asks you first

Automations you can turn on

  • Pack running low: Tells customers when their pack is down to its last few visits, so they can buy another in time
  • Pack expiry reminders: Tells customers before their pack expires, if they have visits left
  • Membership ending reminders: Tells members before a membership that won’t renew ends, so they can keep it

For apps

Tools

  • membership_saveBenefit (Set what a pack or membership covers): customers see it: waits for the owner’s approval unless they chose Just do it for your app
  • membership_savePack (Set up a pack): customers see it: waits for the owner’s approval unless they chose Just do it for your app
  • membership_saveMembership (Set up a membership): customers see it: waits for the owner’s approval unless they chose Just do it for your app
  • membership_freezeMembership (Freeze a membership): customers see it: waits for the owner’s approval unless they chose Just do it for your app
  • membership_unfreezeMembership (End a freeze): customers see it: waits for the owner’s approval unless they chose Just do it for your app
  • membership_sellPack (Sell a pack in person): a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval
  • membership_adjustPack (Change what’s left on a pack): a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval
  • membership_end (End a customer’s pack or membership): customers see it: waits for the owner’s approval unless they chose Just do it for your app

Reads

  • membership_benefits (What packs and memberships cover)
  • membership_coverChoices (What a pack or membership can cover)
  • membership_freezeCheck (What freezing a membership does)
  • membership_holders (Who holds a pack or membership)
  • membership_customer (See what covers a customer’s visits)
  • membership_summary (What’s going on)

The owner’s screens

  • Memberships & packs (/memberships)

Automations the owner can turn on

  • Pack running low: Tells customers when their pack is down to its last few visits, so they can buy another in time
  • Pack expiry reminders: Tells customers before their pack expires, if they have visits left
  • Membership ending reminders: Tells members before a membership that won’t renew ends, so they can keep it

Operations

Each one's input and output, as JSON Schema. Ids are typed (typed ids).

grants.adjustPack

Change what’s left on a pack

Kind
Change
Tool
membership_adjustPack
Scope
grants:write
Reached by
API, MCP, ChatGPT

a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "grantId": {
      "type": "string",
      "pattern": "^grt_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "A grant id: grt_ and 26 letters and digits."
    },
    "amount": {
      "type": "integer",
      "minimum": -10000,
      "maximum": 10000,
      "description": "How much to add (positive) or take away (negative), in the pack’s own unit: visits, minutes or cents."
    },
    "note": {
      "type": "string",
      "maxLength": 200
    },
    "requestId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "A fresh random id you make for each new request. Send the same one again only to retry that exact request; a different request with it is refused."
    }
  },
  "required": [
    "grantId",
    "amount",
    "requestId"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

grants.benefits

What packs and memberships cover

Kind
Read
Tool
membership_benefits
Scope
grants:read
Reached by
API, MCP, ChatGPT

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "benefits": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "productId": {
                    "type": "string",
                    "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A product id: prd_ and 26 letters and digits."
                  },
                  "name": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "membership",
                      "pack",
                      "pass"
                    ]
                  },
                  "key": {
                    "type": "string"
                  },
                  "ref": {
                    "type": "string"
                  },
                  "covers": {
                    "type": "object",
                    "properties": {
                      "all": {
                        "type": "boolean"
                      },
                      "kinds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "offeringIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^off_[0-9a-hjkmnp-tv-z]{26}$",
                          "description": "A offering id: off_ and 26 letters and digits."
                        }
                      },
                      "productIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
                          "description": "A product id: prd_ and 26 letters and digits."
                        }
                      }
                    },
                    "required": [
                      "all",
                      "kinds",
                      "tags",
                      "offeringIds",
                      "productIds"
                    ],
                    "additionalProperties": false
                  },
                  "allowance": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "unlimited"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "per_period"
                          },
                          "uses": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 1000
                          },
                          "period": {
                            "type": "string",
                            "enum": [
                              "week",
                              "month"
                            ]
                          },
                          "anchor": {
                            "default": "calendar",
                            "description": "calendar: weeks start Monday and months on the 1st; cycle: from the day the membership started.",
                            "type": "string",
                            "enum": [
                              "calendar",
                              "cycle"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "uses",
                          "period",
                          "anchor"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "balance"
                          },
                          "unit": {
                            "type": "string",
                            "enum": [
                              "visits",
                              "minutes",
                              "cents"
                            ],
                            "description": "What the pack’s credits count: visits (one per session), minutes, or dollars in cents."
                          }
                        },
                        "required": [
                          "type",
                          "unit"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "earlyDays": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "perks": {
                    "type": "object",
                    "properties": {
                      "guestPasses": {
                        "default": null,
                        "description": "Guest passes each week or month, for bringing someone along. Unused ones end with the period.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "count": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 20
                              },
                              "period": {
                                "default": "month",
                                "type": "string",
                                "enum": [
                                  "week",
                                  "month"
                                ]
                              }
                            },
                            "required": [
                              "count",
                              "period"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "guestPasses"
                    ],
                    "additionalProperties": false
                  },
                  "discounts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "percentOff": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "kinds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "offeringIds": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^off_[0-9a-hjkmnp-tv-z]{26}$",
                            "description": "A offering id: off_ and 26 letters and digits."
                          }
                        }
                      },
                      "required": [
                        "percentOff",
                        "kinds",
                        "tags",
                        "offeringIds"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "freeze": {
                    "type": "object",
                    "properties": {
                      "selfServe": {
                        "type": "boolean"
                      },
                      "maxDays": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "selfServe",
                      "maxDays"
                    ],
                    "additionalProperties": false
                  },
                  "priceMinor": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "credits": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validDays": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "every": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "trialDays": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "words": {
                    "type": "string"
                  }
                },
                "required": [
                  "productId",
                  "name",
                  "kind",
                  "key",
                  "ref",
                  "covers",
                  "allowance",
                  "earlyDays",
                  "perks",
                  "discounts",
                  "freeze",
                  "priceMinor",
                  "credits",
                  "validDays",
                  "every",
                  "trialDays",
                  "words"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "benefits"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

grants.coverChoices

What a pack or membership can cover

Kind
Read
Tool
membership_coverChoices
Scope
grants:read
Reached by
API, MCP, ChatGPT

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "offerings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^off_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A offering id: off_ and 26 letters and digits."
                  },
                  "name": {
                    "type": "string"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "productId": {
                          "type": "string",
                          "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
                          "description": "A product id: prd_ and 26 letters and digits."
                        },
                        "name": {
                          "type": "string"
                        },
                        "minutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "productId",
                        "name",
                        "minutes"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Its single-visit options, shortest first: covers.productIds takes these."
                  }
                },
                "required": [
                  "id",
                  "name",
                  "options"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "offerings"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

grants.customer

See what covers a customer’s visits

Kind
Read
Tool
membership_customer
Scope
grants:read
Reached by
API, MCP

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string",
      "pattern": "^cus_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "A customer id: cus_ and 26 letters and digits."
    }
  },
  "required": [
    "customerId"
  ],
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "covers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "grantId": {
                    "type": "string",
                    "pattern": "^grt_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A grant id: grt_ and 26 letters and digits."
                  },
                  "name": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "membership",
                      "pack",
                      "pass"
                    ]
                  },
                  "paused": {
                    "type": "boolean"
                  },
                  "left": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "visits",
                          "minutes",
                          "cents"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string"
                  },
                  "low": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "grantId",
                  "name",
                  "kind",
                  "paused",
                  "left",
                  "unit",
                  "state",
                  "low"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "covers"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

grants.end

End a customer’s pack or membership

Kind
Change
Tool
membership_end
Scope
grants:write
Reached by
API, MCP, ChatGPT

customers see it: waits for the owner’s approval unless they chose Just do it for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "grantId": {
      "type": "string",
      "pattern": "^grt_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "A grant id: grt_ and 26 letters and digits."
    },
    "reason": {
      "type": "string",
      "maxLength": 300
    }
  },
  "required": [
    "grantId"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

grants.freezeCheck

What freezing a membership does

Kind
Read
Tool
membership_freezeCheck
Scope
grants:read
Reached by
API, MCP, ChatGPT

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "agreementId": {
      "type": "string",
      "pattern": "^agr_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "The membership, by its sale: from commerce.memberships for a customer, commerce.agreements for the business. A agreement id: agr_ and 26 letters and digits."
    },
    "from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "The first day frozen, the business’s date."
    },
    "until": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "The day it starts again: billing and access resume then."
    }
  },
  "required": [
    "agreementId",
    "from",
    "until"
  ],
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "days": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "bookings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "enrollmentId": {
                    "type": "string",
                    "pattern": "^bk_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A booking id: bk_ and 26 letters and digits."
                  },
                  "name": {
                    "type": "string"
                  },
                  "when": {
                    "type": "string"
                  }
                },
                "required": [
                  "enrollmentId",
                  "name",
                  "when"
                ],
                "additionalProperties": false
              }
            },
            "nextChargeOn": {
              "type": [
                "string",
                "null"
              ]
            },
            "button": {
              "type": "string"
            },
            "lines": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "days",
            "bookings",
            "nextChargeOn",
            "button",
            "lines"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

grants.freezeMembership

Freeze a membership

Kind
Change
Tool
membership_freezeMembership
Scope
grants:write
Reached by
API, MCP, ChatGPT

customers see it: waits for the owner’s approval unless they chose Just do it for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "agreementId": {
      "type": "string",
      "pattern": "^agr_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "The membership, by its sale: from commerce.memberships for a customer, commerce.agreements for the business. A agreement id: agr_ and 26 letters and digits."
    },
    "from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "The first day frozen, the business’s date."
    },
    "until": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "The day it starts again: billing and access resume then."
    }
  },
  "required": [
    "agreementId",
    "from",
    "until"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

grants.holders

Who holds a pack or membership

Kind
Read
Tool
membership_holders
Scope
grants:read
Reached by
API, MCP, ChatGPT

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "productId": {
      "description": "One pack or membership; every one when left out.",
      "type": "string",
      "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$"
    }
  },
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "holders": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "grantId": {
                    "type": "string",
                    "pattern": "^grt_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A grant id: grt_ and 26 letters and digits."
                  },
                  "productId": {
                    "type": "string",
                    "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A product id: prd_ and 26 letters and digits."
                  },
                  "name": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "membership",
                      "pack",
                      "pass"
                    ]
                  },
                  "customerId": {
                    "type": "string",
                    "pattern": "^cus_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A customer id: cus_ and 26 letters and digits."
                  },
                  "who": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ]
                  },
                  "left": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "visits",
                          "minutes",
                          "cents"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "leftWords": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "endsAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "grantId",
                  "productId",
                  "name",
                  "kind",
                  "customerId",
                  "who",
                  "status",
                  "left",
                  "unit",
                  "leftWords",
                  "endsAt"
                ],
                "additionalProperties": false
              }
            },
            "packs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "productId": {
                    "type": "string",
                    "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
                    "description": "A product id: prd_ and 26 letters and digits."
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "productId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "holders",
            "packs"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

grants.saveBenefit

Set what a pack or membership covers

Kind
Change
Tool
membership_saveBenefit
Scope
grants:write
Reached by
API, MCP, ChatGPT

customers see it: waits for the owner’s approval unless they chose Just do it for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "The pack, membership or pass: an access product. A product id: prd_ and 26 letters and digits."
    },
    "key": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
    },
    "covers": {
      "type": "object",
      "properties": {
        "all": {
          "default": false,
          "description": "Covers every offering.",
          "type": "boolean"
        },
        "kinds": {
          "default": [],
          "description": "Offering kinds it covers: class, course, workshop…",
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "tags": {
          "default": [],
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "offeringIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^off_[0-9a-hjkmnp-tv-z]{26}$",
            "description": "A offering id: off_ and 26 letters and digits."
          }
        },
        "productIds": {
          "default": [],
          "description": "Admissions it covers, by their product.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
            "description": "A product id: prd_ and 26 letters and digits."
          }
        }
      },
      "additionalProperties": false
    },
    "allowance": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "unlimited"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "per_period"
            },
            "uses": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "period": {
              "type": "string",
              "enum": [
                "week",
                "month"
              ]
            },
            "anchor": {
              "default": "calendar",
              "description": "calendar: weeks start Monday and months on the 1st; cycle: from the day the membership started.",
              "type": "string",
              "enum": [
                "calendar",
                "cycle"
              ]
            }
          },
          "required": [
            "type",
            "uses",
            "period"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "balance"
            },
            "unit": {
              "type": "string",
              "enum": [
                "visits",
                "minutes",
                "cents"
              ],
              "description": "What the pack’s credits count: visits (one per session), minutes, or dollars in cents."
            }
          },
          "required": [
            "type",
            "unit"
          ],
          "additionalProperties": false
        }
      ]
    },
    "earlyDays": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 90
        },
        {
          "type": "null"
        }
      ]
    },
    "perks": {
      "type": "object",
      "properties": {
        "guestPasses": {
          "default": null,
          "description": "Guest passes each week or month, for bringing someone along. Unused ones end with the period.",
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 20
                },
                "period": {
                  "default": "month",
                  "type": "string",
                  "enum": [
                    "week",
                    "month"
                  ]
                }
              },
              "required": [
                "count"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "productId",
    "key",
    "covers",
    "allowance"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

grants.saveMembership

Set up a membership

Kind
Change
Tool
membership_saveMembership
Scope
grants:write
Reached by
API, MCP, ChatGPT

customers see it: waits for the owner’s approval unless they chose Just do it for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 40,
      "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$",
      "description": "Your short name for the tier, like gold: offerings name it membership:gold. The same key again changes that tier."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "description": {
      "type": "string",
      "maxLength": 2000
    },
    "priceMinor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000,
      "description": "What it costs each time, in cents."
    },
    "every": {
      "default": "month",
      "description": "How often it’s charged.",
      "type": "string",
      "enum": [
        "week",
        "month",
        "year"
      ]
    },
    "trialDays": {
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 90
    },
    "covers": {
      "default": {
        "all": true,
        "kinds": [],
        "tags": [],
        "offeringIds": [],
        "productIds": []
      },
      "description": "What members book with it: everything unless you narrow it.",
      "type": "object",
      "properties": {
        "all": {
          "default": false,
          "description": "Covers every offering.",
          "type": "boolean"
        },
        "kinds": {
          "default": [],
          "description": "Offering kinds it covers: class, course, workshop…",
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "tags": {
          "default": [],
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "offeringIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^off_[0-9a-hjkmnp-tv-z]{26}$",
            "description": "A offering id: off_ and 26 letters and digits."
          }
        },
        "productIds": {
          "default": [],
          "description": "Admissions it covers, by their product.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
            "description": "A product id: prd_ and 26 letters and digits."
          }
        }
      },
      "additionalProperties": false
    },
    "allowance": {
      "default": {
        "type": "unlimited"
      },
      "description": "Unlimited, or bookings a week or month. A membership doesn’t hold a balance; packs do.",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "unlimited"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "per_period"
            },
            "uses": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "period": {
              "type": "string",
              "enum": [
                "week",
                "month"
              ]
            },
            "anchor": {
              "default": "calendar",
              "description": "calendar: weeks start Monday and months on the 1st; cycle: from the day the membership started.",
              "type": "string",
              "enum": [
                "calendar",
                "cycle"
              ]
            }
          },
          "required": [
            "type",
            "uses",
            "period"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "balance"
            },
            "unit": {
              "type": "string",
              "enum": [
                "visits",
                "minutes",
                "cents"
              ],
              "description": "What the pack’s credits count: visits (one per session), minutes, or dollars in cents."
            }
          },
          "required": [
            "type",
            "unit"
          ],
          "additionalProperties": false
        }
      ]
    },
    "earlyDays": {
      "default": null,
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 90
        },
        {
          "type": "null"
        }
      ]
    },
    "perks": {
      "default": {
        "guestPasses": null
      },
      "type": "object",
      "properties": {
        "guestPasses": {
          "default": null,
          "description": "Guest passes each week or month, for bringing someone along. Unused ones end with the period.",
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 20
                },
                "period": {
                  "default": "month",
                  "type": "string",
                  "enum": [
                    "week",
                    "month"
                  ]
                }
              },
              "required": [
                "count"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "discounts": {
      "default": [],
      "description": "Member prices: a percent off offerings of these kinds, tags or ids, like 15% off workshops.",
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "percentOff": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "kinds": {
            "default": [],
            "description": "Offering kinds it’s off: workshop, course…",
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          },
          "tags": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          },
          "offeringIds": {
            "default": [],
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^off_[0-9a-hjkmnp-tv-z]{26}$",
              "description": "A offering id: off_ and 26 letters and digits."
            }
          }
        },
        "required": [
          "percentOff"
        ],
        "additionalProperties": false
      }
    },
    "freezes": {
      "default": {
        "selfServe": false,
        "maxDays": 90
      },
      "type": "object",
      "properties": {
        "selfServe": {
          "default": false,
          "description": "Members freeze it themselves from their account.",
          "type": "boolean"
        },
        "maxDays": {
          "default": 90,
          "type": "integer",
          "minimum": 1,
          "maximum": 365
        }
      },
      "additionalProperties": false
    },
    "requestId": {
      "description": "A fresh random id you make for each new request. Send the same one again only to retry that exact request; a different request with it is refused.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "key",
    "name",
    "priceMinor"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

grants.savePack

Set up a pack

Kind
Change
Tool
membership_savePack
Scope
grants:write
Reached by
API, MCP, ChatGPT

customers see it: waits for the owner’s approval unless they chose Just do it for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 40,
      "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$",
      "description": "Your short name for the pack, like ten-class: offerings name it pack:ten-class. The same key again changes that pack."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "description": {
      "type": "string",
      "maxLength": 2000
    },
    "priceMinor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000,
      "description": "What it costs, in cents."
    },
    "credits": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991,
      "description": "How much it holds: 10 for a 10-class pack, 300 for 300 minutes, up to 1,000; a dollar pack its amount in cents, 5000 for $50, up to $10,000."
    },
    "counts": {
      "default": "visits",
      "description": "What the credits count: visits (one a session), minutes (a session’s length) or cents.",
      "type": "string",
      "enum": [
        "visits",
        "minutes",
        "cents"
      ]
    },
    "validDays": {
      "default": null,
      "description": "Days it’s good for from purchase. Null never runs out.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 3650
        },
        {
          "type": "null"
        }
      ]
    },
    "covers": {
      "default": {
        "all": true,
        "kinds": [],
        "tags": [],
        "offeringIds": [],
        "productIds": []
      },
      "description": "What it pays for: everything unless you narrow it.",
      "type": "object",
      "properties": {
        "all": {
          "default": false,
          "description": "Covers every offering.",
          "type": "boolean"
        },
        "kinds": {
          "default": [],
          "description": "Offering kinds it covers: class, course, workshop…",
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "tags": {
          "default": [],
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "offeringIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^off_[0-9a-hjkmnp-tv-z]{26}$",
            "description": "A offering id: off_ and 26 letters and digits."
          }
        },
        "productIds": {
          "default": [],
          "description": "Admissions it covers, by their product.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
            "description": "A product id: prd_ and 26 letters and digits."
          }
        }
      },
      "additionalProperties": false
    },
    "earlyDays": {
      "default": null,
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 90
        },
        {
          "type": "null"
        }
      ]
    },
    "requestId": {
      "description": "A fresh random id you make for each new request. Send the same one again only to retry that exact request; a different request with it is refused.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "key",
    "name",
    "priceMinor",
    "credits"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

grants.sellPack

Sell a pack in person

Kind
Change
Tool
membership_sellPack
Scope
grants:write
Reached by
API, MCP, ChatGPT

a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "pattern": "^prd_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "The pack: an access product with credits. A product id: prd_ and 26 letters and digits."
    },
    "customerId": {
      "description": "Someone on your list, from customers_search.",
      "type": "string",
      "pattern": "^cus_[0-9a-hjkmnp-tv-z]{26}$"
    },
    "name": {
      "default": "",
      "description": "Their name, without a customerId.",
      "type": "string",
      "maxLength": 120
    },
    "email": {
      "label": "Email",
      "control": "email",
      "description": "Their email, without a customerId.",
      "type": "string",
      "maxLength": 320
    },
    "phone": {
      "label": "Phone",
      "control": "tel",
      "description": "Their mobile, without a customerId.",
      "type": "string",
      "maxLength": 40
    },
    "requestId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "A fresh random id you make for each new request. Send the same one again only to retry that exact request; a different request with it is refused."
    }
  },
  "required": [
    "productId",
    "requestId"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

grants.summary

What’s going on

Kind
Read
Tool
membership_summary
Scope
grants:read
Reached by
API, MCP

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "facts": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "One-line facts, e.g. \"3 bookings today\"."
            },
            "attention": {
              "description": "Things that need the owner, each with a plain reason.",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "happening": {
              "description": "What’s on today, each at its time.",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "at": {
                    "type": "number",
                    "description": "Epoch milliseconds."
                  },
                  "text": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "at",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "metrics": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "value": {
                    "type": "number"
                  },
                  "prior": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "count",
                      "money"
                    ]
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "title",
            "facts"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

grants.unfreezeMembership

End a freeze

Kind
Change
Tool
membership_unfreezeMembership
Scope
grants:write
Reached by
API, MCP, ChatGPT

customers see it: waits for the owner’s approval unless they chose Just do it for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "agreementId": {
      "type": "string",
      "pattern": "^agr_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "A agreement id: agr_ and 26 letters and digits."
    }
  },
  "required": [
    "agreementId"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}