Use the Braze CLI from KosmoKrator to call Braze tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
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 --jsonkosmokrator integrations:doctor braze --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API keyapi_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
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.
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.
List canvases (multi-step customer journeys) from Braze. Returns canvas IDs, names, tags, and creation dates. Use pagination to browse large result sets.
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.
Get a single user profile from Braze by their external ID. Returns full profile data including attributes, custom attributes, events, purchases, and subscription groups.
List canvases (multi-step customer journeys) from Braze. Returns canvas IDs, names, tags, and creation dates. Use pagination to browse large result sets.
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.
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.
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.