# 8x8

> Send SMS, WhatsApp and other messaging app messages, verification codes and voice calls with 8x8, look up phone numbers, keep 8x8 contacts and groups, and start workflows when messages arrive, are delivered or fail, or calls end.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/eight-by-eight

## Actions

### Add contacts to group

Put contacts in a contact group.

**Inputs**

- Group (`group_id`, number, required): The contact group.
- Contact IDs (`contact_ids`, list, required): The contacts' ids, from 'Create contact' or 'Search contacts'.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "contacts": 1,
    "createdAt": "example",
    "description": "example",
    "id": 1,
    "isBlacklist": true,
    "name": "example"
  }
}
```

### Cancel scheduled messaging app message

Cancel a messaging app message scheduled for later that hasn't gone out yet.

**Inputs**

- Message ID (`umid`, text, required): The message's id (umid), from the step that sent it.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "cancelledCount": 1
  }
}
```

### Cancel scheduled SMS

Cancel a text message scheduled for later that hasn't gone out yet.

**Inputs**

- Message ID (`umid`, text, required): The message's id (umid), from the step that sent it.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "cancelledCount": 1
  }
}
```

### Cancel scheduled SMS batch

Cancel the messages of a batch scheduled for later that haven't gone out yet.

**Inputs**

- Batch ID (`batch_id`, text, required): The batch's id, from 'Send SMS to many numbers'.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "cancelledCount": 1
  }
}
```

### Check verification code

Check the code someone typed against the one sent to them, or see where a verification stands: waiting, verified, failed or expired.

**Inputs**

- Verification ID (`session_id`, text, required): The verification's id, from 'Send verification code'.
- Code (`code`, text): The code the person typed. Leave empty to only read the status.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "attempt": 1,
    "destination": "example",
    "expiresAt": "example",
    "retryAfter": "example",
    "sessionId": "example",
    "status": "example",
    "verifyUri": "example"
  }
}
```

### Create contact

Add a contact to your 8x8 address book, optionally in groups. If one already has the same phone number or email, 8x8 updates that contact instead.

**Inputs**

- First name (`first_name`, text): The contact's first name.
- Last name (`last_name`, text): The contact's last name.
- Phone number (`msisdn`, text): The contact's mobile number, in international format such as +6591234567. Give a phone number or an email address, or both.
- Email (`email`, text): The contact's email address.
- External ID (`external_id`, text): Your own id for the contact, such as its id in your CRM.
- Country (`country`, text): The contact's country. One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.
- Groups (`group_ids`, list): Groups to put the contact in.
- Custom fields (`custom_attributes`, object): Your own fields and values to keep with the contact.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "addresses": {
      "email": "example",
      "facebookUserId": "example",
      "kakaoTalkId": "example",
      "lineId": "example",
      "msisdn": "example",
      "weChatUserId": "example",
      "zaloId": "example"
    },
    "country": "example",
    "createdAt": "example",
    "customAttributes": {},
    "externalId": "example",
    "firstName": "example",
    "groups": [
      {
        "contacts": 1,
        "createdAt": "example",
        "description": "example",
        "id": 1,
        "isBlacklist": true,
        "name": "example"
      }
    ],
    "id": 1,
    "lastName": "example"
  }
}
```

### Create contact group

Create a group of contacts, such as a list to text. A blacklist group holds people who must not be messaged.

**Inputs**

- Name (`name`, text, required): The group's name. No two groups can share one.
- Description (`description`, text): What the group is for.
- Blacklist (`is_blacklist`, true/false): Make this a blacklist: people who must not be messaged.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "contacts": 1,
    "createdAt": "example",
    "description": "example",
    "id": 1,
    "isBlacklist": true,
    "name": "example"
  }
}
```

### Delete contact

Delete a contact from your 8x8 address book.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's id, from 'Create contact' or 'Search contacts'.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

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

### Delete contact group

Delete a contact group. The contacts in it stay in your address book.

**Inputs**

- Group (`group_id`, number, required): The contact group.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

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

### Get account balance

Get your prepaid 8x8 account's balance and currency. Accounts billed monthly have no balance to read.

**Inputs**: None.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "balance": 1,
    "currency": "example"
  }
}
```

### Get contact

Get a contact with its phone number, email, groups and custom fields.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's id, from 'Create contact' or 'Search contacts'.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "addresses": {
      "email": "example",
      "facebookUserId": "example",
      "kakaoTalkId": "example",
      "lineId": "example",
      "msisdn": "example",
      "weChatUserId": "example",
      "zaloId": "example"
    },
    "country": "example",
    "createdAt": "example",
    "customAttributes": {},
    "externalId": "example",
    "firstName": "example",
    "groups": [
      {
        "contacts": 1,
        "createdAt": "example",
        "description": "example",
        "id": 1,
        "isBlacklist": true,
        "name": "example"
      }
    ],
    "id": 1,
    "lastName": "example"
  }
}
```

### Get messaging app message

Get a messaging app message's status on each channel tried, such as WhatsApp and then SMS.

**Inputs**

- Message ID (`umid`, text, required): The message's id (umid), from the step that sent it.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "batchId": "example",
        "channel": "example",
        "channelId": "example",
        "clientBatchId": "example",
        "clientMessageId": "example",
        "content": "example",
        "contentType": "example",
        "country": "example",
        "createdAt": "example",
        "direction": "example",
        "status": {
          "detail": "example",
          "errorCode": 1,
          "errorMessage": "example",
          "state": "example",
          "timestamp": "example"
        },
        "step": 1,
        "subAccountId": "example",
        "umid": "example",
        "user": {
          "channelUserId": "example",
          "msisdn": "example"
        }
      }
    ]
  }
}
```

### Get SMS

Get a text message's delivery status, segments and price. 8x8 hides the text and number unless it has turned that off for your account.

**Inputs**

- Message ID (`umid`, text, required): The message's id (umid), from the step that sent it.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "batchId": "example",
    "body": "example",
    "clientBatchId": "example",
    "clientMessageId": "example",
    "country": "example",
    "createdAt": "example",
    "direction": "example",
    "encoding": "example",
    "msisdn": "example",
    "price": {
      "currency": "example",
      "perSms": 1,
      "total": 1
    },
    "smsCount": 1,
    "source": "example",
    "status": {
      "detail": "example",
      "errorCode": 1,
      "errorMessage": "example",
      "state": "example",
      "timestamp": "example"
    },
    "subAccountId": "example",
    "umid": "example"
  }
}
```

### List virtual numbers

List the 8x8 phone numbers your voice subaccount rents, with their country, status and prices.

**Inputs**: None.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "lastUpdatedAt": "example",
    "numbers": [
      {
        "billingCurrency": "example",
        "countryCode": "example",
        "dateCreated": "example",
        "dateUpdated": "example",
        "incomingRate": 1,
        "msisdn": "example",
        "numberHealthCheckEnabled": true,
        "numberType": "example",
        "operationalStatus": "example",
        "rentalPrice": 1
      }
    ],
    "totalNumbers": 1
  }
}
```

### Look up phone number

Find a phone number's country, type (mobile, landline and so on) and international format. Operator and live lookups also give its network, porting and roaming status, at a cost, once 8x8 turns them on.

**Inputs**

- Phone number (`phone_number`, text, required): The phone number, in international format such as +6591234567.
- Lookup (`type`, text): How much to find out. Defaults to the free format lookup. One of: `format` (Format only (free)), `operator` (Operator (paid)), `live` (Live status and roaming (paid)).
- Country (`country`, text): The number's country, needed only when it isn't in international format. One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "country": "example",
    "currentOperator": {
      "country": "example",
      "mcc": "example",
      "mnc": "example",
      "operatorName": "example"
    },
    "originalOperator": {
      "country": "example",
      "mcc": "example",
      "mnc": "example",
      "operatorName": "example"
    },
    "phoneNumber": "example",
    "phoneNumberNational": "example",
    "phoneType": "example",
    "ported": true,
    "presence": true,
    "requestId": "example",
    "roaming": true,
    "roamingOperator": {
      "country": "example",
      "mcc": "example",
      "mnc": "example",
      "operatorName": "example"
    },
    "status": {
      "detail": "example",
      "errorCode": 1,
      "errorMessage": "example",
      "state": "example",
      "timestamp": "example"
    }
  }
}
```

### Make voice call

Call a phone number and read out a message in the voice you choose, or play a recording, then hang up. 8x8 must have approved the number you call from.

**Inputs**

- To (`destination`, text, required): The phone number to call, in international format such as +6591234567.
- From (`source`, text, required): The number to call from (your caller ID): one of your 8x8 numbers.
- Play (`plays`, text): Whether to read out a message or play a recording when they answer. Defaults to a message. One of: `message` (Read out a message), `recording` (Play a recording).
- Message (`message`, text): What to say when they answer, up to 3,000 characters, when the call reads out a message.
- Voice (`voice_profile`, text): The voice that reads the message: its language, accent and gender.
- Recording link (`audio_url`, text): A link to an MP3 or WAV recording, up to 5 MB, when the call plays a recording.
- Times to play (`repetition`, number): How many times to say the message or play the recording, 1 to 3. From 1 to 3.
- Speaking speed (`speed`, number): How fast to read the message, from 0.5 (slow) to 2 (fast). 1 is normal speed. From 0.5 to 2.
- Your reference (`client_request_id`, text): Your own reference for the call, sent back when it ends.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "callFlowRequestId": "example",
    "sessionId": "example",
    "sessionStatus": "example",
    "statusCode": 1,
    "statusMessage": "example",
    "validUntil": "example"
  }
}
```

### Remove contacts from group

Take contacts out of a contact group. They stay in your address book.

**Inputs**

- Group (`group_id`, number, required): The contact group.
- Contact IDs (`contact_ids`, list, required): The contacts' ids, from 'Create contact' or 'Search contacts'.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "contacts": 1,
    "createdAt": "example",
    "description": "example",
    "id": 1,
    "isBlacklist": true,
    "name": "example"
  }
}
```

### Search contact groups

List your contact groups, or find them by name, with how many contacts each has. Gets one page; to see more, run it again with the next page.

**Inputs**

- Name (`name`, text): A group name to look for.
- Page size (`limit`, number): How many to return, 1 to 500. 8x8's default is 20. From 1 to 500.
- Page (`offset`, number): Which page to return, counting from 0. At least 0.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "hasNextPage": true,
    "hasPreviousPage": true,
    "items": [
      {
        "contacts": 1,
        "createdAt": "example",
        "description": "example",
        "id": 1,
        "isBlacklist": true,
        "name": "example"
      }
    ],
    "page": 1,
    "totalCount": 1,
    "totalFiltered": 1,
    "totalPages": 1
  }
}
```

### Search contacts

Find contacts by name, phone number or email, in a group or a country. Gets one page; to see more, run it again with the next page.

**Inputs**

- Search for (`query`, text): A name, phone number or email to look for.
- Group (`group_id`, number): Only contacts in this group. At least 0.
- Country (`country`, text): Only contacts in this country. One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.
- Page size (`limit`, number): How many to return, 1 to 500. 8x8's default is 20. From 1 to 500.
- Page (`offset`, number): Which page to return, counting from 0. At least 0.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "hasNextPage": true,
    "hasPreviousPage": true,
    "items": [
      {
        "addresses": {
          "email": "example",
          "facebookUserId": "example",
          "kakaoTalkId": "example",
          "lineId": "example",
          "msisdn": "example",
          "weChatUserId": "example",
          "zaloId": "example"
        },
        "country": "example",
        "createdAt": "example",
        "customAttributes": {},
        "externalId": "example",
        "firstName": "example",
        "groups": [
          {
            "contacts": 1,
            "createdAt": "example",
            "description": "example",
            "id": 1,
            "isBlacklist": true,
            "name": "example"
          }
        ],
        "id": 1,
        "lastName": "example"
      }
    ],
    "page": 1,
    "totalCount": 1,
    "totalFiltered": 1,
    "totalPages": 1
  }
}
```

### Send messaging app message

Send a WhatsApp, Viber, LINE or other messaging app message through your subaccount's channels, falling back to SMS if 8x8 has set that up: text, a picture, video, audio or file, or an approved WhatsApp template.

**Inputs**

- To (`msisdn`, text, required): The person's phone number, in international format such as +6591234567.
- Message type (`type`, text): What to send. Defaults to text. One of: `text`, `image`, `video`, `audio`, `file`, `template` (WhatsApp template).
- Message (`text`, text): The message, for a text message, or a caption for media.
- Media link (`url`, text): A public link to the picture, video, audio or file to send.
- Template name (`template_name`, text): The approved WhatsApp template's name, for a template message.
- Template language (`template_language`, text): The template's language code, such as en_US.
- Template values (`template_parameters`, list): The values for the template's placeholders, in order: the first fills {{1}}, the next {{2}}.
- SMS fallback text (`fallback_text`, text): The text to send if 8x8 falls back to SMS. Leave empty to send the message text.
- Send at (`scheduled`, date and time): When to send it. Leave empty to send it now.
- Give up after (`expiry`, date and time): Don't send it after this time, if it hasn't gone out by then.
- Your reference (`client_message_id`, text): Your own reference for the message, sent back with its delivery updates.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "clientMessageId": "example",
    "status": {
      "detail": "example",
      "errorCode": 1,
      "errorMessage": "example",
      "state": "example",
      "timestamp": "example"
    },
    "umid": "example",
    "user": {
      "channelUserId": "example",
      "msisdn": "example"
    }
  }
}
```

### Send SMS

Send a text message to one phone number, now or at a time you choose. To US and Canadian numbers it can carry pictures (MMS).

**Inputs**

- To (`destination`, text, required): The phone number to text, in international format such as +6591234567.
- Message (`text`, text, required): The message.
- From (`source`, text): Who it's from: your sender ID or one of your 8x8 numbers. Leave empty for your subaccount's default.
- Country (`country`, text): The phone number's country, needed only when it isn't in international format (with + and the country code). One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.
- Encoding (`encoding`, text): The character set. Leave empty to have 8x8 work it out from the text. One of: `AUTO` (Work it out from the text), `GSM7` (GSM-7 (plain Latin letters)), `UCS2` (UCS-2 (any language and emoji)).
- Send at (`scheduled`, date and time): When to send it. Leave empty to send it now.
- Give up after (`expiry`, date and time): Don't send it after this time, if it hasn't gone out by then.
- Media links (`media_urls`, list): Links (https) to pictures or other media to send as an MMS, up to 10. US and Canadian numbers only.
- Your reference (`client_message_id`, text): Your own reference for the message, sent back with its delivery updates.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "clientMessageId": "example",
    "destination": "example",
    "encoding": "example",
    "status": {
      "code": "example",
      "description": "example"
    },
    "umid": "example"
  }
}
```

### Send SMS to many numbers

Send the same text message to up to 10,000 phone numbers at once, now or at a time you choose.

**Inputs**

- To (`destinations`, list, required): The phone numbers to text, in international format.
- Message (`text`, text, required): The message.
- From (`source`, text): Who it's from: your sender ID or one of your 8x8 numbers. Leave empty for your subaccount's default.
- Encoding (`encoding`, text): The character set. Leave empty to have 8x8 work it out from the text. One of: `AUTO` (Work it out from the text), `GSM7` (GSM-7 (plain Latin letters)), `UCS2` (UCS-2 (any language and emoji)).
- Send at (`scheduled`, date and time): When to send it. Leave empty to send it now.
- Give up after (`expiry`, date and time): Don't send it after this time, if it hasn't gone out by then.
- Your reference (`client_batch_id`, text): Your own reference for the batch, up to 20 characters.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "acceptedCount": 1,
    "batchId": "example",
    "clientBatchId": "example",
    "messages": [
      {
        "clientMessageId": "example",
        "destination": "example",
        "encoding": "example",
        "status": {
          "code": "example",
          "description": "example"
        },
        "umid": "example"
      }
    ],
    "rejectedCount": 1
  }
}
```

### Send verification code

Send someone a one-time code by SMS, voice call, WhatsApp or Viber, to check the phone number is theirs. Check what they type with 'Check verification code'.

**Inputs**

- Phone number (`destination`, text, required): The phone number to verify, in international format such as +6591234567.
- Send by (`channel`, text): How to send the code. Defaults to SMS. One of: `sms`, `call` (Voice call), `whatsapp`, `viber`.
- Brand (`brand`, text): Your name, put in the message where its text says {brand}.
- Message (`template`, text): Your own wording for an SMS or call, with {code} where the code goes, such as: Your code is {code}. Leave empty for 8x8's.
- Code length (`code_length`, number): How many characters the code has, 3 to 10. Defaults to 4. From 3 to 10.
- Code works for (seconds) (`code_validity`, number): How many seconds the code works for, 30 to 7200. Defaults to 300 (five minutes). From 30 to 7200.
- Code type (`code_type`, text): What the code is made of. Defaults to numbers. One of: `NUMERIC` (Numbers (123456)), `NUMERIC_WITH_DASH` (Numbers with a dash (123-456)), `ALPHANUMERIC` (Letters and numbers (a1B2c3)), `ALPHANUMERIC_CAPITALS` (Capital letters and numbers (A1B2C3)), `ALPHANUMERIC_EASY` (Easy to read letters and numbers).
- Call language (`language`, text): For a voice call with your own wording: the language to read it in, such as en-US.
- WhatsApp template (`whatsapp_template`, text): For WhatsApp: the name of your approved WhatsApp authentication template.
- Country (`country`, text): The phone number's country, needed only when it isn't in international format (with + and the country code). One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "attempt": 1,
    "destination": "example",
    "expiresAt": "example",
    "retryAfter": "example",
    "sessionId": "example",
    "status": "example",
    "verifyUri": "example"
  }
}
```

### Update contact

Change a contact's name, phone number, email, external ID or country. Fields left empty stay as they are.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's id, from 'Create contact' or 'Search contacts'.
- First name (`first_name`, text): The contact's first name.
- Last name (`last_name`, text): The contact's last name.
- Phone number (`msisdn`, text): The contact's mobile number, in international format such as +6591234567.
- Email (`email`, text): The contact's email address.
- External ID (`external_id`, text): Your own id for the contact, such as its id in your CRM.
- Country (`country`, text): The contact's country. One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "addresses": {
      "email": "example",
      "facebookUserId": "example",
      "kakaoTalkId": "example",
      "lineId": "example",
      "msisdn": "example",
      "weChatUserId": "example",
      "zaloId": "example"
    },
    "country": "example",
    "createdAt": "example",
    "customAttributes": {},
    "externalId": "example",
    "firstName": "example",
    "groups": [
      {
        "contacts": 1,
        "createdAt": "example",
        "description": "example",
        "id": 1,
        "isBlacklist": true,
        "name": "example"
      }
    ],
    "id": 1,
    "lastName": "example"
  }
}
```

### Update contact group

Rename a contact group, change its description, or make it a blacklist or a normal group.

**Inputs**

- Group (`group_id`, number, required): The contact group.
- Name (`name`, text): The group's new name.
- Description (`description`, text): The group's new description.
- Group type (`group_type`, text): Make it a blacklist (people who must not be messaged) or a normal group. Leave empty to keep it as it is. One of: `blacklist`, `normal` (Normal group).

**Outputs**

- `data` (object): The response from 8x8.

**Example output**

```json
{
  "data": {
    "contacts": 1,
    "createdAt": "example",
    "description": "example",
    "id": 1,
    "isBlacklist": true,
    "name": "example"
  }
}
```
