Organizations

Allocate or reclaim affiliate credits

Move credits between the calling key's organization and one of its approved affiliates. A positive amount allocates, a negative amount reclaims. Requires the orgs:manage scope. The transfer is a single database transaction that re-verifies the affiliation under a row lock. Lifecycle: a child requests affiliation (dashboard) and becomes PENDING; approve moves PENDING to APPROVED; credits move only while the affiliate is APPROVED and not suspended; offboard reclaims the remaining credits and suspends the affiliate, in any status; revoke ends the relationship from APPROVED or PENDING. offboard then revoke and revoke then offboard are both supported - offboard never requires APPROVED and revoke never refuses a suspended affiliate. Counts against the API key monthly usage quota (no exemption exists for administration routes) and requires the organization payment state to be current.

post/organizations/sub-orgs/credits

Request

  • Base URL: https://app.arkova.ai/api/v1
  • URL: https://app.arkova.ai/api/v1/organizations/sub-orgs/credits
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Request body

org_public_idstring required

Public identifier of the affiliated organization. NOT the internal uuid — sending one returns 400 use_public_id.

amountinteger required

Whole credits. Positive allocates to the affiliate, negative reclaims to the parent. Never zero.

notestring

Example request

{
  "org_public_id": "k7mqx3ptr9wz",
  "amount": 100
}

Response

Transfer applied

parent_balanceinteger required
child_balanceinteger required
amountinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.