# Heymarket

> Read contacts, inboxes, messages, templates, tags and tracked links in Heymarket.

App · 15 actions. Web page: https://docs.lodol.com/docs/integrations/heymarket

## Actions

### Get contact

Get contact.

**Inputs**

- Contact id (`contact_id`, text, required): Contact UUID

**Outputs**

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

**Example output**

```json
{
  "data": {
    "assigned_user_id": 1,
    "avatar": "example",
    "created": "example",
    "creator_id": 1,
    "custom": {},
    "display_name": "example",
    "email": "example",
    "external_id": "example",
    "external_ref": "example",
    "first": "example",
    "id": 1,
    "inbox_id": 1,
    "inbox_opt_outs": [],
    "last": "example",
    "note": [],
    "op": "example",
    "parent_id": 1,
    "phone": "example",
    "rev": 1,
    "shared": false,
    "tags": [],
    "team_id": 1,
    "type": "example",
    "updated": "example"
  }
}
```

### Get link

Get link.

**Inputs**

- Link id (`link_id`, number, required): Link ID

**Outputs**

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

**Example output**

```json
{
  "data": {
    "broadcast_id": 1,
    "campaign_step_id": 1,
    "conversation_id": 1,
    "created_at": "example",
    "id": 1,
    "last_visited_at": "example",
    "original_url": "example",
    "short_code": "example",
    "short_url": "example",
    "target": "example",
    "team_id": 1,
    "template_id": 1
  }
}
```

### Get survey

Get survey.

**Inputs**

- Survey id (`survey_id`, number, required): Survey ID

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created": "example",
    "id": 1,
    "name": "example",
    "question": "example",
    "type": "example",
    "updated": "example"
  }
}
```

### Get tag

Get tag.

**Inputs**

- Tag id (`tag_id`, number, required): Tag ID

**Outputs**

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

**Example output**

```json
{
  "data": {
    "color": "example",
    "created": "example",
    "id": 1,
    "rev": 1,
    "tag": "example",
    "team_id": 1,
    "updated": "example"
  }
}
```

### Get team

Get team.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": 1,
    "list_size": 1,
    "mcp_disabled": false,
    "mcp_disabled_by_heymarket": false,
    "members": [],
    "name": "example"
  }
}
```

### Get template

Get template.

**Inputs**

- Template id (`template_id`, number, required): Template ID

**Outputs**

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

**Example output**

```json
{
  "data": {
    "archived": false,
    "content": {
      "files": [],
      "gallery": [],
      "text": "example"
    },
    "created": "example",
    "creator_id": 1,
    "id": 1,
    "local_id": "example",
    "name": "example",
    "op": "example",
    "rev": 1,
    "shared": false,
    "team_id": 1,
    "updated": "example"
  }
}
```

### List contact channels

List contact channels.

**Inputs**

- Contact id (`contact_id`, text, required): Contact UUID

**Outputs**

- `data` (list): The response from Heymarket.

**Example output**

```json
{
  "data": []
}
```

### List contacts

List contacts.

**Inputs**

- Limit (`limit`, number): Number of results per page. Default 30, max 100.
- Page (`page`, number): Page number (0-indexed).
- Ascending (`ascending`, true/false): Sort ascending if true, descending otherwise.
- Updated since (`updated_since`, date and time): Updated since.

**Outputs**

- `data` (list): The response from Heymarket.

**Example output**

```json
{
  "data": []
}
```

### List inboxes

List inboxes.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Heymarket.

**Example output**

```json
{
  "data": []
}
```

### List links

List links.

**Inputs**

- Limit (`limit`, number): Links per page. Values above 100 are rejected with 400. From 1 to 100.
- Page (`page`, number): Page number to fetch.
- Order (`order`, text): Sort order by creation date. One of: `asc`, `desc`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "limit": 1,
    "links": [],
    "page": 1,
    "total": 1
  }
}
```

### List messages

List messages.

**Inputs**

- Limit (`limit`, number): Messages to return per page. Defaults to 30.
- Created at (`created_at`, date and time, required): Last returned message timestamp. Fetch messages created on and after this RFC 3339 timestamp. Message history is limited to the last 12 months; an older value is treated as 12 months ago.
- Ascending (`ascending`, true/false): True to sort in ascending order. Defaults to descending.
- Inbox (`inbox_id`, number): Inbox id. At least 1.

**Outputs**

- `data` (list): The response from Heymarket.

**Example output**

```json
{
  "data": []
}
```

### List surveys

List surveys.

**Inputs**

- Limit (`limit`, number): Limit.
- Page (`page`, number): Page.

**Outputs**

- `data` (list): The response from Heymarket.

**Example output**

```json
{
  "data": []
}
```

### List tags

List tags.

**Inputs**

- Date (`date`, text): Date.

**Outputs**

- `data` (list): The response from Heymarket.

**Example output**

```json
{
  "data": []
}
```

### List templates

List templates.

**Inputs**

- Before (`before`, date and time): Before.

**Outputs**

- `data` (list): The response from Heymarket.

**Example output**

```json
{
  "data": []
}
```

### List user groups

List user groups.

**Inputs**

- Group ids (`group_ids`, list): Group ids.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "user_groups": []
  }
}
```
