# Sendlane

> Manage Sendlane lists, contacts, tags and custom fields, read campaigns and their reports, send custom events to start automations, and follow new contacts, unsubscribes, tags and sent campaigns.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/sendlane

## Actions

### Add contact to list

Add a contact to a list by email address or phone number, creating the contact if it's new. Sendlane adds it in the background.

**Inputs**

- List (`list_id`, number, required): The list. At least 1.
- Email (`email`, text): The contact's email address.
- First name (`first_name`, text): The contact's first name.
- Last name (`last_name`, text): The contact's last name.
- Phone (`phone`, text): The contact's phone number with country code, such as +15555555555.
- Email consent (`email_consent`, true/false): The contact agreed to receive marketing email.
- Tags (`tag_ids`, list): Tags to give the contact.
- Custom fields (`custom_fields`, object): Custom field values, by custom field ID (from List custom fields), such as {"12": "Gold"}.

**Outputs**

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

**Example output**

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

### Add tags to contact

Give a contact one or more tags.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's ID, which Find contact returns. At least 1.
- Tags (`tag_ids`, list, required): The tags to add.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "id": 1,
        "name": "example"
      }
    ]
  }
}
```

### Create custom field

Create a custom field. Sendlane can't delete custom fields, so choose the name with care.

**Inputs**

- Name (`name`, text, required): The custom field's name.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "id": "example",
        "name": "example",
        "type": "example"
      }
    ]
  }
}
```

### Create list

Create a list.

**Inputs**

- Name (`name`, text, required): The list's name.
- Description (`description`, text): What the list is for.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "created": "example",
      "description": "example",
      "flagged": "example",
      "id": 1,
      "name": "example",
      "status": "example"
    }
  }
}
```

### Create tag

Create a tag.

**Inputs**

- Name (`name`, text, required): The tag's name.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "audience_count": 1,
      "created_at": "example",
      "id": 1,
      "name": "example"
    }
  }
}
```

### Delete contact

Delete a contact from the account.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's ID, which Find contact returns. At least 1.

**Outputs**

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

**Example output**

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

### Delete list

Delete a list.

**Inputs**

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

**Outputs**

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

**Example output**

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

### Delete tag

Delete a tag, and take it off every contact.

**Inputs**

- Tag (`tag_id`, number, required): The tag. At least 1.

**Outputs**

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

**Example output**

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

### Find contact

Find a contact by email address or phone number.

**Inputs**

- Email (`email`, text): The contact's email address.
- Phone (`phone`, text): Or the contact's phone number.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "custom_fields": [
      {
        "id": "example",
        "name": "example",
        "type": "example"
      }
    ],
    "email": "example",
    "first_name": "example",
    "id": 1,
    "last_name": "example",
    "lifetime_value": 1,
    "lists": [
      {
        "id": 1,
        "name": "example"
      }
    ],
    "phone": "example",
    "subscribed": true,
    "suppressed": true,
    "tags": [
      {
        "id": 1,
        "name": "example"
      }
    ]
  }
}
```

### Get campaign

Get a campaign's status and send time.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "automation": {
        "action_order": 1,
        "id": 1,
        "name": "example"
      },
      "created_at": "example",
      "id": 1,
      "name": "example",
      "scheduled_at": "example",
      "sent_at": "example",
      "status": "example",
      "updated_at": "example"
    }
  }
}
```

### Get campaign report

Get a campaign's sends, opens, clicks, bounces, unsubscribes, spam reports and revenue.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- From (`since`, date and time): Only activity from this time on.
- To (`until`, date and time): Only activity up to this time. Needs From.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "bounced": 1,
      "campaign_id": 1,
      "clicks": 1,
      "opens": 1,
      "revenue": 1,
      "sent": 1,
      "spam": 1,
      "suppressed": 1,
      "unique_clicks": 1,
      "unique_opens": 1,
      "unsubscribed": 1
    }
  }
}
```

### Get contact

Get a contact with their lists, tags and custom fields.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's ID, which Find contact returns. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "custom_fields": [
        {
          "id": "example",
          "name": "example",
          "type": "example"
        }
      ],
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "lifetime_value": 1,
      "lists": [
        {
          "id": 1,
          "name": "example"
        }
      ],
      "phone": "example",
      "subscribed": true,
      "suppressed": true,
      "tags": [
        {
          "id": 1,
          "name": "example"
        }
      ]
    }
  }
}
```

### Get list

Get a list's name, description and status.

**Inputs**

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

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "created": "example",
      "description": "example",
      "flagged": "example",
      "id": 1,
      "name": "example",
      "status": "example"
    }
  }
}
```

### List campaigns

List email campaigns with their status and send time.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "automation": {
          "action_order": 1,
          "id": 1,
          "name": "example"
        },
        "created_at": "example",
        "id": 1,
        "name": "example",
        "scheduled_at": "example",
        "sent_at": "example",
        "status": "example",
        "updated_at": "example"
      }
    ],
    "links": {
      "first": "example",
      "last": "example",
      "next": "example",
      "prev": "example"
    },
    "meta": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 1,
      "total": 1
    }
  }
}
```

### List contacts

List the account's contacts, optionally only those from a time range.

**Inputs**

- From (`since`, date and time): Only contacts from this time on.
- To (`until`, date and time): Only contacts up to this time. Needs From.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "custom_fields": [
          {
            "id": "example",
            "name": "example",
            "type": "example"
          }
        ],
        "email": "example",
        "first_name": "example",
        "id": 1,
        "last_name": "example",
        "lifetime_value": 1,
        "lists": [
          {
            "id": 1,
            "name": "example"
          }
        ],
        "phone": "example",
        "subscribed": true,
        "suppressed": true,
        "tags": [
          {
            "id": 1,
            "name": "example"
          }
        ]
      }
    ],
    "links": {
      "first": "example",
      "last": "example",
      "next": "example",
      "prev": "example"
    },
    "meta": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 1,
      "total": 1
    }
  }
}
```

### List contacts in list

List the contacts in a list, optionally only those added in a time range.

**Inputs**

- List (`list_id`, number, required): The list. At least 1.
- From (`since`, date and time): Only contacts from this time on.
- To (`until`, date and time): Only contacts up to this time. Needs From.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "custom_fields": [
          {
            "id": "example",
            "name": "example",
            "type": "example"
          }
        ],
        "email": "example",
        "first_name": "example",
        "id": 1,
        "last_name": "example",
        "lifetime_value": 1,
        "lists": [
          {
            "id": 1,
            "name": "example"
          }
        ],
        "phone": "example",
        "subscribed": true,
        "suppressed": true,
        "tags": [
          {
            "id": 1,
            "name": "example"
          }
        ]
      }
    ],
    "links": {
      "first": "example",
      "last": "example",
      "next": "example",
      "prev": "example"
    },
    "meta": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 1,
      "total": 1
    }
  }
}
```

### List custom fields

List the account's custom fields with their IDs, for setting them on contacts.

**Inputs**

- Records to return (`limit`, number): How many to return. Leave empty for Sendlane's default. At least 1.
- Page (`page`, number): The page to read. Leave empty for the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "id": "example",
        "name": "example",
        "type": "example"
      }
    ],
    "links": {
      "first": "example",
      "last": "example",
      "next": "example",
      "prev": "example"
    },
    "meta": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 1,
      "total": 1
    }
  }
}
```

### List lists

List the account's lists.

**Inputs**

- Records to return (`limit`, number): How many to return. Leave empty for Sendlane's default. At least 1.
- Page (`page`, number): The page to read. Leave empty for the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "created": "example",
        "description": "example",
        "flagged": "example",
        "id": 1,
        "name": "example",
        "status": "example"
      }
    ],
    "links": {
      "first": "example",
      "last": "example",
      "next": "example",
      "prev": "example"
    },
    "meta": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 1,
      "total": 1
    }
  }
}
```

### List tags

List the account's tags with how many contacts have each.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "audience_count": 1,
        "created_at": "example",
        "id": 1,
        "name": "example"
      }
    ],
    "links": {
      "first": "example",
      "last": "example",
      "next": "example",
      "prev": "example"
    },
    "meta": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 1,
      "total": 1
    }
  }
}
```

### Remove contact from list

Take a contact out of a list. The contact stays in the account.

**Inputs**

- List (`list_id`, number, required): The list. At least 1.
- Contact ID (`contact_id`, number, required): The contact's ID, which Find contact returns. At least 1.

**Outputs**

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

**Example output**

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

### Remove tag from contact

Take a tag off a contact.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's ID, which Find contact returns. At least 1.
- Tag (`tag_id`, number, required): The tag. At least 1.

**Outputs**

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

**Example output**

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

### Send custom event

Send a custom event for a contact, to start automations set up for it. Needs the custom integration token in the connected account.

**Inputs**

- Custom event (`event`, text, required): The custom event's name, as set up in the custom integration.
- Email (`email`, text): The contact's email address.
- Phone (`phone`, text): Or the contact's phone number.
- Event data (`data`, object): Details for the automation's emails and texts, by name.

**Outputs**

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

**Example output**

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

### Set contact custom fields

Set custom field values on a contact.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's ID, which Find contact returns. At least 1.
- Custom field values (`field_values`, object, required): The values, by custom field ID (from List custom fields), such as {"12": "Gold"}.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "custom_field_id": 1,
        "id": 1,
        "name": "example",
        "value": "example"
      }
    ]
  }
}
```

### Unsubscribe contact

Unsubscribe a contact from all email.

**Inputs**

- Contact ID (`contact_id`, number, required): The contact's ID, which Find contact returns. At least 1.

**Outputs**

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

**Example output**

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

### Update list

Rename a list or change its description.

**Inputs**

- List (`list_id`, number, required): The list. At least 1.
- Name (`name`, text, required): The list's name.
- Description (`description`, text): What the list is for.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "created": "example",
      "description": "example",
      "flagged": "example",
      "id": 1,
      "name": "example",
      "status": "example"
    }
  }
}
```
