# mv.copilotProfiles

> The copilotProfiles methods of @morevoice/sdk: Real-time agent copilot configuration.

Real-time agent copilot configuration. These methods are on `mv.copilotProfiles`, where `mv` is your client (see [the Node.js SDK](https://docs.morevoice.ai/sdk/node/#connect)). Each one returns the response object and throws when the API answers with an error.

## `create()`

**Create a copilot profile.** Returns the new `CopilotProfile`.

```ts
mv.copilotProfiles.create(body?: CopilotProfilesCreateData["body"], options?: RequestOptions): Promise<CopilotProfilesCreateResponse>
```

`POST /copilot_profiles` · [API reference](https://docs.morevoice.ai/api/operations/copilot_profiles_create/)

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `body.alerts` | `object[]` | no |  |
| `body.coaching` | `object` | no |  |
| `body.company` | `string` | no | Who the agent represents. |
| `body.compliance` | `object` | no |  |
| `body.fields` | `object[]` | no | Details the copilot picks out of the conversation. |
| `body.goal` | `string` | no | What the call should achieve. |
| `body.kb` | `object` | no |  |
| `body.language` | `string` | no | The calls' language (`he`, `en`, …). |
| `body.model` | `object` | no |  |
| `body.name` | `string` | no | Default: the template's name. |
| `body.objections` | `object[]` | no | The objection library. |
| `body.product` | `string` | no |  |
| `body.qa_rubric` | `object[]` | no | The QA rubric this profile's calls are scored against (empty: the organisation's rubric). |
| `body.script` | `object` | no |  |
| `body.stages` | `object[]` | no | The call's stages, each with a checklist (used when no `script` flow is set). |
| `body.template_id` | `"sales-outbound" \| "customer-service"` | no | Start from a template (GET /v1/copilot_profiles/templates); the fields you send override it. |
| `body.tone` | `string` | no | How the agent should sound. |
| `options.headers["MoreVoice-Version"]` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `options.headers["Idempotency-Key"]` | `string` | no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
| `options` | `RequestOptions` | no | `idempotencyKey`, extra `headers` and an abort `signal`: see [retries and idempotency](https://docs.morevoice.ai/sdk/typescript/retries/). |

### Returns

`CopilotProfile`:

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | The profile's ID. |
| `object` | `"copilot_profile"` | Always `copilot_profile`. |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `name` | `string` | — |
| `version` | `integer` | Goes up on every change. |
| `template_id` | `string \| null` | The template it was created from. |
| `goal` | `string` | What the call should achieve. |
| `tone` | `string` | How the agent should sound. |
| `company` | `string` | Who the agent represents. |
| `product` | `string` | — |
| `language` | `string` | The calls' language (`he`, `en`, …). |
| `stages` | `object[]` | The call's stages, each with a checklist (used when no `script` flow is set). |
| `objections` | `object[]` | The objection library. |
| `kb` | `object` | — |
| `fields` | `object[]` | Details the copilot picks out of the conversation. |
| `compliance` | `object` | — |
| `coaching` | `object` | — |
| `alerts` | `object[]` | — |
| `qa_rubric` | `object[]` | The QA rubric this profile's calls are scored against (empty: the organisation's rubric). |
| `script` | `object` | — |
| `model` | `object` | — |
| `created` | `string` | An ISO-8601 timestamp in UTC. |
| `updated` | `string` | An ISO-8601 timestamp in UTC. |

### Example

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

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

const copilotProfile = await mv.copilotProfiles.create({
	company: "Acme",
	name: "Outbound sales",
	product: "Acme Cloud PBX",
	template_id: "sales-outbound",
});
console.log(copilotProfile);
```

## `delete()`

**Delete a copilot profile.** Deletes the profile. Queues and calls that used it run without a copilot profile.

```ts
mv.copilotProfiles.delete(id: CopilotProfilesDeleteData["path"]["id"], options?: RequestOptions): Promise<CopilotProfilesDeleteResponse>
```

`DELETE /copilot_profiles/{id}` · [API reference](https://docs.morevoice.ai/api/operations/copilot_profiles_delete/)

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A copilot profile ID (`cop_…`). |
| `options.headers["MoreVoice-Version"]` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `options.headers["Idempotency-Key"]` | `string` | no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
| `options` | `RequestOptions` | no | `idempotencyKey`, extra `headers` and an abort `signal`: see [retries and idempotency](https://docs.morevoice.ai/sdk/typescript/retries/). |

### Returns

`DeletedCopilotProfile`:

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | A copilot profile ID (prefix `cop_`). |
| `object` | `"copilot_profile"` | Always `copilot_profile`. |
| `deleted` | `true` | — |

### Example

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

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

const deletedCopilotProfile = await mv.copilotProfiles.delete("cop_7Hk2Lm9Qp");
console.log(deletedCopilotProfile);
```

## `duplicate()`

**Duplicate a copilot profile.** Returns the new `CopilotProfile`. Answers `404` with the code `resource_missing` when nothing has this ID in this organisation and mode.

```ts
mv.copilotProfiles.duplicate(id: CopilotProfilesDuplicateData["path"]["id"], body?: CopilotProfilesDuplicateData["body"], options?: RequestOptions): Promise<CopilotProfilesDuplicateResponse>
```

`POST /copilot_profiles/{id}/duplicate` · [API reference](https://docs.morevoice.ai/api/operations/copilot_profiles_duplicate/)

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A copilot profile ID (`cop_…`). |
| `body.name` | `string` | no | Default: the original's name with "(copy)". |
| `options.headers["MoreVoice-Version"]` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `options.headers["Idempotency-Key"]` | `string` | no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
| `options` | `RequestOptions` | no | `idempotencyKey`, extra `headers` and an abort `signal`: see [retries and idempotency](https://docs.morevoice.ai/sdk/typescript/retries/). |

### Returns

`CopilotProfile`:

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | The profile's ID. |
| `object` | `"copilot_profile"` | Always `copilot_profile`. |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `name` | `string` | — |
| `version` | `integer` | Goes up on every change. |
| `template_id` | `string \| null` | The template it was created from. |
| `goal` | `string` | What the call should achieve. |
| `tone` | `string` | How the agent should sound. |
| `company` | `string` | Who the agent represents. |
| `product` | `string` | — |
| `language` | `string` | The calls' language (`he`, `en`, …). |
| `stages` | `object[]` | The call's stages, each with a checklist (used when no `script` flow is set). |
| `objections` | `object[]` | The objection library. |
| `kb` | `object` | — |
| `fields` | `object[]` | Details the copilot picks out of the conversation. |
| `compliance` | `object` | — |
| `coaching` | `object` | — |
| `alerts` | `object[]` | — |
| `qa_rubric` | `object[]` | The QA rubric this profile's calls are scored against (empty: the organisation's rubric). |
| `script` | `object` | — |
| `model` | `object` | — |
| `created` | `string` | An ISO-8601 timestamp in UTC. |
| `updated` | `string` | An ISO-8601 timestamp in UTC. |

### Example

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

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

const copilotProfile = await mv.copilotProfiles.duplicate("cop_7Hk2Lm9Qp", {
	name: "Outbound sales B",
});
console.log(copilotProfile);
```

## `list()`

**List copilot profiles.** Returns a page of `CopilotProfile` objects, newest first. Pass `next_cursor` as `starting_after` for the next page; the SDKs iterate every page for you.

```ts
mv.copilotProfiles.list(query?: NonNullable<CopilotProfilesListData["query"]>, options?: RequestOptions): PagedList<CopilotProfilesListResponse["data"][number], NonNullable<CopilotProfilesListData["query"]>>
```

`GET /copilot_profiles` · [API reference](https://docs.morevoice.ai/api/operations/copilot_profiles_list/)

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `query.limit` | `integer` | no | How many objects to return, 1–100 (default 20). |
| `query.starting_after` | `string` | no | A cursor (`next_cursor`) or object ID: return the objects after it (older). |
| `query.ending_before` | `string` | no | A cursor or object ID: return the objects before it (newer). |
| `options.headers["MoreVoice-Version"]` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `options` | `RequestOptions` | no | `idempotencyKey`, extra `headers` and an abort `signal`: see [retries and idempotency](https://docs.morevoice.ai/sdk/typescript/retries/). |

### Returns

A [`PagedList`](https://docs.morevoice.ai/sdk/typescript/pagination/): `await` it for the first page, `for await` it for every item.

### Example

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

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

for await (const copilotProfile of mv.copilotProfiles.list()) {
	console.log(copilotProfile);
}
```

## `listTemplates()`

**List copilot profile templates.** The built-in profiles you can start from (`template_id` on create).

```ts
mv.copilotProfiles.listTemplates(query?: NonNullable<CopilotProfilesListTemplatesData["query"]>, options?: RequestOptions): PagedList<CopilotProfilesListTemplatesResponse["data"][number], NonNullable<CopilotProfilesListTemplatesData["query"]>>
```

`GET /copilot_profiles/templates` · [API reference](https://docs.morevoice.ai/api/operations/copilot_profiles_list_templates/)

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `query.limit` | `integer` | no | How many objects to return, 1–100 (default 20). |
| `query.starting_after` | `string` | no | A cursor (`next_cursor`) or object ID: return the objects after it (older). |
| `query.ending_before` | `string` | no | A cursor or object ID: return the objects before it (newer). |
| `options.headers["MoreVoice-Version"]` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `options` | `RequestOptions` | no | `idempotencyKey`, extra `headers` and an abort `signal`: see [retries and idempotency](https://docs.morevoice.ai/sdk/typescript/retries/). |

### Returns

A [`PagedList`](https://docs.morevoice.ai/sdk/typescript/pagination/): `await` it for the first page, `for await` it for every item.

### Example

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

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

for await (const copilotProfile of mv.copilotProfiles.listTemplates()) {
	console.log(copilotProfile);
}
```

## `retrieve()`

**Retrieve a copilot profile.** Returns the `CopilotProfile` object. Answers `404` with the code `resource_missing` when nothing has this ID in this organisation and mode.

```ts
mv.copilotProfiles.retrieve(id: CopilotProfilesRetrieveData["path"]["id"], options?: RequestOptions): Promise<CopilotProfilesRetrieveResponse>
```

`GET /copilot_profiles/{id}` · [API reference](https://docs.morevoice.ai/api/operations/copilot_profiles_retrieve/)

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A copilot profile ID (`cop_…`). |
| `options.headers["MoreVoice-Version"]` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `options` | `RequestOptions` | no | `idempotencyKey`, extra `headers` and an abort `signal`: see [retries and idempotency](https://docs.morevoice.ai/sdk/typescript/retries/). |

### Returns

`CopilotProfile`:

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | The profile's ID. |
| `object` | `"copilot_profile"` | Always `copilot_profile`. |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `name` | `string` | — |
| `version` | `integer` | Goes up on every change. |
| `template_id` | `string \| null` | The template it was created from. |
| `goal` | `string` | What the call should achieve. |
| `tone` | `string` | How the agent should sound. |
| `company` | `string` | Who the agent represents. |
| `product` | `string` | — |
| `language` | `string` | The calls' language (`he`, `en`, …). |
| `stages` | `object[]` | The call's stages, each with a checklist (used when no `script` flow is set). |
| `objections` | `object[]` | The objection library. |
| `kb` | `object` | — |
| `fields` | `object[]` | Details the copilot picks out of the conversation. |
| `compliance` | `object` | — |
| `coaching` | `object` | — |
| `alerts` | `object[]` | — |
| `qa_rubric` | `object[]` | The QA rubric this profile's calls are scored against (empty: the organisation's rubric). |
| `script` | `object` | — |
| `model` | `object` | — |
| `created` | `string` | An ISO-8601 timestamp in UTC. |
| `updated` | `string` | An ISO-8601 timestamp in UTC. |

### Example

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

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

const copilotProfile = await mv.copilotProfiles.retrieve("cop_7Hk2Lm9Qp");
console.log(copilotProfile);
```

## `update()`

**Update a copilot profile.** Updates the fields you send. Nested objects merge with the stored values; lists (stages, objections, alerts…) replace them. Calls that start afterwards use the new version.

```ts
mv.copilotProfiles.update(id: CopilotProfilesUpdateData["path"]["id"], body?: CopilotProfilesUpdateData["body"], options?: RequestOptions): Promise<CopilotProfilesUpdateResponse>
```

`PATCH /copilot_profiles/{id}` · [API reference](https://docs.morevoice.ai/api/operations/copilot_profiles_update/)

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A copilot profile ID (`cop_…`). |
| `body.alerts` | `object[]` | no |  |
| `body.coaching` | `object` | no |  |
| `body.company` | `string` | no | Who the agent represents. |
| `body.compliance` | `object` | no |  |
| `body.fields` | `object[]` | no | Details the copilot picks out of the conversation. |
| `body.goal` | `string` | no | What the call should achieve. |
| `body.kb` | `object` | no |  |
| `body.language` | `string` | no | The calls' language (`he`, `en`, …). |
| `body.model` | `object` | no |  |
| `body.name` | `string` | no |  |
| `body.objections` | `object[]` | no | The objection library. |
| `body.product` | `string` | no |  |
| `body.qa_rubric` | `object[]` | no | The QA rubric this profile's calls are scored against (empty: the organisation's rubric). |
| `body.script` | `object` | no |  |
| `body.stages` | `object[]` | no | The call's stages, each with a checklist (used when no `script` flow is set). |
| `body.tone` | `string` | no | How the agent should sound. |
| `options.headers["MoreVoice-Version"]` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `options` | `RequestOptions` | no | `idempotencyKey`, extra `headers` and an abort `signal`: see [retries and idempotency](https://docs.morevoice.ai/sdk/typescript/retries/). |

### Returns

`CopilotProfile`:

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | The profile's ID. |
| `object` | `"copilot_profile"` | Always `copilot_profile`. |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `name` | `string` | — |
| `version` | `integer` | Goes up on every change. |
| `template_id` | `string \| null` | The template it was created from. |
| `goal` | `string` | What the call should achieve. |
| `tone` | `string` | How the agent should sound. |
| `company` | `string` | Who the agent represents. |
| `product` | `string` | — |
| `language` | `string` | The calls' language (`he`, `en`, …). |
| `stages` | `object[]` | The call's stages, each with a checklist (used when no `script` flow is set). |
| `objections` | `object[]` | The objection library. |
| `kb` | `object` | — |
| `fields` | `object[]` | Details the copilot picks out of the conversation. |
| `compliance` | `object` | — |
| `coaching` | `object` | — |
| `alerts` | `object[]` | — |
| `qa_rubric` | `object[]` | The QA rubric this profile's calls are scored against (empty: the organisation's rubric). |
| `script` | `object` | — |
| `model` | `object` | — |
| `created` | `string` | An ISO-8601 timestamp in UTC. |
| `updated` | `string` | An ISO-8601 timestamp in UTC. |

### Example

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

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

const copilotProfile = await mv.copilotProfiles.update("cop_7Hk2Lm9Qp", {
	coaching: {
		talk_ratio_max: 0.6,
	},
});
console.log(copilotProfile);
```
