KosmoKrator

marketing

Braze Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Braze KosmoKrator integration.

7 functions 7 read 0 write API key auth

Lua Namespace

Agents call this integration through app.integrations.braze.*. Use lua_read_doc("integrations.braze") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Braze Integration

Tools

braze_list_campaigns

List marketing campaigns from Braze with pagination.

Parameters:

  • page (integer, optional): Page number, 0-indexed. Default: 0.
  • limit (integer, optional): Results per page, max 100. Default: 100.

braze_get_campaign

Get details for a specific campaign.

Parameters:

  • campaign_id (string, required): The campaign identifier.

braze_list_canvases

List canvases (multi-step journeys) with pagination.

Parameters:

  • page (integer, optional): Page number, 0-indexed. Default: 0.
  • limit (integer, optional): Results per page, max 100. Default: 100.

braze_get_canvas

Get details for a specific canvas.

Parameters:

  • canvas_id (string, required): The canvas identifier.

braze_list_users

Export users from Braze by segment or external IDs.

Parameters:

  • external_ids (array, optional): External user IDs to look up.
  • segment_id (string, optional): Segment ID to export users from.
  • limit (integer, optional): Max users to return, max 5000. Default: 50.

braze_get_user

Get a single user profile by external ID.

Parameters:

  • external_ids (array, required): Array with one or more external user IDs.

braze_get_current_user

Get the current authenticated Braze user profile. No parameters required.

Configuration

Requires api_key (Bearer token) and optional url (default: https://rest.iad-01.braze.com).

Raw agent markdown
# Braze Integration

## Tools

### braze_list_campaigns
List marketing campaigns from Braze with pagination.

**Parameters:**
- `page` (integer, optional): Page number, 0-indexed. Default: 0.
- `limit` (integer, optional): Results per page, max 100. Default: 100.

### braze_get_campaign
Get details for a specific campaign.

**Parameters:**
- `campaign_id` (string, required): The campaign identifier.

### braze_list_canvases
List canvases (multi-step journeys) with pagination.

**Parameters:**
- `page` (integer, optional): Page number, 0-indexed. Default: 0.
- `limit` (integer, optional): Results per page, max 100. Default: 100.

### braze_get_canvas
Get details for a specific canvas.

**Parameters:**
- `canvas_id` (string, required): The canvas identifier.

### braze_list_users
Export users from Braze by segment or external IDs.

**Parameters:**
- `external_ids` (array, optional): External user IDs to look up.
- `segment_id` (string, optional): Segment ID to export users from.
- `limit` (integer, optional): Max users to return, max 5000. Default: 50.

### braze_get_user
Get a single user profile by external ID.

**Parameters:**
- `external_ids` (array, required): Array with one or more external user IDs.

### braze_get_current_user
Get the current authenticated Braze user profile. No parameters required.

## Configuration

Requires `api_key` (Bearer token) and optional `url` (default: `https://rest.iad-01.braze.com`).

Metadata-Derived Lua Example

local result = app.integrations.braze.braze_list_campaigns({
  page = 1,
  limit = 1
})
print(result)

Functions

braze_list_campaigns

List marketing campaigns from Braze. Returns campaign IDs, names, tags, and creation dates. Use pagination to browse large numbers of campaigns.

Operation
Read read
Full name
braze.braze_list_campaigns
ParameterTypeRequiredDescription
page integer no Page number for pagination (0-indexed, default: 0).
limit integer no Number of campaigns to return per page (max 100, default: 100).

braze_get_campaign

Get detailed information about a specific Braze campaign, including targeting rules, messaging content, schedule, and analytics.

Operation
Read read
Full name
braze.braze_get_campaign
ParameterTypeRequiredDescription
campaign_id string yes The Braze campaign identifier.

braze_list_canvases

List canvases (multi-step customer journeys) from Braze. Returns canvas IDs, names, tags, and creation dates. Use pagination to browse large result sets.

Operation
Read read
Full name
braze.braze_list_canvases
ParameterTypeRequiredDescription
page integer no Page number for pagination (0-indexed, default: 0).
limit integer no Number of canvases to return per page (max 100, default: 100).

braze_get_canvas

Get detailed information about a specific Braze canvas, including steps, targeting rules, messaging channels, and analytics.

Operation
Read read
Full name
braze.braze_get_canvas
ParameterTypeRequiredDescription
canvas_id string yes The Braze canvas identifier.

braze_list_users

Export users from Braze by segment ID or external IDs. Returns user profile data including attributes and subscription state. Provide either a segment_id to get users in a segment, or external_ids to look up specific users.

Operation
Read read
Full name
braze.braze_list_users
ParameterTypeRequiredDescription
external_ids array no Array of external user IDs to export (e.g., ["user-123", "user-456"]).
segment_id string no Braze segment ID to export users from.
limit integer no Maximum number of users to return (max 5000, default: 50).

braze_get_user

Get a single user profile from Braze by their external ID. Returns full profile data including attributes, custom attributes, events, purchases, and subscription groups.

Operation
Read read
Full name
braze.braze_get_user
ParameterTypeRequiredDescription
external_ids array yes Array of one or more external user IDs to look up (e.g., ["user-123"]).

braze_get_current_user

Get the current authenticated Braze user profile. Useful for verifying credentials and identifying the connected workspace.

Operation
Read read
Full name
braze.braze_get_current_user
ParameterTypeRequiredDescription
No parameters.