# CloudTalk

> Manage contacts and messages and read call history in CloudTalk.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/cloudtalk

## Actions

### Create a contact

Create a contact.

**Inputs**

- Name (`name`, text, required): Name.
- Type (`type`, text): Type. One of: `contact`, `lead`.
- Title (`title`, text): Title.
- Company (`company`, text): Company.
- Website (`website`, text): Website.
- City (`city`, text): City.
- State (`state`, text): State.
- Country code (`country_code`, text): ISO 3166-1 alpha-2.
- Phones (`phones`, list): Up to 20 numbers in E.164. An invalid number is rejected, not dropped.
- Emails (`emails`, list): Up to 20 valid addresses. An invalid address is rejected, not dropped.
- Tag IDS (`tag_ids`, list): Up to 50 existing contact tag ids from List contact tags. Read-only tags are refused. To use a new tag, create it first with Create a contact tag.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "address": "example",
    "city": "example",
    "company": "example",
    "country": {
      "code": "example",
      "name": "example"
    },
    "createdAt": "example",
    "customFields": {},
    "dashboardUrl": "example",
    "emails": [
      "example"
    ],
    "favoriteUserId": "example",
    "id": "example",
    "industry": "example",
    "name": "example",
    "phones": [
      "example"
    ],
    "source": "example",
    "state": "example",
    "tags": [
      {
        "id": "example",
        "name": "example",
        "readOnly": true
      }
    ],
    "title": "example",
    "type": "example",
    "updatedAt": "example",
    "website": "example",
    "zip": "example"
  }
}
```

### Delete a contact

Delete a contact.

**Inputs**

- Contact (`contact_id`, text, required): The contact id.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {}
}
```

### Get a call summary

Get a call summary.

**Inputs**

- Call ID (`call_id`, number, required): Call ID

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "callId": 1,
    "summary": "example"
  }
}
```

### Get a call transcript

Get a call transcript.

**Inputs**

- Call ID (`call_id`, number, required): Call ID
- Limit (`limit`, number): Maximum number of items to return. At least 1.
- Offset (`offset`, number): Offset the list of returned items by this amount. At least 0.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "data": {
      "callId": 1,
      "callers": [
        {
          "id": {},
          "localIdentifier": {},
          "type": {}
        }
      ],
      "language": "example",
      "segments": [
        {
          "caller": {},
          "end": {},
          "start": {},
          "text": {}
        }
      ]
    },
    "pagination": {
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### Get a contact

Get a contact.

**Inputs**

- Contact (`contact_id`, text, required): The contact id.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "address": "example",
    "city": "example",
    "company": "example",
    "country": {
      "code": "example",
      "name": "example"
    },
    "createdAt": "example",
    "customFields": {},
    "dashboardUrl": "example",
    "emails": [
      "example"
    ],
    "favoriteUserId": "example",
    "id": "example",
    "industry": "example",
    "name": "example",
    "phones": [
      "example"
    ],
    "source": "example",
    "state": "example",
    "tags": [
      {
        "id": "example",
        "name": "example",
        "readOnly": true
      }
    ],
    "title": "example",
    "type": "example",
    "updatedAt": "example",
    "website": "example",
    "zip": "example"
  }
}
```

### Get call details

Get call details.

**Inputs**

- Call ID (`call_id`, number, required): ID of a call

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "call_rating": 1,
    "call_steps": [
      {
        "agent_calls": [
          {}
        ],
        "call_times": {
          "holding_time": {},
          "ringing_time": {},
          "talking_time": {},
          "total_time": {},
          "waiting_time": {},
          "wrap_up_time": {}
        },
        "date": "example",
        "id": 1,
        "name": "example",
        "reason": "example",
        "resolved_by": 1,
        "resolved_by_call": {
          "agent": {},
          "date": {},
          "id": {}
        },
        "status": "example",
        "strategy": "example",
        "type": "example"
      }
    ],
    "call_tags": [
      {
        "id": 1,
        "label": "example"
      }
    ],
    "call_times": {
      "holding_time": 1,
      "ringing_time": 1,
      "talking_time": 1,
      "total_time": 1,
      "waiting_time": 1,
      "wrap_up_time": 1
    },
    "cdr_id": 1,
    "company_id": 1,
    "contact": {
      "country": "example",
      "id": 1,
      "name": "example",
      "number": "example"
    },
    "date": "example",
    "direction": "example",
    "internal_number": {
      "id": 1,
      "name": "example",
      "number": "example"
    },
    "notes": [
      "example"
    ],
    "out_of_office": true,
    "recorded": true,
    "status": "example",
    "type": "example",
    "uuid": "example"
  }
}
```

### Get call sentiment

Get call sentiment.

**Inputs**

- Call ID (`call_id`, number, required): Call ID

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "callId": 1,
    "overallSentiment": "example"
  }
}
```

### List a call’s tags

List a call’s tags.

**Inputs**

- Call ID (`call_id`, text, required): The numeric call id or the call uuid.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "color": "example",
        "id": "example",
        "name": "example",
        "taggedAt": "example",
        "taggedByUserId": "example",
        "type": "example"
      }
    ],
    "requestId": "example"
  }
}
```

### List agents

List agents.

**Inputs**

- Limit (`limit`, number): Max. number of items in response data. From 1 to 1000.
- Page (`page`, number): Number of page to return. At least 1.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "responseData": {
      "data": [
        {
          "Agent": {}
        }
      ],
      "itemsCount": 1,
      "limit": 1,
      "pageCount": 1,
      "pageNumber": 1
    }
  }
}
```

### List call history

List call history.

**Inputs**

- Start time (`start_time`, date and time): Returns calls that started at or after this time, e.g. 2017-12-24 12:22:00. The filter uses the call start time, so a call that started earlier isn't returned even if it ended inside the range.
- End time (`end_time`, date and time): Returns calls that started at or before this time, e.g. 2017-12-24 12:22:00.
- Contact (`contact_id`, number): Filter by assigned contact ID
- Type (`type`, text): Filter by call type. One of: `incoming`, `outgoing`, `internal`.
- Status (`status`, text): Filter by call status - 'missed' = for only missed calls, 'answered' = for all answered calls. One of: `missed`, `answered`.
- Tag ID (`tag_id`, number): Filter by assigned call tag ID
- Limit (`limit`, number): Max. number of items in response data. From 1 to 1000.
- Page (`page`, number): Number of page to return. At least 1.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "responseData": {
      "data": [
        {
          "CallNumber": {},
          "Cdr": {
            "ended_at": "example",
            "id": 1,
            "recorded": true,
            "started_at": "example",
            "type": "example"
          },
          "Contact": {}
        }
      ],
      "itemsCount": 1,
      "limit": 1,
      "pageCount": 1,
      "pageNumber": 1
    }
  }
}
```

### List call topics

List call topics.

**Inputs**

- Call ID (`call_id`, number, required): Call ID
- Limit (`limit`, number): Maximum number of items to return. At least 1.
- Offset (`offset`, number): Offset the list of returned items by this amount. At least 0.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "data": {
      "callId": 1,
      "callers": [
        {
          "id": {},
          "localIdentifier": {},
          "type": {}
        }
      ],
      "topics": [
        {
          "spans": {},
          "topic": {},
          "weight": {}
        }
      ]
    },
    "pagination": {
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List contacts

List contacts.

**Inputs**

- Limit (`limit`, number): Page size, 1 to 100. Out-of-range values are clamped and the value used is echoed in `pagination.limit`. A value that is not a whole number, such as `abc` or `1.5`, is rejected with `400 VALIDATION.INVALID_PARAMETER`.
- Cursor (`cursor`, text): Opaque cursor from a previous page's `pagination.next`. Pass it back unchanged. Send it with the same filters: a cursor from a list with `updatedSince` (ordered by update time) is rejected on a list without it, and the other way round. A cursor this API did not issue, or one sent with different filters, is rejected with `400 PAGINATION.INVALID_CURSOR`.
- Search (`search`, text): Full-text search, 2 to 200 characters. See How `search` matches above.
- Tag IDS (`tag_ids`, list): 1 to 20 comma-separated contact tag ids from List contact tags. A contact matches when it has any of them. Integration tag ids match nothing.
- Type (`type`, text): `contact` or `lead`. Default: both. One of: `contact`, `lead`.
- Updated since (`updated_since`, date and time): RFC 3339 time. Only contacts whose `updatedAt` is at or after it. Without `search`, the list is then ordered by `updatedAt`, most recently updated first. A contact updated while you page moves to the top of that order, so the next run with a later `updatedSince` picks it up.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "address": "example",
        "city": "example",
        "company": "example",
        "country": {
          "code": {},
          "name": {}
        },
        "createdAt": "example",
        "customFields": {},
        "dashboardUrl": "example",
        "emails": [
          {}
        ],
        "favoriteUserId": "example",
        "id": "example",
        "industry": "example",
        "name": "example",
        "phones": [
          {}
        ],
        "source": "example",
        "state": "example",
        "tags": [
          {}
        ],
        "title": "example",
        "type": "example",
        "updatedAt": "example",
        "website": "example",
        "zip": "example"
      }
    ],
    "pagination": {
      "limit": 1,
      "next": "example"
    },
    "requestId": "example"
  }
}
```

### List countries

List countries.

**Inputs**: None.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "responseData": [
      {
        "Country": {
          "calling_code": {},
          "country_code": {},
          "id": {},
          "iso3": {},
          "name": {}
        }
      }
    ]
  }
}
```

### List groups

List groups.

**Inputs**

- Limit (`limit`, number): Max. number of items in response data. From 1 to 1000.
- Page (`page`, number): Number of page to return. At least 1.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "responseData": {
      "data": [
        {
          "Groups": {}
        }
      ],
      "itemsCount": 1,
      "limit": 1,
      "pageCount": 1,
      "pageNumber": 1
    }
  }
}
```

### List notes

List notes.

**Inputs**

- Limit (`limit`, number): Max. number of items in response data. From 1 to 1000.
- Page (`page`, number): Number of page to return. At least 1.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "responseData": {
      "data": [
        {
          "ContactNote": {}
        }
      ],
      "itemsCount": 1,
      "limit": 1,
      "pageCount": 1,
      "pageNumber": 1
    }
  }
}
```

### List numbers

List numbers.

**Inputs**

- Limit (`limit`, number): Max. number of items in response data. From 1 to 1000.
- Page (`page`, number): Number of page to return. At least 1.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "responseData": {
      "data": [
        {
          "CallNumber": {}
        }
      ],
      "itemsCount": 1,
      "limit": 1,
      "pageCount": 1,
      "pageNumber": 1
    }
  }
}
```

### List tags

List tags.

**Inputs**

- Limit (`limit`, number): Max. number of items in response data. From 1 to 1000.
- Page (`page`, number): Number of page to return. At least 1.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "responseData": {
      "data": [
        {
          "id": {},
          "name": {}
        }
      ],
      "itemsCount": 1,
      "limit": 1,
      "pageCount": 1,
      "pageNumber": 1
    }
  }
}
```

### Send an SMS

Send an SMS.

**Inputs**

- Recipient (`recipient`, text, required): Recipient number in E.164 format. To send Whatsapp message include prefix "whatsapp:+421..." to both sender and recipient numbers.
- Message (`message`, text, required): Message body/content.
- Sender (`sender`, text, required): Sender number in E.164 format. To send Whatsapp message include prefix "whatsapp:+421..." to both sender and recipient numbers.
- Images by URL (`images_by_url`, list): Image to be send as MMS. Will be downloaded from URL. MAX 5MB. Can contain up to 5 urls.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "responseData": {
      "data": {},
      "success": true
    }
  }
}
```

### Update a contact

Update a contact.

**Inputs**

- Contact (`contact_id`, text, required): The contact id.
- Name (`name`, text): Cannot be null.
- Type (`type`, text): Only `contact`, which turns a lead into a contact. A contact cannot become a lead. Cannot be null. One of: `contact`.
- Title (`title`, text): `null` clears the field.
- Company (`company`, text): `null` clears the field.
- Website (`website`, text): `null` clears the field.
- City (`city`, text): `null` clears the field.
- State (`state`, text): `null` clears the field.
- Phones (`phones`, list): Replaces the whole list. Up to 20, in E.164.
- Emails (`emails`, list): Replaces the whole list. Up to 20.

**Outputs**

- `data` (object): The response from CloudTalk.

**Example output**

```json
{
  "data": {
    "address": "example",
    "city": "example",
    "company": "example",
    "country": {
      "code": "example",
      "name": "example"
    },
    "createdAt": "example",
    "customFields": {},
    "dashboardUrl": "example",
    "emails": [
      "example"
    ],
    "favoriteUserId": "example",
    "id": "example",
    "industry": "example",
    "name": "example",
    "phones": [
      "example"
    ],
    "source": "example",
    "state": "example",
    "tags": [
      {
        "id": "example",
        "name": "example",
        "readOnly": true
      }
    ],
    "title": "example",
    "type": "example",
    "updatedAt": "example",
    "website": "example",
    "zip": "example"
  }
}
```
