{"lexicon":1,"id":"money.atmosphere.membership.updateProgram","defs":{"main":{"type":"procedure","description":"Update a money.atmosphere.membership.program record ATM authored in the creator's repo (the record CID rotates). The creator is derived from the program strongRef's repo authority; the calling app must hold the same creator consent as createProgram. Only supplied fields change; set archived to retire the program while keeping it resolvable for historical members.","input":{"encoding":"application/json","schema":{"type":"object","required":["environment","program"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":8},"program":{"type":"ref","ref":"com.atproto.repo.strongRef","description":"The money.atmosphere.membership.program record to update."},"title":{"type":"string","minLength":1,"maxGraphemes":100,"maxLength":1000},"description":{"type":"string","maxGraphemes":1000,"maxLength":10000},"scope":{"type":"string","knownValues":["creator-wide","app-specific"],"maxLength":32},"product":{"type":"ref","ref":"com.atproto.repo.strongRef"},"defaultPrice":{"type":"ref","ref":"com.atproto.repo.strongRef"},"archived":{"type":"boolean"},"recipientAssertionJwt":{"type":"string","maxLength":8192}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["program"],"properties":{"program":{"type":"ref","ref":"com.atproto.repo.strongRef"}}}},"errors":[{"name":"AppEnvironmentNotConfigured","description":"The app environment is not configured in ATM."},{"name":"NotAuthorized","description":"The calling app is not authorized to manage memberships for this creator."},{"name":"MembershipProgramNotFound","description":"ATM could not load that membership program record."},{"name":"RecordVersionConflict","description":"The record changed since the supplied strongRef cid was read (compare-and-swap failed). Re-read the record and retry the update."},{"name":"MembershipCreatorAuthorizationRequired","description":"ATM holds no live grant to write to the creator's repo; the creator must re-authorize."},{"name":"InvalidMembershipEntitlement","description":"A supplied product/price is not a valid membership listing in the creator's repo."},{"name":"WriteFailed","description":"ATM could not write the membership program record."}]}}}