PUT /api/v1/orgs/{id}/policies · Operation ID: setOrgPolicyorgs:manage. Teacher/admin tier plus orgs:manage; plan must include policies.curl --fail-with-body -X PUT 'https://handwrites.io/api/v1/orgs/REPLACE_ORG_ID/policies' \
-H "Authorization: Bearer $HANDWRITE_API_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"rules":{"liveEditing":{"value":"on"},"sharingOutsideOrg":{"value":"off","locked":true}}}'| Name | In | Required | Details |
|---|---|---|---|
id | path | Yes | An organisation ID (org_…). |
application/json (required).| Field | Required | Details |
|---|---|---|
rules | Yes | {key: {value: "on"|"off"|enum value|number, locked?: boolean}}; keys in org-policy-keys.ts. |
| Status | Meaning | Format |
|---|---|---|
| 200 | The policy after the change. | application/json |
| 400 | invalid_request (the message names the field), validation_failed. | application/json |
| 401 | unauthorized: no token, or it's invalid, revoked or expired. | application/json |
| 403 | insufficient_scope, forbidden (you can see it but not do this), app_test_restricted, account_deleted (the account is scheduled for deletion; any request). | application/json |
| 404 | not_found: it doesn't exist or you can't see it (never 403 for documents you can't see). | application/json |
| 429 | rate_limited (burst or daily cap) or quota_exceeded (no characters left). | application/json |
| 500 | internal_error. | application/json |