---
title: "Creates a customer family"
method: POST
path: "/customer-families"
tags: ["Customer Families"]
---

# Creates a customer family

`POST /customer-families`

## Request

- Base URL: `https://api.rillet.com`
- URL: `https://api.rillet.com/customer-families`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/rillet/apis/rillet-accounting-api/docs/customer-families/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a family from customers that do not already belong to one. A child may report to
another child, so a multi-level hierarchy is created in one call.

## Request body

- CustomerFamilyRequest
  - `name` string: Defaults to the root parent customer's name when omitted.
  - `root_parent_customer_id` string, uuid, required: The customer at the top of the tree. It must not already belong to a family.
  - `child_links` CustomerFamilyLink[], required: Every other member, and who it reports to. Each one reports to the root parent or to another customer in this list, which is how a hierarchy deeper than one level is created in a single call.
    - `customer_id` string, uuid, required
    - `parent_customer_id` string, uuid, required: The member this customer reports to. Which members are eligible depends on the request; see the field that carries this.

## Response `200`

OK

- CustomerFamily: A customer family, without its members.
  - `id` string, uuid, required
  - `name` string, required: Defaults to the root parent customer's name when omitted on create.
  - `root_parent_customer_id` string, uuid, required: The customer at the top of the tree. Every family has exactly one. Not to be confused with a member's parent_customer_id, which points at whoever that member reports to.
  - `member_count` integer, required: How many customers are in the family, counting the one at the top. Always at least two.

## Other responses

- `default`: Error

## Changes

- **2026-11-03** `c393d0102005`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rillet/apis/rillet-accounting-api/changes/customer-families/post.md)

---

[API](https://skmtc.dev/rillet/apis/rillet-accounting-api.md) - [All operations](https://skmtc.dev/rillet/apis/rillet-accounting-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rillet/apis/rillet-accounting-api/revisions/c393d0102005?raw)
