Documentation
Feedback API
POST /api/feedback request and response shape.
Endpoint
The embed posts here. You can call the same endpoint from your own client if you need a custom UI.
http
POST /api/feedback
Content-Type: application/jsonCORS allows any origin with POST and OPTIONS.
Request body
json
{
"key": "pk_live_…",
"type": "feedback",
"message": "Love the new onboarding flow.",
"description": "The checklist made setup much clearer.",
"email": "alex@acme.com",
"username": "alex",
"userId": "usr_123",
"featureId": "…",
"originUrl": "https://app.acme.com/settings",
"screenResolution": "1920x1080"
}| Field | Required | Notes |
|---|---|---|
| key | Yes | Project public key; must start with pk_ |
| type | Yes | feedback, bug, or feature |
| message | Yes | Short title. Non-empty, max 5000 characters. title is accepted as an alias. |
| description | No | Longer details; max 5000 characters |
| No | Visitor or identified email | |
| username | No | Display name / handle |
| userId | No | Your app's user id |
| featureId | No | Id of a feature from Project → Features; must belong to this project |
| originUrl | No | Page the user was on when submitting; widget sends location.href. pageUrl is accepted as an alias. |
| screenResolution | No | Client screen size, e.g. 1920x1080. Widget sends screen.width×screen.height. Max 32 characters. |
| attachmentIds | No | Bug reports only. Up to 5 ids from POST /api/feedback/attachment-uploads. Requires a verified identity token. See Image attachments below. |
| User-Agent | Auto | Taken from the request header. Gatherly stores the raw value and derives browser (Chrome, Safari, …), device (PC, Phone, Tablet, TV, …), and os (Windows, macOS, iOS, …) for the inbox. |
Image attachments (bugs)
Authenticated users can attach up to five JPEG or PNG images (5MB each) to a bug report. Uploads go directly to private storage via signed URLs so large files do not pass through the feedback API.
- Call
POST /api/feedback/attachment-uploadswith your project key, identity token, and file metadata. PUTeach file to the returnedsignedUrl.- Submit
POST /api/feedbackwithtype: "bug"andattachmentIds.
http
POST /api/feedback/attachment-uploads
Content-Type: application/json
Authorization: Bearer <identity-jwt>json
{
"key": "pk_live_…",
"files": [
{ "contentType": "image/png", "sizeBytes": 204800 }
]
}json
{
"attachments": [
{
"id": "…",
"path": "…",
"token": "…",
"signedUrl": "https://…"
}
]
}- Requires project user authentication enabled and a valid identity JWT. Anonymous users can still submit text-only bugs.
- Rate limit: one image-bearing bug submit per authenticated user per project every 10 minutes.
- Images are deleted after the project retention period (default 30 days; configurable under Project → Widget).
Success response
json
HTTP/1.1 201 Created
{
"id": "…",
"ok": true
}Error responses
400— invalid JSON, missing message, invalid type, unknown feature, or invalid attachments401— missing / invalid / unknown project key or identity token403— audience rules, attaching images without authentication, or monthly response quota reached429— too many submissions from this client, or image attachment rate limit500— failed to persist the message
json
{ "error": "Message (title) is required (max 5000 characters)." }