KosmoKrator

marketing

Braze CLI for AI Agents

Use the Braze CLI from KosmoKrator to call Braze tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write API key auth

Braze CLI Setup

Braze can be configured headlessly with `kosmokrator integrations:configure braze`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure braze --set api_key="$BRAZE_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor braze --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key BRAZE_API_KEY Secret secret yes API Key
url BRAZE_URL URL url no REST API Endpoint

Call Braze Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call braze.braze_list_campaigns '{
  "page": 1,
  "limit": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:braze braze_list_campaigns '{
  "page": 1,
  "limit": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs braze --json
kosmo integrations:docs braze.braze_list_campaigns --json
kosmo integrations:schema braze.braze_list_campaigns --json
kosmo integrations:search "Braze" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Braze.

braze.braze_list_campaigns

Read read

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

Parameters
page, limit

Generic CLI call

kosmo integrations:call braze.braze_list_campaigns '{"page":1,"limit":1}' --json

Provider shortcut

kosmo integrations:braze braze_list_campaigns '{"page":1,"limit":1}' --json

braze.braze_get_campaign

Read read

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

Parameters
campaign_id

Generic CLI call

kosmo integrations:call braze.braze_get_campaign '{"campaign_id":"example_campaign_id"}' --json

Provider shortcut

kosmo integrations:braze braze_get_campaign '{"campaign_id":"example_campaign_id"}' --json

braze.braze_list_canvases

Read read

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

Parameters
page, limit

Generic CLI call

kosmo integrations:call braze.braze_list_canvases '{"page":1,"limit":1}' --json

Provider shortcut

kosmo integrations:braze braze_list_canvases '{"page":1,"limit":1}' --json

braze.braze_get_canvas

Read read

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

Parameters
canvas_id

Generic CLI call

kosmo integrations:call braze.braze_get_canvas '{"canvas_id":"example_canvas_id"}' --json

Provider shortcut

kosmo integrations:braze braze_get_canvas '{"canvas_id":"example_canvas_id"}' --json

braze.braze_list_users

Read read

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.

Parameters
external_ids, segment_id, limit

Generic CLI call

kosmo integrations:call braze.braze_list_users '{"external_ids":"example_external_ids","segment_id":"example_segment_id","limit":1}' --json

Provider shortcut

kosmo integrations:braze braze_list_users '{"external_ids":"example_external_ids","segment_id":"example_segment_id","limit":1}' --json

braze.braze_get_user

Read read

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

Parameters
external_ids

Generic CLI call

kosmo integrations:call braze.braze_get_user '{"external_ids":"example_external_ids"}' --json

Provider shortcut

kosmo integrations:braze braze_get_user '{"external_ids":"example_external_ids"}' --json

braze.braze_get_current_user

Read read

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

Parameters
none

Generic CLI call

kosmo integrations:call braze.braze_get_current_user '{}' --json

Provider shortcut

kosmo integrations:braze braze_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

braze.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
Schema command
kosmo integrations:schema braze.braze_list_campaigns --json
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.braze_get_campaign

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

Operation
Read read
Schema command
kosmo integrations:schema braze.braze_get_campaign --json
ParameterTypeRequiredDescription
campaign_id string yes The Braze campaign identifier.

braze.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
Schema command
kosmo integrations:schema braze.braze_list_canvases --json
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.braze_get_canvas

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

Operation
Read read
Schema command
kosmo integrations:schema braze.braze_get_canvas --json
ParameterTypeRequiredDescription
canvas_id string yes The Braze canvas identifier.

braze.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
Schema command
kosmo integrations:schema braze.braze_list_users --json
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.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
Schema command
kosmo integrations:schema braze.braze_get_user --json
ParameterTypeRequiredDescription
external_ids array yes Array of one or more external user IDs to look up (e.g., ["user-123"]).

braze.braze_get_current_user

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

Operation
Read read
Schema command
kosmo integrations:schema braze.braze_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.