---
title: "Add Care Team Batch"
method: POST
path: "/care-team/add-batch"
tags: ["care-team"]
---

# Add Care Team Batch

`POST /care-team/add-batch`

## Request

- Base URL: `https://api.projectindi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.projectindi.com/care-team/add-batch`
- Auth: none declared

Add multiple care team members to a child in one request.

Each member is processed independently - successful entries are persisted
even when others fail (partial failure). Returns per-member results so the
client can surface inline errors and allow retrying only failed entries.

For each successfully added member:
- Email is checked against clinician_profiles (Branch A = match, Branch B = no match)
- Branch A results include clinician_name and clinic_name

When send_inbox_emails=True, dispatches inbox sharing emails to selected
(or all) successfully added members.

Authentication: JWT required
RLS: User must have family access to the child

## Request body

- AddBatchRequest: Request body for POST /care-team/add-batch.
  - `child_id` string, required
  - `members` BatchMemberEntry[], required
    - `name` string, required
    - `email` string, required
    - `organisation` string, nullable
    - `role_value` string, nullable
    - `phone` string, nullable
    - `address` string, nullable
    - `role_kind` string, nullable
    - `access_level` string, nullable
    - `auto_match_opt_in` boolean
  - `send_inbox_emails` boolean
  - `inbox_email_recipients` string[], nullable
  - `source` 'wizard' | 'onboarding' | 'agent'

## Response `200`

Successful Response

- AddBatchResponse
  - `results` BatchMemberResult[], required
    - `name` string, required
    - `email` string, required
    - `success` boolean, required
    - `error` string, nullable
    - `branch` string, nullable
    - `clinician_name` string, nullable
    - `clinic_name` string, nullable
    - `child_care_team_id` string, nullable
    - `role_kind` string, nullable
    - `role_value` string, nullable
    - `access_level` string, nullable
    - `clinic_sequence_triggered` boolean
    - `email_sent` boolean, nullable
    - `inbox_shared` boolean, nullable
  - `parent_name` string, nullable
  - `inbox_email` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles.md) - [All operations](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles/llms.txt) - [OpenAPI document](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles/revisions/25a7813e21fd?raw)
