# Braze

> Connect Braze to automate customer profiles and messaging.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/braze

## Actions

### Create user aliases

Add new user aliases, each a name and label, to existing users or as new alias-only users.

**Inputs**

- User aliases (`user_aliases`, list, required): User aliases for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Delete users

Permanently delete users by external ID or Braze ID, with their profile data. Deleted users cannot be restored.

**Inputs**

- External ids (`external_ids`, list): External ids for this request.
- Braze ids (`braze_ids`, list): Braze ids for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Export users by identifier

Get the full profiles of users by external ID or Braze ID, including their attributes, events, purchases and devices.

**Inputs**

- External ids (`external_ids`, list): External ids for this request.
- Braze ids (`braze_ids`, list): Braze ids for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get campaign details

Get one campaign by its ID, with its name, channels, schedule, messages and whether it is enabled or archived.

**Inputs**

- Campaign (`campaign_id`, text, required): Campaign id for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get Canvas details

Get one Canvas by its ID, with its name, steps, variants, schedule and whether it is enabled or archived.

**Inputs**

- Canvas (`canvas_id`, text, required): Canvas id for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get email template

Get one email template by its ID, with its name, subject, body and tags.

**Inputs**

- Email template id (`email_template_id`, text, required): Email template id for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get segment details

Get one segment by its ID, with its name, description, filter text and tags.

**Inputs**

- Segment (`segment_id`, text, required): Segment id for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get subscription group status

Get whether a user, identified by external ID, email or phone number, is subscribed to a subscription group.

**Inputs**

- Subscription group id (`subscription_group_id`, text, required): Subscription group id for this request.
- External id (`external_id`, text): External id for this request.
- Email (`email`, text): Email for this request.
- Phone (`phone`, text): Phone for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Identify users

Merge alias-only users into users with an external ID, so their history moves to the identified profile.

**Inputs**

- Aliases to identify (`aliases_to_identify`, list, required): Aliases to identify for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List campaigns

List your Braze campaigns, a page at a time, optionally including archived ones. Returns each campaign's ID, name, tags and last edited time.

**Inputs**

- Page (`page`, number): Page for this request. At least 0.
- Include archived (`include_archived`, true/false): Include archived for this request.
- Sort direction (`sort_direction`, text): Sort direction for this request. One of: `asc`, `desc`.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List Canvases

List your Braze Canvases, a page at a time, optionally including archived ones. Returns each Canvas's ID, name, tags and last edited time.

**Inputs**

- Page (`page`, number): Page for this request. At least 0.
- Include archived (`include_archived`, true/false): Include archived for this request.
- Sort direction (`sort_direction`, text): Sort direction for this request. One of: `asc`, `desc`.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List email templates

List your email templates, optionally limited to those modified in a date range, with each template's ID, name and last update.

**Inputs**

- Limit (`limit`, number): Limit for this request. From 1 to 1000.
- Offset (`offset`, number): Offset for this request. At least 0.
- Modified after (`modified_after`, date and time): Only templates modified modified after.
- Modified before (`modified_before`, date and time): Only templates modified modified before.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List segments

List your Braze segments, a page at a time, with each segment's ID, name, analytics tracking setting and tags.

**Inputs**

- Page (`page`, number): Page for this request. At least 0.
- Sort direction (`sort_direction`, text): Sort direction for this request. One of: `asc`, `desc`.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List user subscription groups

Get the subscription groups of a user identified by external ID, email or phone.

**Inputs**

- External id (`external_id`, text): External id for this request.
- Email (`email`, text): Email for this request.
- Phone (`phone`, text): Phone for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Send API triggered campaign

Send an API-triggered campaign by its ID to the recipients you list or to its whole segment, optionally with properties used in the message. Returns a dispatch ID.

**Inputs**

- Campaign (`campaign_id`, text, required): Campaign id for this request.
- Recipients (`recipients`, list): Recipients for this request.
- Broadcast (`broadcast`, true/false): Broadcast for this request.
- Trigger properties (`trigger_properties`, object): Trigger properties for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Send Canvas

Send an API-triggered Canvas by its ID to the recipients you list or to its whole audience, optionally with entry properties. Returns a dispatch ID.

**Inputs**

- Canvas (`canvas_id`, text, required): Canvas id for this request.
- Recipients (`recipients`, list): Recipients for this request.
- Broadcast (`broadcast`, true/false): Broadcast for this request.
- Canvas entry properties (`canvas_entry_properties`, object): Canvas entry properties for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Send messages

Send messages right away, such as an email or push, to the users you list by external ID or to everyone. Returns a dispatch ID.

**Inputs**

- External user ids (`external_user_ids`, list): External user ids for this request.
- Messages (`messages`, object, required): Messages for this request.
- Broadcast (`broadcast`, true/false): Broadcast for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Set email subscription

Set the email subscription state of an email address to opted in, subscribed or unsubscribed.

**Inputs**

- Email (`email`, text, required): Email for this request.
- Subscription state (`subscription_state`, text, required): Subscription state for this request. One of: `opted_in`, `subscribed`, `unsubscribed`.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Set subscription group status

Subscribe or unsubscribe a user from a subscription group, identified by external ID, email or phone number.

**Inputs**

- Subscription group id (`subscription_group_id`, text, required): Subscription group id for this request.
- Subscription state (`subscription_state`, text, required): Subscription state for this request. One of: `subscribed`, `unsubscribed`.
- External id (`external_id`, list): External id for this request.
- Email (`email`, list): Email for this request.
- Phone (`phone`, list): Phone for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Update users and track events

Record custom attributes, custom events and purchases for users, creating users that do not exist yet. Returns how many of each were processed.

**Inputs**

- Attributes (`attributes`, list): Attributes for this request.
- Events (`events`, list): Events for this request.
- Purchases (`purchases`, list): Purchases for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```
