createVirtualCard, createUserCashBalance does not take an authUserId. Ownership is a separate, second call: assignObjectOwner with objectType: SPEND_ACCOUNTS.
Ownership is metadata, not access.Assigning an owner records who is responsible for a spend account. It does not, on its own, grant that person the ability to spend from it. Effective access is still the higher of the user’s account role (
UACRoleType) and any item-level access granted on the spend account itself.Assign the owner and make sure the user’s role gives them the access you actually intend.Prerequisites
1
The authorized user exists and is ACTIVE
Add them with
addAuthorizedUser and confirm the returned status is ACTIVE. A PENDING assignment cannot be used as an owner — the user must accept the invite first.2
Your token carries both scopes
createUserCashBalance requires MANAGE_PAYMENT. assignObjectOwner requires MANAGE_SUBUSERS. A single Bearer token needs both to run this flow end to end.3
You have the authorized user's userId
assignObjectOwner is keyed on userId, not authUserId. See Resolving the userId below.Step 1 — Create the spend account
Create the spend account exactly as you normally would. It is created on the caller’s account with no owner attached.userCashBalanceId. That value is the objectId in Step 3.
Give the account a nickname that identifies the owner. Ownership metadata is not surfaced in every list view, so a nickname like
"Ada — Field Ops" keeps the account legible in getUserCashBalances without an extra lookup.Resolving the userId
assignObjectOwner takes the authorized user’s userId — the underlying user record. This is a different value from the authUserId returned by addAuthorizedUser and authorizedUsers, which identifies the UAC role assignment.
The AuthorizedUser type does not currently expose userId. Today the documented ways to obtain it are:
Step 2 — Assign the authorized user as owner
Restricted Access
This mutation requires a Bearer token with the
MANAGE_SUBUSERS scope.Parameters
assignObjectOwner only assigns an owner to an object that does not have one yet. If the spend account already has an owner, the call will not overwrite it — use transferObjectOwner instead.Sample response
Response fields
Reassigning ownership
Ownership moves withtransferObjectOwner, which takes the objectOwnerId from the original assignment rather than the spend account ID.
Full flow
Add an authorized user, create a spend account for them, and record them as its owner. Step 1 — Add the authorized user.status is ACTIVE.
Step 2 — Create the spend account.
depositCashBalance or move funds across from another spend account with transferInternalBalance, targeting the new userCashBalanceId.
TypeScript
Error codes
Authorized User Overview
Roles, statuses, and the full authorized user lifecycle.
Create Virtual Card for Authorized User
Issue a card on an authorized user’s behalf with
authUserId.Spend Accounts Overview
Creating, reading, editing, and closing spend accounts.
Remove Authorized User
What happens to owned objects when access is revoked.