{"lexicon":1,"id":"money.atmosphere.membership.revokeGrant","defs":{"main":{"type":"procedure","description":"Revoke a membership grant previously registered with money.atmosphere.membership.registerGrant. Requires registered-app service-auth; only the app that registered a grant (or an ATM admin path) may revoke it. Revocation is immediate for subsequent access checks. Idempotent: revoking an already-revoked grant succeeds.","input":{"encoding":"application/json","schema":{"type":"object","required":["grantId"],"properties":{"grantId":{"type":"string","maxLength":128,"description":"Grant id returned by registerGrant."},"environment":{"type":"string","knownValues":["test","live"],"maxLength":8,"description":"ATM app environment. Defaults to live."}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["revoked","revokedAt"],"properties":{"revoked":{"type":"boolean","description":"True when the grant is revoked (including when it was already revoked)."},"revokedAt":{"type":"string","format":"datetime","description":"When the grant stopped satisfying access checks."}}}},"errors":[{"name":"AppNotRegistered","description":"Caller is not a registered ATM app."},{"name":"NotAuthorized","description":"Grant was registered by a different app."},{"name":"GrantNotFound","description":"No grant exists with this id in this environment."}]}}}