Skip to main content
POST
Runs a direct ledger operation (ADJUST, HOLD, RELEASE, or FORFEIT) on a group’s balance in one asset, using the same per-type fields as Apply a balance operation. Groups do not support VOID_PENDING or MATURE (400 validation_error), and sending a field not allowed for the selected type returns 400 validation_error with reason: not_allowed in fields.
  • Program scope and status: Groups are organization-level ledger entities, but every balance operation is program-scoped (program_id and asset_id are required). Archived groups return 422 archived_resource.
  • Response shape: ADJUST returns the journal entry, direction (type: CREDIT or DEBIT), amount, and bucket. All other operation types return operation, amount_processed, lots_processed (for LOT-mode assets), and the updated balance.
For examples, see Group balances and the Balance operations guide.

Authorizations

Authorization
string
header
default:sk_...
required

Send your API key as Authorization: Bearer <key>.

Headers

Idempotency-Key
string

Unique key (1-255 printable ASCII characters) to make retries safe. Repeating the same request with the same key returns the original result; reusing the key with different fields returns 409 idempotency_conflict. When the body also accepts idempotency_key, supply either or both with the same value.

Maximum string length: 255

Path Parameters

group_id
string<uuid>
required

The group's id.

Body

application/json

The operation and its fields

A balance operation on a group. type selects the operation and accepted fields.

amount
string
required

The positive amount to add or remove, in the asset's units.

Minimum string length: 1
Example:

"100.00"

asset_id
string<uuid>
required

The asset to operate on.

Example:

"a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02"

description
string
required

Why you are adjusting the balance. Scrip records it in the journal entry.

Required string length: 1 - 500
Example:

"Customer service credit"

direction
enum<string>
required

Whether to credit or debit the balance (ADJUST only).

Available options:
CREDIT,
DEBIT
Example:

"CREDIT"

program_id
string<uuid>
required

The program the operation belongs to.

Example:

"8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"

type
enum<string>
required

The operation to run: ADJUST.

Available options:
ADJUST
Example:

"ADJUST"

allow_negative
boolean

When true on a DEBIT adjustment, allows the balance to go negative.

Example:

false

bucket
enum<string>

The balance bucket to adjust. Defaults to AVAILABLE.

Available options:
AVAILABLE,
HELD
Example:

"AVAILABLE"

expires_at
string<date-time>

Expiration timestamp for a credited lot (RFC 3339, LOT assets with direction: CREDIT only). Mutually exclusive with expires_in. Not supported with bucket: HELD.

Required string length: 1 - 255
Example:

"2027-12-31T23:59:59Z"

expires_in
string

Expiration duration from now for a credited lot, such as "90d" (LOT assets with direction: CREDIT only). Units are w, d, h, m and s. Mutually exclusive with expires_at. Not supported with bucket: HELD.

Required string length: 1 - 255
Example:

"90d"

idempotency_key
string

Unique key for this operation. You can send it in the Idempotency-Key header instead. When you send both, they must match.

Required string length: 1 - 255
Example:

"order-1001-completed"

matures_at
string<date-time>

Vesting timestamp when a credited lot becomes spendable (RFC 3339, LOT assets with direction: CREDIT only). A future value puts the credit in DEFERRED. Mutually exclusive with matures_in. Not supported with bucket: HELD.

Required string length: 1 - 255
Example:

"2027-12-31T23:59:59Z"

matures_in
string

Vesting duration from now when a credited lot becomes spendable, such as "7d" (LOT assets with direction: CREDIT only). A future value puts the credit in DEFERRED. Mutually exclusive with matures_at. Not supported with bucket: HELD.

Required string length: 1 - 255
Example:

"7d"

Response

Operation applied

The result of a group balance operation. ADJUST returns the adjustment's journal entry, direction and bucket; every other type returns the amount processed, the lots touched and the balance after.

amount
string
required

Amount adjusted

Example:

"100.00"

bucket
enum<string>
required

The balance bucket that was adjusted.

Available options:
AVAILABLE,
HELD,
DEFERRED
Example:

"AVAILABLE"

journal_entry_id
string<uuid>
required

Ledger journal entry created by this adjustment

Example:

"657a0312-1aaa-4ba7-842b-edfbb39edf14"

type
enum<string>
required

Whether the adjustment was a credit or debit

Available options:
CREDIT,
DEBIT
Example:

"CREDIT"

asset_id
string<uuid>

Asset that was adjusted

Example:

"a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02"

message
string

Confirmation message

Example:

"Group balance adjusted successfully"

program_id
string<uuid>

Program the balance belongs to

Example:

"8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"