# Freshchat

> Manage Freshchat users and conversations, send messages, discover agents and channels, and watch user conversations.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/freshchat

## Actions

### Create conversation

Create conversation.

**Inputs**

- Channel (`channel_id`, text, required): Channel ID.
- Status (`status`, text): Status. One of: `new`, `assigned`, `resolved`, `reopened`.
- Assigned agent (`assigned_agent_id`, text): Assigned agent ID.
- Assigned group (`assigned_group_id`, text): Assigned group ID.
- Properties (`properties`, object): Properties.
- Contact (`contact_id`, text, required): The user starting the conversation.
- Message (`text`, text, required): The first message in the conversation.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "conversation_id": "conversation-1"
  }
}
```

### Create user

Create user.

**Inputs**

- Email (`email`, text): Email.
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Phone (`phone`, text): Phone.
- Reference ID (`reference_id`, text): Reference ID.
- Avatar (`avatar`, object): Avatar.
- Properties (`properties`, list): Properties.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "id": "contact-1"
  }
}
```

### Delete user

Delete user.

**Inputs**

- Contact (`contact_id`, text, required): Contact ID.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {}
}
```

### Get account

Get account.

**Inputs**: None.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {}
}
```

### Get agent

Get agent.

**Inputs**

- Agent (`agent_id`, text, required): Agent ID.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "id": "agent-1"
  }
}
```

### Get conversation

Get conversation.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "conversation_id": "conversation-1",
    "status": "new"
  }
}
```

### Get user

Get user.

**Inputs**

- Contact (`contact_id`, text, required): Contact ID.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "email": "qa@example.com",
    "id": "contact-1"
  }
}
```

### List agent statuses

List agent statuses.

**Inputs**: None.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {}
}
```

### List agents

List agents.

**Inputs**

- Page (`page`, number): Page. At least 1.
- Items per page (`items_per_page`, number): Items per page. From 1 to 100.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "agents": [],
    "pagination": {
      "total_items": 0
    }
  }
}
```

### List channels

List channels.

**Inputs**

- Page (`page`, number): Page. At least 1.
- Items per page (`items_per_page`, number): Items per page. From 1 to 100.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "channels": [],
    "pagination": {
      "total_items": 0
    }
  }
}
```

### List conversation fields

List conversation fields.

**Inputs**: None.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {}
}
```

### List groups

List groups.

**Inputs**

- Page (`page`, number): Page. At least 1.
- Items per page (`items_per_page`, number): Items per page. From 1 to 100.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "groups": [],
    "pagination": {
      "total_items": 0
    }
  }
}
```

### List messages

List messages.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.
- Page (`page`, number): Page. At least 1.
- Items per page (`items_per_page`, number): Items per page. From 1 to 100.
- From time (`from_time`, date and time): From time.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "messages": [],
    "pagination": {
      "total_items": 0
    }
  }
}
```

### List roles

List roles.

**Inputs**

- Page (`page`, number): Page. At least 1.
- Items per page (`items_per_page`, number): Items per page. From 1 to 100.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "pagination": {
      "total_items": 0
    },
    "roles": []
  }
}
```

### List user conversations

List user conversations.

**Inputs**

- Contact (`contact_id`, text, required): Contact ID.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "conversations": []
  }
}
```

### List users

List users.

**Inputs**

- Page (`page`, number): Page. At least 1.
- Items per page (`items_per_page`, number): Items per page. From 1 to 100.
- Email (`email`, text): Email.
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Phone (`phone`, text): Phone.
- Sort order (`sort_order`, text): Sort order. One of: `asc`, `desc`.
- Sort by (`sort_by`, text): Sort by. One of: `email`.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "pagination": {
      "total_items": 0
    },
    "users": []
  }
}
```

### Send message

Send message.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.
- Actor type (`actor_type`, text, required): Actor type. One of: `agent`, `user`.
- Actor ID (`actor_id`, text, required): Actor ID.
- Message type (`message_type`, text, required): Message type. One of: `normal`, `private`.
- Message (`text`, text, required): The message text.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {
    "id": "message-1"
  }
}
```

### Update agent

Update agent.

**Inputs**

- Agent (`agent_id`, text, required): Agent ID.
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Phone (`phone`, text): Phone.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {}
}
```

### Update conversation

Update conversation.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID.
- Status (`status`, text): Status. One of: `new`, `assigned`, `resolved`, `reopened`.
- Assigned agent (`assigned_agent_id`, text): Assigned agent ID.
- Assigned group (`assigned_group_id`, text): Assigned group ID.
- Properties (`properties`, object): Properties.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {}
}
```

### Update user

Update user.

**Inputs**

- Contact (`contact_id`, text, required): Contact ID.
- Email (`email`, text): Email.
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Phone (`phone`, text): Phone.

**Outputs**

- `response` (object): The complete service response, including resource data and pagination fields.

**Example output**

```json
{
  "response": {}
}
```
