Overview
The Squad API allows you to programmatically submit user feedback, support tickets, survey responses, or any text-based insights directly into your Squad workspace. This enables you to capture feedback from custom sources and integrate Squad’s analysis into your existing workflows.Use cases: Custom feedback forms, internal tools, mobile apps, chatbots, support systems, or any application where users provide feedback.
Benefits
Real-time feedback ingestion: Push feedback to Squad as it happens, ensuring your product insights are always up-to-date. Source attribution: Tag feedback with custom source identifiers to track which channels generate the most valuable insights. Automated discovery: Squad’s AI automatically analyzes submitted feedback, clusters themes, and surfaces actionable opportunities without manual review.Two approaches
Node.js Client Library
Pre-built TypeScript/Node.js package with type safety and error handling
Direct API Integration
Build your own client in any language using our REST API
Prerequisites
1
Get your API key
- Navigate to Workspace dropdown → Settings in Squad
- Find the API Access section
- Click Generate API Key or copy your existing key
API keys are workspace-scoped. Each workspace has its own unique key.
2
Choose your integration approach
- Node.js/TypeScript projects: Use the npm package for fastest setup
- Other languages: Use the REST API directly
Using the npm package
The official@squadai/feedback-client package provides a simple, type-safe way to submit feedback from Node.js applications.
Installation
Quick start
1
Set your API key
Add your Squad API key to your environment variables:
.env
The package automatically reads from
process.env.SQUAD_API_KEY for security. Never hardcode API keys in your source code.2
Submit feedback
Common patterns
- Web application
- Chat integration
- Mobile backend
Source naming
Thesource parameter helps you track which channels generate feedback. It must follow strict formatting:
Using the REST API
For non-Node.js projects or custom implementations, use Squad’s REST API directly. You can access the complete openAPI spec here: OpenAPI SpecAuthentication
All API requests require an API key in the Authorization header:Endpoints
- Basic submission
- With source
POST
/v1/data-ingressSubmit feedback without source attribution.cURL
Python
JavaScript (fetch)
Go
Response format
Success (201 Created):| Status | Meaning | Common causes |
|---|---|---|
| 400 | Bad Request | Empty feedback, invalid format |
| 401 | Unauthorized | Missing or invalid API key |
| 500 | Server Error | Temporary issue, retry with backoff |
Check authentication
Use thewhoami endpoint to verify your API key:
cURL
Response
Best practices
Add context
Include metadata like user ID, platform, or app version in the feedback text
Use sources consistently
Standardize source names across your org (e.g., always use
MOBILE_APP not variations)Handle errors gracefully
Implement retry logic with exponential backoff for transient failures
Formatting feedback
Structure feedback for better analysis:Troubleshooting
Feedback not appearing in Squad- Verify API key is correct and workspace-scoped
- Check that feedback text is non-empty
- Ensure API response was 201 (not 400 or 500)
- Give Squad 30-60 seconds to process and cluster new insights
- Confirm API key is set in environment variables (for npm package)
- Verify API key hasn’t been regenerated or revoked
- Check you’re using the correct workspace’s key
- Test with the
/whoamiendpoint to validate authentication
- Source must be UPPERCASE_WITH_UNDERSCORES only
- No numbers, hyphens, or spaces allowed
- Defaults to
UNKNOWNif not specified
- Default timeout is 10 seconds
- Increase timeout for slower connections:
{ timeout: 30000 } - Check your network connectivity
- Try with a smaller batch size
What’s next?
View your insights
See how Squad analyzes and clusters your API-submitted feedback
Integrations
Connect additional data sources for richer insights
Chat with data
Ask Squad questions about your API-submitted feedback
Build strategy
Turn feedback into opportunities and solutions
Need help? Contact support@meetsquad.ai or check our API documentation for more details.