Quickstart
Install the Loop SDK, set your API key, and create your first feedback item in minutes using JavaScript, Python, Go, or the REST API directly.
Overview
This guide takes you from zero to a stored feedback item in a few minutes. You will install the SDK, configure your API key, send your first item, and then read it back. Pick the language you work in — every step is shown for JavaScript/TypeScript, Python, Go, and raw REST.
You only need two things to follow along: a Loop project and a place to run a small amount of server-side code. The same four steps apply whether you are wiring Loop into a production backend or trying it from a throwaway script. By the end you will have a real feedback item in your account and know how to query it.
1. Get an API key
Create a project in the Loop dashboard and copy its API key. Keep it server-side and load it from the environment — never commit it to source control.
export LOOP_API_KEY="sk_live_xxx"
Keys come in two flavors: sk_live_ keys write to your real project, and sk_test_ keys are isolated for development and CI so they never touch live data or count against your quota. Start with a test key while you experiment. See Authentication for key formats, rotation, and scopes.
2. Install the SDK
Install the client for your stack. Each package is a thin, typed wrapper over the REST API, so you can switch between an SDK and direct HTTP calls at any time without changing your data model.
# JavaScript / TypeScript
npm install @loop/sdk
# Python
pip install loop
# Go
go get github.com/loop-dev/loop-go
3. Create your first feedback item
Initialize the client with your API key and call feedback.create. Only user.id and message are required — everything else, including sentiment and source, is optional and can be added later during triage. The call returns the stored item with a server-assigned id you can hold onto.
import { Loop } from '@loop/sdk';
const loop = new Loop(process.env.LOOP_API_KEY);
const item = await loop.feedback.create({
user: { id: 'u_8f2c' },
message: 'Loving the new dashboard — much faster than before.',
sentiment: 'positive',
source: 'in-app-widget',
});
console.log(item.id); // fb_3a91
import os
from loop import Loop
loop = Loop(api_key=os.environ['LOOP_API_KEY'])
item = loop.feedback.create(
user={'id': 'u_8f2c'},
message='Loving the new dashboard — much faster than before.',
sentiment='positive',
)
print(item.id) # fb_3a91
client := loop.New(os.Getenv("LOOP_API_KEY"))
item, err := client.Feedback.Create(ctx, &loop.Feedback{
User: loop.User{ID: "u_8f2c"},
Message: "Loving the new dashboard — much faster than before.",
Sentiment: loop.Positive,
})
if err != nil {
log.Fatal(err)
}
fmt.Println(item.ID) // fb_3a91
Prefer calling the API directly? The same request over REST:
curl https://api.loop.dev/v2/feedback \
-H "Authorization: Bearer $LOOP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user": { "id": "u_8f2c" },
"message": "Loving the new dashboard — much faster than before.",
"sentiment": "positive",
"source": "in-app-widget"
}'
When the request succeeds, Loop fires a feedback.created webhook to any endpoint you have configured — so this single call is also how new feedback reaches the rest of your systems in real time.
4. Read it back
List your most recent feedback to confirm the item landed. The list endpoint returns items most-recent-first and accepts filters such as status and sentiment, which makes it easy to build triage views on top of it.
const { data } = await loop.feedback.list({ status: 'open', limit: 5 });
for (const fb of data) {
console.log(fb.createdAt, fb.sentiment, fb.message);
}
A successful response contains the stored item with its assigned id and createdAt:
{
"id": "fb_3a91",
"user": { "id": "u_8f2c" },
"message": "Loving the new dashboard — much faster than before.",
"sentiment": "positive",
"source": "in-app-widget",
"tag": null,
"status": "open",
"createdAt": "2026-06-19T14:02:11Z"
}
Field reference
These are the fields you will use most when creating feedback:
| Field | Required | Notes |
|---|---|---|
user.id |
Yes | Your stable identifier for the end user |
message |
Yes | The feedback text |
sentiment |
No | positive, neutral, or negative |
source |
No | Free-form origin, e.g. in-app-widget, api |
tag |
No | Optional label used for triage and routing |
Next steps
- Receive feedback in real time with Webhooks.
- Explore filtering and pagination in the Feedback API.
- Review per-language details in the SDKs reference.
You now have a working integration. From here, wire up webhooks so your team is notified the moment new feedback arrives.