NEAR AI Cloud: Put v1adminorganizations policy
PUT /v1/admin/organizations/{org_id}/policy Deprecated: this endpoint is moving to cloud-platform at the same path; the cloud-platform base URL will be announced. Behaviour may differ in edge cases.
Admin permissions: admin session or read_write token. A read_only token receives HTTP 403 with error.type insufficient_permissions before the handler runs.
Parameters:
- org_id (path, string, required): Organization.
Request body (application/json):
- policy (object, required)
- credentials (object, required)
- enabled (boolean, required): Gate owner creation, configuration updates and rotation. Listing/revocation remain available.
- credits_transfer (object, required)
- constraints: one of
option 1: null
TransferConstraintsSchema:
- allowed_recipient_ids (array of string): Omitted/null permits any recipient; an empty list permits none. At most 1,000 IDs.
- allowed_source_types (array of string): Policy default: payment and staking_farm. Grant requires explicit policy opt-in. Credential omission adds no restriction; an empty list permits no sources.
- max_amount_per_transfer (integer, int64): Integer nano-USD. Omitted/null means no additional ceiling; zero blocks sends.
- max_total_amount (integer, int64): Lifetime nano-USD budget. Rotation and configuration updates never reset usage.
- enabled (boolean, required)
- max_sends_per_minute (integer, int64)
- constraints: one of
option 1: null
TransferConstraintsSchema:
- credentials (object, required)
- reason (string, required): Required audit reason, at most 2,000 UTF-8 bytes.
Responses: 200: Authorized credit operation 403: Missing admin privileges (forbidden) or insufficient token permission (insufficient_permissions).