Skip to content
Docs /API Reference

API Reference

Public reference for the StreamBack SDK-facing REST API.

Base URL

TEXT
https://api.streamback.tech

Authentication

SDK endpoints use environment API key authentication:

HTTP
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

HTTP
POST /v1/sdk/feedback

Submit a new feedback item.

Request Body:

JSON
{
  "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"
  }
}
FieldTypeDescription
messagestringFeedback text (optional if emotion/survey provided)
typestringbug, suggestion, praise, question, other
emotionnumber1-5 emotion rating (1=Awful, 5=Great). Optional
triggerSourcestringTrigger context: manual, error, frustration, idle, exitIntent, survey, and related types
surveyResponseobjectMicro-survey answer data. Optional

Response: 201 Created

JSON
{
  "id": "fb_abc123",
  "message": "Feedback received",
  "rewardAmount": 300
}

Get Upload URL

HTTP
POST /v1/sdk/upload-url

Get a presigned URL for screenshot upload.

Response:

JSON
{
  "uploadUrl": "https://storage.../presigned",
  "fileUrl": "https://storage.../screenshot.png",
  "expiresAt": "2024-01-15T11:00:00.000Z"
}

Finalize Feedback

HTTP
POST /v1/sdk/feedback/:id/finalize

Mark feedback as complete after screenshot upload.

Request:

JSON
{
  "screenshotUploaded": true,
  "objectKey": "screenshots/abc123.png"
}

Get Feedback Status

HTTP
GET /v1/sdk/feedback/:id/status

Response:

JSON
{
  "feedbackId": "fb_abc123",
  "finalized": true,
  "status": "new",
  "creditScore": 85
}

Get Feedback Layer Config

HTTP
GET /v1/sdk/config

Returns server-driven feedback layer configuration used by SDK initialization.

Response:

JSON
{
  "display": { "trigger": "dot", "position": "right-center" },
  "triggers": { "onError": { "enabled": true } },
  "rewards": { "previewRange": { "min": 100, "max": 500 } }
}

Get User Feedback History

HTTP
GET /v1/sdk/user/history

Returns feedback history for an identified end user.

Query Parameters:

ParameterTypeDescription
endUserIdstringEnd user's unique ID
endUserEmailstringEnd user's email

Response:

JSON
{
  "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

HTTP
POST /v1/sdk/feedback/:id/attachments/presign

Get a presigned URL for attachment upload.

Request:

JSON
{
  "filename": "recording.webm",
  "mimeType": "video/webm",
  "sizeBytes": 1048576
}

Response:

JSON
{
  "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

JSON
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable message"
  }
}

Common Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid authentication
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
VALIDATION_ERROR400Invalid request
RATE_LIMITED429Too many requests