NEAR AI Cloud: Post v1organizations credentials
POST /v1/organizations/{org_id}/credentials 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.
Parameters:
- org_id (path, string, required): Organization.
Request body (application/json):
- constraints: one of
option 1: null
CredentialConstraintsSchema:
- credits:transfer: 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.
- credits:transfer: one of
option 1: null
TransferConstraintsSchema:
- expires_at (string, date-time, required): Future timestamp no more than 366 days away.
- name (string, required): Nonempty display name, at most 200 UTF-8 bytes.
- permissions (array of string, required): Explicit supported permissions: credits:read and/or credits:transfer.
Responses: 200: Authorized credit operation