Assign account
well_assign_accountAttach a bank account to a company, and say whether the workspace owns it.
Use this when an account carries no company, or when its ownership is still
unknown — the two states a figure that walks account ownership cannot be
computed over.
REQUIRED: account_id, plus at least one of company_id or ownership.
ownership is one of:
"workspace" — the business's own account
"counterparty" — someone else's, seen on an invoice or a payment
"unknown" — not yet classified
This changes figures, not just a label. An account marked "workspace" puts its transactions inside the internal-transfer rule: a movement with both legs on owned accounts stops counting as money leaving the business. Marking a counterparty's account as the workspace's own therefore removes real spend from the burn, quietly and consistently, with no error anywhere.
So do not guess it. An account's owner cannot be read off its name, its bank, or
the company that appears most often beside it. Ask, or leave it unknown —
"not yet classified" is a truthful state and a wrong classification is not.
company_id must name a company in the SAME workspace as the account; a
company from another workspace is refused rather than resolved. Pass
company_id: null to detach.
Returns { success: true, account_id, ownership, company_id } on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ownership | No | Whether the workspace owns the account: "workspace", "counterparty", or "unknown". | |
| account_id | Yes | The UUID of the account to assign (required) | |
| company_id | No | The company that owns the account, in the same workspace. `null` detaches it. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. | |
| idempotency_key | No | Optional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation. | |
| workspace_scope | No | Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| success | Yes | ||
| ownership | No | ||
| account_id | No | ||
| company_id | No | ||
| company_name | No | ||
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| newly_connected | No | Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. |