---
title: "Save the workspace's Add Call History defaults"
description: "Stores the four Lead Perfection codes used when writing call history. Values are LP codes, not labels."
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Integrations

`PUT /api/integrations/leadperfection/call-history-defaults`

Stores the four Lead Perfection codes used when writing call history. Values are LP codes, not labels.

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Header parameters

- `x-workspace-id` (`put/api/integrations/leadperfection/call-history-defaults.header.x-workspace-id`; string, required)

## Request body

_Required._

- `emp_id` (`put/api/integrations/leadperfection/call-history-defaults.emp_id`; string, optional) — Lead Perfection employee id written as the caller.
- `result_code` (`put/api/integrations/leadperfection/call-history-defaults.result_code`; string, optional)
- `call_type` (`put/api/integrations/leadperfection/call-history-defaults.call_type`; string, optional)
- `call_queue_id` (`put/api/integrations/leadperfection/call-history-defaults.call_queue_id`; string, optional)

## Example request

```json
{
  "emp_id": "string",
  "result_code": "string",
  "call_type": "string",
  "call_queue_id": "string"
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url https://api.channelautomation.com/api/integrations/leadperfection/call-history-defaults \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-workspace-id: string' \
  --data '
{
  "emp_id": "string",
  "result_code": "string",
  "call_type": "string",
  "call_queue_id": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/integrations/leadperfection/call-history-defaults';
const options = {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'x-workspace-id': 'string',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({
    emp_id: 'string',
    result_code: 'string',
    call_type: 'string',
    call_queue_id: 'string'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/integrations/leadperfection/call-history-defaults"

payload = {
    "emp_id": "string",
    "result_code": "string",
    "call_type": "string",
    "call_queue_id": "string"
}
headers = {
    "Content-Type": "application/json",
    "x-workspace-id": "string",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Saved defaults.


Source: https://developer.channelautomations.com/api/put-api-integrations-leadperfection-call-history-defaults/index.md
