Skip to content
Splashify Pro
Docs

Maya

The maya command lets you chat with Maya, Splashify's in-app AI assistant, from the terminal. Behind the scenes it hits the same backend the right-rail widget in the app uses, so tool calls, account context, and rate limits are identical.

Quick start

bash
splashify maya chat "How do I create a broadcast?"
splashify maya chat --history '[{"role":"user","content":"…"},{"role":"assistant","content":"…"}]' "follow-up question"
splashify maya feedback --rating up --message "…" --reply "…"
splashify maya feedback --rating down --message "…" --reply "…" --comment "off-topic"

Command reference

Chat

The message can be passed positionally or via --message:

bash
# Positional (most natural)
splashify maya chat "How do I create a broadcast for the VIP segment?"

# Via flag (handy when the message contains shell-tricky characters)
splashify maya chat --message "How do I create a broadcast for the VIP segment?"

The response is a JSON object with reply (Maya's answer), source, and model. Tool calls Maya makes — looking up your templates, fetching contact counts, etc. — happen server-side; the CLI just transports the request and prints the result.

There is no reply_id in the response, and no thread or conversation id. Earlier revisions of this page documented both; neither has ever existed on this endpoint.

Multi-turn conversations

The endpoint is stateless — there are no server-side threads to resume. To ask a follow-up with context, replay the previous turns with --history, which is the field the server actually reads:

bash
Q1="Set up a welcome flow"
A1=$(splashify maya chat "$Q1" | jq -r '.reply')

splashify maya chat \
  --history "$(jq -n --arg q "$Q1" --arg a "$A1" \
      '[{role:"user",content:$q},{role:"assistant",content:$a}]')" \
  "Add an opt-out branch"

Each entry needs a role of user or assistant and a content string; the CLI validates both before sending. Use --context to hand Maya extra business context for a single question without pretending it was a prior turn.

Feedback

Feedback stores the rated exchange as text — there are no reply ids to point at — so pass the question and the answer you're rating:

bash
splashify maya feedback --rating up \
  --message "How do I create a broadcast?" --reply "$A1"

splashify maya feedback --rating down \
  --message "How do I create a broadcast?" --reply "$A1" \
  --comment "linked to the wrong page"

Used for weekly prompt-tuning telemetry.

What's NOT here

The app exposes two additional Sarvam-backed endpoints under /api/ai/* (template generation, text rewrite) that proxy directly to Sarvam from the Next.js BFF — they don't go through the partnersapi backend and can't be called with an oc_live_ token. They're intentionally absent from the CLI.

  • Templates — Maya can draft templates; use the output with splashify templates create
  • Broadcasts — Maya can draft broadcast configs
  • Access Tokens — same auth surface