# Textmagic

> Send and schedule texts, manage contacts and lists, and watch for incoming replies.

App · 18 actions. Web page: https://docs.lodol.com/docs/integrations/textmagic

## Actions

### Create a contact

Add a recipient to your Textmagic contacts.

**Inputs**

- Phone (`phone`, text, required): The international phone number without the plus sign.
- First name (`first_name`, text): The given name.
- Last name (`last_name`, text): The family name.
- Email (`email`, text): The email address.
- Company (`company`, text): The company name.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "href": "example",
    "id": 1
  }
}
```

### Create a contact list

Make a named list for grouping contacts.

**Inputs**

- Name (`name`, text, required): The list name.
- Shared (`shared`, true/false): Share the list with subaccounts.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "href": "example",
    "id": 1
  }
}
```

### Create a message template

Save reusable message text.

**Inputs**

- Name (`name`, text, required): The template name.
- Content (`content`, text, required): The SMS template text.
- Email content (`email_content`, text): The email version of the template.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "href": "example",
    "id": 1
  }
}
```

### Delete a contact

Remove a contact from your Textmagic account.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact id. At least 1.

**Outputs**

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

**Example output**

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

### Delete a contact list

Remove a contact list.

**Inputs**

- List (`list_id`, number, required): The list id. At least 1.

**Outputs**

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

**Example output**

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

### Delete a message template

Remove a saved template.

**Inputs**

- Template (`template_id`, number, required): The template id. At least 1.

**Outputs**

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

**Example output**

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

### Get a contact

Read the details of a Textmagic contact.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact id. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "companyName": "example",
    "email": "example",
    "firstName": "example",
    "id": 1,
    "lastName": "example",
    "phone": "example"
  }
}
```

### Get a list

Read the details of a Textmagic list.

**Inputs**

- List (`list_id`, number, required): The list id. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": 1,
    "membersCount": 1,
    "name": "example",
    "shared": true
  }
}
```

### Get a message

Read the details of a Textmagic message.

**Inputs**

- Message ID (`message_id`, number, required): The message id. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": 1,
    "messageTime": "example",
    "receiver": "example",
    "sender": "example",
    "status": "example",
    "text": "example"
  }
}
```

### Get a reply

Read the details of a Textmagic reply.

**Inputs**

- Reply ID (`reply_id`, number, required): The reply id. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": 1,
    "messageTime": "example",
    "receiver": "example",
    "sender": "example",
    "text": "example"
  }
}
```

### Get a template

Read the details of a Textmagic template.

**Inputs**

- Template (`template_id`, number, required): The template id. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "content": "example",
    "id": 1,
    "lastModified": "example",
    "name": "example"
  }
}
```

### Get my Textmagic profile

Read the account and balance associated with the connected account.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "firstName": "example",
    "id": 1,
    "lastName": "example",
    "username": "example"
  }
}
```

### List contacts

List a page of contacts on your Textmagic account.

**Inputs**

- Page (`page`, number): The page number, starting at 1. At least 1.
- Limit (`limit`, number): Maximum number of results to return. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "limit": 1,
    "page": 1,
    "pageCount": 1,
    "resources": [
      {
        "companyName": "example",
        "email": "example",
        "firstName": "example",
        "id": 1,
        "lastName": "example",
        "phone": "example"
      }
    ]
  }
}
```

### List lists

List a page of lists on your Textmagic account.

**Inputs**

- Page (`page`, number): The page number, starting at 1. At least 1.
- Limit (`limit`, number): Maximum number of results to return. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "limit": 1,
    "page": 1,
    "pageCount": 1,
    "resources": [
      {
        "id": 1,
        "membersCount": 1,
        "name": "example",
        "shared": true
      }
    ]
  }
}
```

### List messages

List a page of messages on your Textmagic account.

**Inputs**

- Page (`page`, number): The page number, starting at 1. At least 1.
- Limit (`limit`, number): Maximum number of results to return. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "limit": 1,
    "page": 1,
    "pageCount": 1,
    "resources": [
      {
        "id": 1,
        "messageTime": "example",
        "receiver": "example",
        "sender": "example",
        "status": "example",
        "text": "example"
      }
    ]
  }
}
```

### List replies

List a page of replies on your Textmagic account.

**Inputs**

- Page (`page`, number): The page number, starting at 1. At least 1.
- Limit (`limit`, number): Maximum number of results to return. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "limit": 1,
    "page": 1,
    "pageCount": 1,
    "resources": [
      {
        "id": 1,
        "messageTime": "example",
        "receiver": "example",
        "sender": "example",
        "text": "example"
      }
    ]
  }
}
```

### List templates

List a page of templates on your Textmagic account.

**Inputs**

- Page (`page`, number): The page number, starting at 1. At least 1.
- Limit (`limit`, number): Maximum number of results to return. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "limit": 1,
    "page": 1,
    "pageCount": 1,
    "resources": [
      {
        "content": "example",
        "id": 1,
        "lastModified": "example",
        "name": "example"
      }
    ]
  }
}
```

### Send or schedule a text

Send a text to one or more phone numbers. Choose a date and time to schedule it.

**Inputs**

- Phones (`phones`, list, required): Recipient numbers in international format.
- Text (`text`, text, required): The text message to send.
- Sender (`sender`, text): A sending number or sender ID on your account.
- Send at (`send_at`, date and time): Choose when to send. Times are converted to UTC.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "bulkId": 1,
    "id": 1,
    "messageId": 1,
    "sessionId": 1
  }
}
```
