# Flodesk

> Manage subscribers, segments, workflows, campaigns, custom fields, and webhook subscriptions in Flodesk.

App · 23 actions. Web page: https://docs.lodol.com/docs/integrations/flodesk

## Actions

### Add subscriber to segments

Add the subscriber to segments.

**Inputs**

- Id or email (`id_or_email`, text, required): Id or email.
- Segment ids (`segment_ids`, list, required): An array of identifiers of the segments.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "custom_fields": {},
    "email": "example",
    "first_name": "example",
    "id": "example",
    "last_name": "example",
    "optin_ip": "example",
    "optin_timestamp": "example",
    "segments": [],
    "source": "manual",
    "status": "active"
  }
}
```

### Add subscriber to workflow

Add a subscriber to workflow.

**Inputs**

- Workflow (`record_workflow_id`, text, required): Workflow id.
- Id (`id`, text): `id` is required if `email` is not present
- Email (`email`, text): `email` is required if `id` is not present

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

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

### Batch create or update subscribers

Batch create or update subscribers.

**Inputs**

- Subscribers (`subscribers`, list, required): List of subscribers to create or update. Maximum 50 items.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "failures": [],
    "successes": []
  }
}
```

### Create custom field

Create a custom field.

**Inputs**

- Label (`label`, text, required): A friendly display label of the custom field.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "key": "example",
    "label": "example"
  }
}
```

### Create or update subscriber

Create or update a subscriber.

**Inputs**

- Id (`id`, text): The subscriber's `id`. Either `email` or `id` must be included.
- Email (`email`, text): The subscriber's `email`. Either `email` or `id` must be included.
- First name (`first_name`, text): The subscriber's first name.
- Last name (`last_name`, text): The subscriber's last name.
- Custom fields (`custom_fields`, object): An object containing custom field data. E.g. ``` "favorite_color": "Lavender" ```.
- Segment ids (`segment_ids`, list): The segments this subscriber will be added to. Cap at `50`.
- Double optin (`double_optin`, true/false): Whether or not to require the subscriber to confirm subscription via email. This option is only available to set with new subscriber creation. Default to `false` if not indicated.
- Optin ip (`optin_ip`, text): IP address from which the subscriber confirmed their opt-in.
- Optin timestamp (`optin_timestamp`, date and time): The date and time the subscribers confirmed their opt-in in ISO 8601 format. E.g. `2023-01-02T15:04:05.999Z`.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "custom_fields": {},
    "email": "example",
    "first_name": "example",
    "id": "example",
    "last_name": "example",
    "optin_ip": "example",
    "optin_timestamp": "example",
    "segments": [],
    "source": "manual",
    "status": "active"
  }
}
```

### Create segment

Create a segment.

**Inputs**

- Name (`name`, text): Name.
- Color (`color`, text): The color of the segment using a hex code. `Use GET List all segment colors`. to view available colors.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "color": "example",
    "created_at": "example",
    "id": "example",
    "name": "example",
    "segment_type": "example",
    "total_active_subscribers": 1
  }
}
```

### Create webhook

Create a webhook.

**Inputs**

- Name (`name`, text, required): The webhook name.
- Post url (`post_url`, text, required): The url that the webhook will post to.
- Events (`events`, list, required): An array specifying which events are enabled for webhook notifications.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "events": [],
    "id": "example",
    "post_url": "example"
  }
}
```

### Delete webhook

Delete a webhook.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

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

### Get segment

Retrieve a segment.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "color": "example",
    "created_at": "example",
    "id": "example",
    "name": "example",
    "segment_type": "example",
    "total_active_subscribers": 1
  }
}
```

### Get subscriber

Retrieve a subscriber.

**Inputs**

- Id or email (`id_or_email`, text, required): Id or email.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "custom_fields": {},
    "email": "example",
    "first_name": "example",
    "id": "example",
    "last_name": "example",
    "optin_ip": "example",
    "optin_timestamp": "example",
    "segments": [],
    "source": "manual",
    "status": "active"
  }
}
```

### Get webhook

Retrieve a webhook.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "events": [],
    "id": "example",
    "post_url": "example"
  }
}
```

### List all custom fields

List all custom fields.

**Inputs**: None.

**Outputs**

- `data` (list): Flodesk response data.

**Example output**

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

### List campaigns

List campaigns.

**Inputs**

- Page (`page`, number): The page number. Defaults to 1.
- Per page (`per_page`, number): The number of records to be returned on each page. Defaults to 20. Maximum 100.
- Search (`search`, text): Search.
- Order by (`order_by`, text): Order by.
- Sort (`sort`, text): Sort.
- Status (`status`, text): Status. One of: `draft`, `pending`, `scheduled`, `composing`, `sending`, `done`, `failed`.
- Shared as template (`shared_as_template`, true/false): Shared as template.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

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

### List colors

List all segment colors.

**Inputs**: None.

**Outputs**

- `data` (list): Flodesk response data.

**Example output**

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

### List custom fields

List all custom fields (pagination).

**Inputs**

- Page (`page`, number): The page number. Defaults to 1.
- Per page (`per_page`, number): The number of records to be returned on each page. Defaults to 20. Maximum 100.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "page": 1,
      "per_page": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### List segments

List all segments.

**Inputs**

- Page (`page`, number): The page number. Defaults to 1.
- Per page (`per_page`, number): The number of records to be returned on each page. Defaults to 20. Maximum 100.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "page": 1,
      "per_page": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### List subscribers

List all subscribers.

**Inputs**

- Page (`page`, number): The page number. Defaults to 1.
- Per page (`per_page`, number): The number of records to be returned on each page. Defaults to 20. Maximum 100.
- Status (`status`, text): Optional. The subscriber's status. `active`: The subscriber is currently active to receive marketing emails. `unsubscribed`: The subscriber has opted out of marketing emails. `unconfirmed`: The subscriber is pending for double opt-in confirmation. `bounced`: The subscriber's address is undeliverable due to a. One of: `active`, `unsubscribed`, `unconfirmed`, `bounced`, `complained`, `cleaned`, `archived`.
- Segment id (`segment_id`, text): Optional. The segment's id. When included, returns only subscribers who were added to the given segment.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "page": 1,
      "per_page": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### List webhooks

List all webhooks.

**Inputs**

- Page (`page`, number): The page number. Defaults to 1.
- Per page (`per_page`, number): The number of records to be returned on each page. Defaults to 20. Maximum 100.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "page": 1,
      "per_page": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### List workflows

List workflows.

**Inputs**

- Statuses (`statuses`, list): filter by workflow statuses e.g. statuses=active,paused. Default is all statuses. One or more of: `active`, `paused`, `draft`.
- Page (`page`, number): Default = 1
- Per page (`per_page`, number): Default = 10

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "page": 1,
      "per_page": 1,
      "total_items": 1,
      "total_pages": 1
    }
  }
}
```

### Remove subscriber from segments

Remove the subscriber from segments.

**Inputs**

- Id or email (`id_or_email`, text, required): Id or email.
- Segment ids (`segment_ids`, list, required): An array of identifiers of the segments.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "custom_fields": {},
    "email": "example",
    "first_name": "example",
    "id": "example",
    "last_name": "example",
    "optin_ip": "example",
    "optin_timestamp": "example",
    "segments": [],
    "source": "manual",
    "status": "active"
  }
}
```

### Remove subscriber from workflow

Remove a subscriber from workflow.

**Inputs**

- Workflow (`record_workflow_id`, text, required): Workflow id.
- Id or email (`id_or_email`, text, required): Id or email.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

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

### Unsubscribe subscriber

Unsubscribe from all lists.

**Inputs**

- Id or email (`id_or_email`, text, required): Id or email.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "custom_fields": {},
    "email": "example",
    "first_name": "example",
    "id": "example",
    "last_name": "example",
    "optin_ip": "example",
    "optin_timestamp": "example",
    "segments": [],
    "source": "manual",
    "status": "active"
  }
}
```

### Update webhook

Update a webhook.

**Inputs**

- Id (`id`, text, required): Id.
- Name (`name`, text): The webhook name.
- Post url (`post_url`, text): The url that the webhook will post to.
- Events (`events`, list): An array specifying which events are enabled for webhook notifications.

**Outputs**

- `data` (object): Flodesk response data.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "events": [],
    "id": "example",
    "post_url": "example"
  }
}
```
