# EZ Texting

> Manage EZ Texting contacts, groups and templates and send or read text messages.

App · 18 actions. Web page: https://docs.lodol.com/docs/integrations/ez-texting

## Actions

### Create a contact group

Create a contact group.

**Inputs**

- Name (`name`, text, required): The group name, max length 25 chars
- Note (`note`, text): Notes related to contact group
- Phone numbers (`phone_numbers`, list): Phone numbers of contacts to add to this group
- Group IDS (`group_ids`, list): Groups of contacts to merge into this group

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Create a message template

Create a message template.

**Inputs**

- Name (`name`, text, required): Message template name
- Company name (`company_name`, text): Company name
- Message (`message`, text, required): Message text
- Media file ID (`media_file_id`, text): Media file id
- Media file URL (`media_file_url`, text): Medial file url

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Create or update a contact

Create or update a contact.

**Inputs**

- Phone number (`phone_number`, text, required): Phone number
- First name (`first_name`, text): First name
- Last name (`last_name`, text): Last name
- Email (`email`, text): Email address
- Note (`note`, text): Notes
- Group IDS add (`group_ids_add`, list): Groups to add contact to
- Group IDS remove (`group_ids_remove`, list): Groups to remove contact from

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Delete a contact group

Delete a contact group.

**Inputs**

- Contact group (`contact_group_id`, text, required): Contact group id

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

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

### Delete a message template

Delete a message template.

**Inputs**

- Message template (`message_template_id`, text, required): Message template id

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

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

### Get a contact

Get a contact.

**Inputs**

- Phone number (`phone_number`, text, required): Phone number

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "createdAt": "example",
    "custom1": "example",
    "custom2": "example",
    "custom3": "example",
    "custom4": "example",
    "custom5": "example",
    "email": "example",
    "firstName": "example",
    "groups": [
      {
        "contactsCount": 1,
        "id": "example",
        "name": "example",
        "note": "example"
      }
    ],
    "lastName": "example",
    "note": "example",
    "optOut": true,
    "phoneNumber": "example",
    "source": 1,
    "updatedAt": "example",
    "values": {}
  }
}
```

### Get a contact group

Get a contact group.

**Inputs**

- Contact group (`contact_group_id`, text, required): Contact group id

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "contactsCount": 1,
    "id": "example",
    "name": "example",
    "note": "example"
  }
}
```

### Get a message template

Get a message template.

**Inputs**

- Message template (`message_template_id`, text, required): Message template id

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "companyName": "example",
    "id": "example",
    "mediaFile": {
      "id": "example",
      "name": "example",
      "type": "example",
      "uploadAt": "example",
      "url": "example"
    },
    "message": "example",
    "name": "example"
  }
}
```

### Get credit balance

Get credit balance.

**Inputs**: None.

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "anytimeCredits": 1,
    "planCredits": 1,
    "totalCredits": 1
  }
}
```

### Get message details

Get message details.

**Inputs**

- Message ID (`message_id`, text, required): Message ID.

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "contacts": [
      {
        "createdAt": "example",
        "custom1": "example",
        "custom2": "example",
        "custom3": "example",
        "custom4": "example",
        "custom5": "example",
        "email": "example",
        "firstName": "example",
        "groups": [
          {}
        ],
        "lastName": "example",
        "note": "example",
        "optOut": true,
        "phoneNumber": "example",
        "source": 1,
        "updatedAt": "example",
        "values": {}
      }
    ],
    "credits": 1,
    "fromNumber": "example",
    "groups": [
      {
        "contactsCount": 1,
        "id": "example",
        "name": "example",
        "note": "example"
      }
    ],
    "recipientsCount": 1,
    "sentOn": "example",
    "type": "example"
  }
}
```

### List contact groups

List contact groups.

**Inputs**

- Page (`page`, number): Offset of a given page. The default is 0. See [pagination](https://eztexting.readme.io/docs/pagination) docs for more information.
- Size (`size`, text): The maximum number of records to return in a paged list response. The default is 20 and allowed values are 10, 20, 50, 100, 200. One of: `10`, `20`, `50`, `100`, `200`.
- Sort (`sort`, text): Sort field name and direction (asc or desc). Example: sort=created,desc

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "content": [
      {
        "contactsCount": 1,
        "id": "example",
        "name": "example",
        "note": "example"
      }
    ],
    "number": 1,
    "numberOfElements": 1,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}
```

### List contacts

List contacts.

**Inputs**

- Page (`page`, number): Offset of a given page. The default is 0. See [pagination](https://eztexting.readme.io/docs/pagination) docs for more information.
- Size (`size`, text): The maximum number of records to return in a paged list response. The default is 20 and allowed values are 10, 20, 50, 100, 200. One of: `10`, `20`, `50`, `100`, `200`.
- Sort (`sort`, text): Sort field name and direction (asc or desc). Example: sort=created,desc
- Filters phone number like (`filters_phone_number_like`, text): Filter by phone number
- Filters first name like (`filters_first_name_like`, text): Filter by first name
- Filters last name like (`filters_last_name_like`, text): Filter by last name
- Filters email like (`filters_email_like`, text): Filter by email

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "content": [
      {
        "createdAt": "example",
        "custom1": "example",
        "custom2": "example",
        "custom3": "example",
        "custom4": "example",
        "custom5": "example",
        "email": "example",
        "firstName": "example",
        "groups": [
          {}
        ],
        "lastName": "example",
        "note": "example",
        "optOut": true,
        "phoneNumber": "example",
        "source": 1,
        "updatedAt": "example",
        "values": {}
      }
    ],
    "number": 1,
    "numberOfElements": 1,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}
```

### List message templates

List message templates.

**Inputs**

- Page (`page`, number): Offset of a given page. The default is 0. See [pagination](https://eztexting.readme.io/docs/pagination) docs for more information.
- Size (`size`, text): The maximum number of records to return in a paged list response. The default is 20 and allowed values are 10, 20, 50, 100, 200. One of: `10`, `20`, `50`, `100`, `200`.
- Sort (`sort`, text): Sort field name and direction (asc or desc). Example: sort=created,desc

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "content": [
      {
        "companyName": "example",
        "id": "example",
        "mediaFile": {
          "id": {},
          "name": {},
          "type": {},
          "uploadAt": {},
          "url": {}
        },
        "message": "example",
        "name": "example"
      }
    ],
    "number": 1,
    "numberOfElements": 1,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}
```

### List messages

List messages.

**Inputs**

- Page (`page`, number): Offset of a given page. The default is 0. See [pagination](https://eztexting.readme.io/docs/pagination) docs for more information.
- Size (`size`, text): The maximum number of records to return in a paged list response. The default is 20 and allowed values are 10, 20, 50, 100, 200. One of: `10`, `20`, `50`, `100`, `200`.
- Sort (`sort`, text): Sort field name and direction (asc or desc). Example: sort=created,desc
- Filters contact number eq (`filters_contact_number_eq`, text): Filter by contact phone number
- Unread (`unread`, true/false): Filter by unread flag: true for unread, false for read
- Incoming (`incoming`, true/false): Filter by incoming flag: true for incoming, false for outgoing
- Start time (`start_time`, date and time): Filter by sentAt after - example: 2020-01-03T10:15:30+00:00
- End time (`end_time`, date and time): Filter by sentAt before - example: 2020-01-04T10:15:30+00:00

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "content": [
      {
        "contactNumber": "example",
        "group": true,
        "id": "example",
        "inbound": true,
        "mediaUrl": "example",
        "message": "example",
        "messageGroupId": "example",
        "optIn": true,
        "optOut": true,
        "sentAt": "example",
        "status": "example",
        "type": "example",
        "userNumber": "example"
      }
    ],
    "number": 1,
    "numberOfElements": 1,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}
```

### List webhooks

List webhook subscriptions and their callback URLs.

**Inputs**

- Page (`page`, number): Offset of a given page. The default is 0. See [pagination](https://eztexting.readme.io/docs/pagination) docs for more information.
- Size (`size`, text): The maximum number of records to return in a paged list response. The default is 20 and allowed values are 10, 20, 50, 100, 200. One of: `10`, `20`, `50`, `100`, `200`.
- Sort (`sort`, text): Sort field name and direction (asc or desc). Example: sort=created,desc

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "content": [
      {
        "callbackUrl": "example",
        "id": "example",
        "insecureSsl": true,
        "type": "example"
      }
    ],
    "number": 1,
    "numberOfElements": 1,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}
```

### Send or schedule a message

Send or schedule a message.

**Inputs**

- Message (`message`, text): The text message to send
- Send at (`send_at`, date and time): When to send the message (omit to send immediately) example: 2020-12-03T10:15:30+00:00
- Media URL (`media_url`, text): Media url - most standard format image, video and audio files supported up to 5MB
- Message template (`message_template_id`, text): Message template id to build message from
- From number (`from_number`, text): Number to send from - only required if you have more than one number available to send from
- To numbers (`to_numbers`, list): Collection of contact numbers to send to
- Group IDS (`group_ids`, list): Collection of contact group ids to send to
- Message type (`message_type`, text): Requested message type to send. One of: `SMS`, `MMS`.

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Update a contact group

Update a contact group.

**Inputs**

- Contact group (`contact_group_id`, text, required): Contact group id
- Name (`name`, text): The group name, max length 25 chars
- Note (`note`, text): Notes related to contact group

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

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

### Update a message template

Update a message template.

**Inputs**

- Message template (`message_template_id`, text, required): Message template id
- Name (`name`, text): Message template name
- Company name (`company_name`, text): Company name
- Message (`message`, text): Message text

**Outputs**

- `data` (object): The response from EZ Texting.

**Example output**

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