Create your account
First things first: Once you’ve signed up and created an organization, you’ll land on your dashboard. That’s home base.Add your first Product
In Greenflash, Products are how you organize everything. Think of them as containers for the AI features you want to track—whether that’s a chatbot, an AI agent, an embedded copilot, or an internal tool. To create one:- Click
Create Producton your dashboard (or find it in theProductspage in the sidebar) - Fill in the details and add any collaborators
- Hit
Create
Already been invited to an existing organization? Ask the owner to add you to the Product you’ll be working with.
Keep dev and prod separate
We recommend creating separate Products for development and production. This way you can test your integration freely without muddying your real data.Integrate Greenflash
API keys
Greenflash uses API keys for authentication. You’ll pass yours in theAuthorization header as a Bearer token.
Head to the API Keys page in the sidebar to create one. Once you have it, add it to your environment:
Our SDKs look for this exact name by default. If you’d rather use a different name, no problem—just pass the key explicitly when initializing.
Installing the SDK
We have SDKs for Python and backend JavaScript/TypeScript (Node.js, Bun, Deno—take your pick).install_typescript.sh
install_python.sh
Initializing the SDK
Here’s how to get the client ready. If you’ve setGREENFLASH_API_KEY in your environment, the SDKs will pick it up automatically.
install_aiohttp.sh
Using the API directly
Prefer raw HTTP? All the same functionality is available athttps://www.greenflash.ai/api/v1. The SDKs are just wrappers around these endpoints.
Sending data to Greenflash
Now for the fun part—actually sending data. Here’s what you can log:- Messages and conversations between users and your AI
- User profiles so you can track individuals over time
- Organizations to group users together
- Ratings when users give feedback
- Business events to tie conversations to real outcomes
Messages and conversations
This is the core of Greenflash. The/messages endpoint lets you log what your users and AI are saying to each other.
You can send messages one at a time as they happen, or batch up a whole conversation in a single request. Whatever fits your architecture.
Conversation identifiers: Use
externalConversationId with your own IDs (recommended for most integrations). Greenflash returns a conversationId in the response—you can use either for subsequent requests. Always include productId when starting a new conversation.Simple chat messages
For straightforward chat apps, just use therole field to mark who said what: user, assistant, or system.
About billing: Message
content counts toward your token limit at the full rate. System prompts and template variables count at 50%. All other data (tool calls, agentic messages, etc.) does not count.Agentic workflows
Building something more sophisticated? AI agents with tool use, chain-of-thought reasoning, or complex message threading? ThemessageType field gives you fine-grained control.
- Message Types: Different
messageTypevalues let you distinguish thoughts, tool calls, observations, and final responses - Tool Integration: Track what tools your agent called with
toolName,input, andoutput - Message Threading: Use
parentExternalMessageIdto show how messages relate to each other - Context Tracking: Add extra context about where data came from or when things happened
- External IDs: Your own identifiers for referencing specific messages later
Automatic message de-duplication
If you includeexternalMessageId on your messages, Greenflash automatically de-duplicates them within a conversation. This means you can safely resend a batch of messages with new messages appended to the end — previously ingested messages will be skipped and only new ones will be inserted and analyzed.
This is useful when you’re sending an entire conversation history on each request rather than just the latest turn. Each message in the response includes a status field ("created" or "deduplicated") so you know exactly what happened.
Messages without
externalMessageId are always inserted — de-duplication only applies when an external ID is provided.Identifying users
When someone logs into your product, call the/users endpoint with a stable identifier. This lets Greenflash connect all their conversations over time.
Privacy-conscious? Hash the user ID before sending it. What matters is consistency—the same user should always have the same ID.
externalUserId is required, but the more you send (name, email, etc.), the easier it’ll be to find specific users in the dashboard.
You can also link users to organizations by passing externalOrganizationId. If that org doesn’t exist yet, we’ll create it automatically.
Identifying organizations
Want to group users by company or team? The/organizations endpoint has you covered.
You can also create organizations implicitly by passing
externalOrganizationId when creating users. If the org doesn’t exist, it gets created automatically.externalOrganizationId is required. Throw anything else you want into properties.
Ratings
When users give feedback—thumbs up, star ratings, whatever you’re collecting—send it to the/ratings endpoint. You can rate a specific message or an entire conversation.
Business events
This is where things get interesting. The/events endpoint lets you tie conversations to real business outcomes—purchases, signups, feature adoption, whatever matters to you.
Did a user convert after chatting with your AI? Log it. Now you can actually measure ROI.

