API Reference
Public reference for the StreamBack SDK-facing REST API.
Base URL
https://api.streamback.tech
Authentication
SDK endpoints use environment API key authentication:
X-API-Key: env_your_api_key_here
Keep envKey private to your environment. Do not expose keys in public repositories.
SDK Endpoints
Submit Feedback
POST /v1/sdk/feedback
Submit a new feedback item.
Request Body:
{
"message": "The checkout button doesn't work on mobile",
"type": "bug",
"emotion": 2,
"triggerSource": "error",
"surveyResponse": {
"surveyId": "checkout-ease",
"questionId": "q1",
"questionType": "stars",
"answer": 4,
"followUpText": "Pretty smooth overall"
},
"snapshot": {
"url": "https://app.example.com/checkout",
"route": "/checkout",
"viewportWidth": 375,
"viewportHeight": 812,
"userAgent": "Mozilla/5.0..."
},
"user": {
"id": "user_123",
"email": "user@example.com"
}
}
| Field | Type | Description |
|---|---|---|
message | string | Feedback text (optional if emotion/survey provided) |
type | string | bug, suggestion, praise, question, other |
emotion | number | 1-5 emotion rating (1=Awful, 5=Great). Optional |
triggerSource | string | Trigger context: manual, error, frustration, idle, exitIntent, survey, and related types |
surveyResponse | object | Micro-survey answer data. Optional |
Response: 201 Created
{
"id": "fb_abc123",
"message": "Feedback received",
"rewardAmount": 300
}
Get Upload URL
POST /v1/sdk/upload-url
Get a presigned URL for screenshot upload.
Response:
{
"uploadUrl": "https://storage.../presigned",
"fileUrl": "https://storage.../screenshot.png",
"expiresAt": "2024-01-15T11:00:00.000Z"
}
Finalize Feedback
POST /v1/sdk/feedback/:id/finalize
Mark feedback as complete after screenshot upload.
Request:
{
"screenshotUploaded": true,
"objectKey": "screenshots/abc123.png"
}
Get Feedback Status
GET /v1/sdk/feedback/:id/status
Response:
{
"feedbackId": "fb_abc123",
"finalized": true,
"status": "new",
"creditScore": 85
}
Get Feedback Layer Config
GET /v1/sdk/config
Returns server-driven feedback layer configuration used by SDK initialization.
Response:
{
"display": { "trigger": "dot", "position": "right-center" },
"triggers": { "onError": { "enabled": true } },
"rewards": { "previewRange": { "min": 100, "max": 500 } }
}
Get User Feedback History
GET /v1/sdk/user/history
Returns feedback history for an identified end user.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
endUserId | string | End user's unique ID |
endUserEmail | string | End user's email |
Response:
{
"totalSubmissions": 12,
"totalCreditsEarned": 3500,
"currentStreak": 3,
"lastSubmissionDate": "2026-02-05T10:30:00.000Z",
"recentFeedback": [
{
"id": "fb_abc",
"type": "bug",
"status": "triaged",
"creditAwarded": 250,
"createdAt": "2026-02-05T10:30:00.000Z"
}
]
}
Get Attachment Upload URL
POST /v1/sdk/feedback/:id/attachments/presign
Get a presigned URL for attachment upload.
Request:
{
"filename": "recording.webm",
"mimeType": "video/webm",
"sizeBytes": 1048576
}
Response:
{
"uploadUrl": "https://storage.../presigned",
"objectKey": "attachments/abc123.webm"
}
Private Admin APIs
Admin/dashboard endpoints are intentionally not documented on the public docs site and may change without notice.
This includes operator controls, lifecycle operations, backup/disaster-recovery commands, and internal delivery telemetry APIs. Those interfaces are private and available only to authenticated operators.
If you need admin API access for an enterprise integration, contact support.
Error Responses
{
"error": {
"code": "ERROR_CODE",
"message": "Human readable message"
}
}
Common Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Invalid authentication |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
VALIDATION_ERROR | 400 | Invalid request |
RATE_LIMITED | 429 | Too many requests |