# Replace the defaults for new client organizations

`PUT https://api.morevoice.ai/v1/partner/child_defaults`

Replaces the feature flags and plan every new client organisation gets (live keys only): only flags in `settable_flags` (`true` needs the flag on your own account) and a plan in `allowed_plans`. New clients get them when `POST /v1/organizations` creates them (the plan only for a wholesale client created without `plan`). A plan-feature flag such as `media_streams` is only given to a client whose plan includes it. With `apply_to_existing`, every existing client (closed ones aside) gets them too, the plan first: only what differs is changed, so it is safe to repeat; `applied` reports what happened. Audited in your organisation and in every client changed.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `organizations_update_child_defaults`.

## Parameters

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Request body

Optional, `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `apply_to_existing` | `boolean` | no | Also give them to every existing client now (default false). Only differing values change: safe to repeat. |
| `flags` | `Record<string, boolean>` | no | The flags every new client gets, by name (default none). Only flags in `settable_flags`. |
| `plan` | `"starter" \| "growth" \| "business" \| "enterprise" \| null` | no | The plan every new wholesale client gets when created without `plan`: one of `allowed_plans`. Null or absent: the usual default. |

Example:

```json
{
  "apply_to_existing": true,
  "flags": {
    "media_streams": true,
    "tools.contract_v1": true,
    "v1.transcript_stream": true
  },
  "plan": "growth"
}
```

## Responses

### 200 OK

OK Returns `ChildDefaults`.

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"partner_child_defaults"` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `flags` | `Record<string, boolean>` | The flags every new client gets. |
| `plan` | `string \| null` | The plan every new wholesale client gets when created without `plan`; null = the usual default (`starter`). |
| `settable_flags` | `string[]` | The flags you may set for your clients: the partner-settable flags your own account has. |
| `allowed_plans` | `string[]` | The plans you may give your clients (set by platform support). Empty: plan changes are refused. |
| `updated` | `string \| null` | When the defaults were last replaced; null = never. |
| `applied` | `object \| null` | With `apply_to_existing`: what applying the defaults to your existing clients did. Else null. |
| `applied.organizations` | `integer` | Client organisations looked at (closed ones aside). |
| `applied.changed` | `integer` | Client organisations with at least one change. |
| `applied.skipped` | `object[]` | Client organisations that didn't get all of the defaults, and why. |
| `applied.skipped_flags` | `string[]` | Default flags not applied: no longer settable by you. |
| `applied.plan_skipped` | `boolean` | The default plan was not applied: it is no longer in `allowed_plans`. |

Example:

```json
{
  "allowed_plans": [
    "starter",
    "growth"
  ],
  "applied": {
    "changed": 3,
    "organizations": 12,
    "plan_skipped": false,
    "skipped": [],
    "skipped_flags": []
  },
  "flags": {
    "media_streams": true,
    "tools.contract_v1": true,
    "v1.transcript_stream": true
  },
  "livemode": true,
  "object": "partner_child_defaults",
  "plan": "growth",
  "settable_flags": [
    "v1.transcript_stream",
    "tools.contract_v1",
    "media_streams",
    "telephony.fax"
  ],
  "updated": "2026-11-23T10:00:00.000Z"
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 409 Conflict

The request conflicts with the object's state, or the Idempotency-Key was reused with other parameters. Returns `ErrorEnvelope`.

### 413 Payload Too Large

The request body is larger than the endpoint accepts, or has more parts or files than it takes. Returns `ErrorEnvelope`.

### 415 Unsupported Media Type

The request body's Content-Type is not one the endpoint takes. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const childDefaults = await mv.organizations.updateChildDefaults({
	apply_to_existing: true,
	flags: {
		media_streams: true,
		"tools.contract_v1": true,
		"v1.transcript_stream": true,
	},
	plan: "growth",
});
console.log(childDefaults);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

child_defaults = client.organizations.update_child_defaults({
    "apply_to_existing": True,
    "flags": {
        "media_streams": True,
        "tools.contract_v1": True,
        "v1.transcript_stream": True,
    },
    "plan": "growth",
})
print(child_defaults)
```

**cURL**

```sh
curl -X PUT https://api.morevoice.ai/v1/partner/child_defaults \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "apply_to_existing": true,
  "flags": {
    "media_streams": true,
    "tools.contract_v1": true,
    "v1.transcript_stream": true
  },
  "plan": "growth"
}'
```
