Authentication
Every request requires your API key in theAuthorization header:
What’s Available
Data Endpoints (All Plans)
Core data — your conversations, users, organizations, and configuration. Available on every plan, including Free.Messages & Interactions
Messages & Interactions
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/messages | Log conversation messages |
GET | /v1/interactions | List conversations |
GET | /v1/interactions/{id} | Get conversation detail |
Users
Users
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/users | List users |
POST | /v1/users | Create or upsert a user |
PUT | /v1/users/{userId} | Update a user |
GET | /v1/users/{userId}/segments | Get user segment memberships |
Organizations
Organizations
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/organizations | List organizations |
POST | /v1/organizations | Create an organization |
PUT | /v1/organizations/{id} | Update an organization |
Products
Products
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/products | List products |
GET | /v1/products/{productId} | Get product detail |
Prompts
Prompts
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/prompts | List prompts |
POST | /v1/prompts | Create a prompt |
GET | /v1/prompts/{id} | Get prompt detail |
PUT | /v1/prompts/{id} | Update a prompt |
DELETE | /v1/prompts/{id} | Delete a prompt |
Models, Segments & More
Models, Segments & More
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/models | List models |
GET | /v1/models/{modelId} | Get model detail |
GET | /v1/segments | List segments |
POST | /v1/segments | Create a custom segment |
GET | /v1/segments/{segmentId} | Get segment detail |
GET | /v1/inbox | List inbox items |
GET | /v1/inbox/{conversationId} | Get inbox item detail |
POST | /v1/ratings | Log a user rating |
POST | /v1/events | Create a business event |
Analytics Endpoints (Growth+)
Computed insights, AI-generated summaries, and aggregated metrics. These require a Growth or Enterprise plan.| Method | Endpoint | What you get |
|---|---|---|
GET | /v1/products/{productId}/analytics | Product-level quality, topics, keywords, sentiment |
GET | /v1/interactions/{id}/analytics | Per-conversation analysis scores |
GET | /v1/users/{userId}/analytics | User behavior patterns and quality metrics |
GET | /v1/organizations/{id}/analytics | Organization-level aggregates |
GET | /v1/segments/{segmentId}/analytics | Segment health and comparison data |
GET | /v1/models/{modelId}/analytics | Model performance and quality scores |
GET | /v1/prompts/{id}/analytics | Prompt effectiveness and optimization data |
Chat Endpoint (Growth+)
| Method | Endpoint | What you get |
|---|---|---|
POST | /v1/chat | AI-powered conversational analytics with SSE streaming |
Analysis Modes
Analytics endpoints support two modes. Pick the one that matches your use case.Simple Mode
Fast. No rate limits. Returns numeric aggregates only — averages, counts, distributions. Ideal for dashboards, polling, and high-frequency requests.
Insights Mode
Deep. Rate limited. Full AI analysis including topic extraction, keyword analysis, and generated summaries. Default when no mode is specified.
Chat Endpoint
The chat endpoint is the same Greenflash AI assistant available in-app and via Slack — now accessible through the API. It streams responses using Server-Sent Events (SSE).| Event | Description |
|---|---|
tool_call | The agent is calling an internal tool (e.g., getProductAnalytics) |
tool_result | Tool call completed |
text_delta | Partial response text — concatenate these into the final answer |
done | Stream complete. Contains conversationId for follow-up turns |
error | Something went wrong. Contains error and code |
conversationId from the done event and pass it back in subsequent requests along with a messages array to maintain context.
Example: End-to-End Setup
Here’s the full loop — create a user, log a conversation, then retrieve analytics.1. Identify a user
2. Log a conversation
3. Retrieve analytics
4. Ask the AI agent
Pagination
All list endpoints use Link header pagination (RFC 8288).- Response body: a flat JSON array of items
- Pagination info: returned in the
LinkHTTP header - No
rel="next"link means you’re on the last page
Rate Limits
Insights mode analytics are rate limited on a rolling hourly window:| Plan | Analytics (insights mode) | Chat |
|---|---|---|
| Growth | 50 / hour | 20 / hour |
| Enterprise | Custom | Custom |
White Labeling
Embed Greenflash analytics directly in your product under your own brand. Deliver user- or organization-specific insights powered by Greenflash, with full control over branding and domain.- Brand control — Remove all Greenflash branding for a fully native experience
- Tenant isolation — Per-customer domains and isolated analytics environments
- Dual modes — Use
simplefor real-time dashboards,insightsfor deep analysis
Error Handling
| Status | Meaning | What to do |
|---|---|---|
401 | Invalid or missing API key | Check your key at Developer Settings |
403 | Plan doesn’t include this feature | Upgrade your plan |
404 | Resource not found | Verify the ID and try again |
429 | Rate limit exceeded | Wait and retry, or switch to mode=simple |
Next Steps
API Reference
Full endpoint documentation with request/response schemas.
SDK Quickstart
Get your first insight in under 5 minutes.
Claude Code Skill
Use Greenflash directly from your coding agent.
Business Events
Link conversations to real business outcomes.

