---
title: "Split a total among chat members, one request each"
method: POST
path: "/api/v1/transfer_requests/split"
tags: ["Money"]
---

# Split a total among chat members, one request each

`POST /api/v1/transfer_requests/split`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/transfer_requests/split`
- Auth: API key in header `api-key`

Creates one TransferRequest per member (sharing one split_id); the requester's own share is implicit (total is divided by members.count + 1).

## Request body

- object
  - `wallet_id` string, required
  - `chat_id` string, required
  - `member_ids` string[], required
  - `total_amount` string, required
  - `message` string

## Response `200`

OK

- TransferRequest[]
  - `id` string, uuid, required
  - `amount` string, required: A plain human-decimal amount, e.g. "1.50" -- never a float, never scientific notation.
  - `message` string, nullable
  - `status` 'Pending' | 'Paying' | 'Completed' | 'Declined' | 'Cancelled', required
  - `sender_id` string, uuid, required
  - `receiver_id` string, uuid, required
  - `transfer_id` string, nullable
  - `request_type` 'invoice' | 'null', nullable
  - `line_items` object[], nullable
    - `name` string
    - `qty` string: A plain human-decimal amount, e.g. "1.50" -- never a float, never scientific notation.
    - `unit_price` string: A plain human-decimal amount, e.g. "1.50" -- never a float, never scientific notation.
    - `subtotal` string: A plain human-decimal amount, e.g. "1.50" -- never a float, never scientific notation.
    - `product_id` string, nullable
  - `due_at` string, date-time, nullable
  - `wallet` object, nullable
    - `id` string, uuid
    - `chain` string
    - `testnet` boolean
    - `public_address` string
    - `wallet_type` string, nullable
    - `name_3` string
  - `split_id` string, nullable
  - `recurring_interval` string, nullable
  - `reminded_at` string, date-time, nullable
  - `last_failed_at` string, date-time, nullable
  - `last_failed_reason` string, nullable: One plain classified sentence, never the raw node error.
  - `created_at` string, date-time, nullable
  - `chat_id` string, nullable
  - `sender` object: A narrower party reference than SafeUserSummary -- id, username, display_name only, no account_type/system/avatar_url. Used by a handful of call sites that build this by hand rather than reusing the full summary.
    - `id` string, uuid, required
    - `username` string, required
    - `display_name` string, required
  - `receiver` object: A narrower party reference than SafeUserSummary -- id, username, display_name only, no account_type/system/avatar_url. Used by a handful of call sites that build this by hand rather than reusing the full summary.
    - `id` string, uuid, required
    - `username` string, required
    - `display_name` string, required
  - `split_members` object[]: Present only on the requester's own view of a split request.
    - `user_id` string, uuid
    - `display_name` string
    - `status` string
    - `request_id` string, uuid
  - `split_summary` object
    - `total` string: A plain human-decimal amount, e.g. "1.50" -- never a float, never scientific notation.
    - `paid` string: A plain human-decimal amount, e.g. "1.50" -- never a float, never scientific notation.
    - `pending` string: A plain human-decimal amount, e.g. "1.50" -- never a float, never scientific notation.

## Other responses

- `401`: Missing or invalid credentials.
- `403`: You can't request money from <name>. (blocked member)
- `422`: Pick at least one other chat member to split with. / wallet resolution failure. / Total must be a decimal amount. / Each share must come to more than zero. -- all Error (singular); a per-member TransferRequest failing model validation inside the all-or-nothing transaction (rescue ActiveRecord::RecordInvalid) uses Errors (plural) instead.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
