set_write_access
Change how this organization's AI clients write data: 'approve' files every change as a proposal a person approves, 'direct' executes changes immediately. Requires an owner or admin account connected via OAuth; API keys cannot call this. Without confirm=true nothing changes and the response previews exactly what would. When enabling direct mode, access reverts to approvals after duration_hours (default 24) unless permanent=true. allow_destructive additionally lets AI clients delete sessions and sponsors; allow_comms lets email and portal invites send without approval. Every change notifies the organization's admins.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | No | Organization slug. Only needed when you belong to multiple organizations; must be one returned by list_my_orgs. | |
| mode | Yes | approve: writes wait for human approval. direct: writes execute immediately. | |
| event | No | Scope the change to one event (Convex event id from list_events) instead of the whole organization; other events keep the org default. | |
| confirm | No | false or absent: return a preview only, change nothing. true: apply the change. | |
| permanent | No | Keep direct mode on until turned off instead of expiring. Mutually exclusive with duration_hours. | |
| request_id | Yes | Client-generated unique id for this write (e.g. a UUID). Retries with the same request_id return the original executed or proposed outcome instead of creating a duplicate. Never reuse a request_id for different arguments. | |
| allow_comms | No | Also let send_email, speaker messages, reminders, and portal invites go out without approval. | |
| duration_hours | No | How long direct mode stays on before reverting to approvals (default 24). Ignored for mode approve; mutually exclusive with permanent. | |
| allow_destructive | No | Also allow delete_session and delete_sponsor. Deletes are always notified and restorable from AI activity. |