Developers

Embed API

The public endpoint that returns a campaign's approved testimonials as JSON.

Both the embed widget and the @kudoso/react package are built on one public endpoint. You can call it directly to build a fully custom testimonial display.

The endpoint#

text
1GET /api/embed/:campaignId

For a campaign hosted on Kudoso, the full URL is:

text
1https://kudoso.io/api/embed/YOUR_CAMPAIGN_ID

The endpoint is public, requires no authentication, and is CORS-enabled, so you can call it directly from browser JavaScript on any origin.

Response shape#

The response is JSON with a campaign object and a testimonials array. Only approved testimonials are returned.

json
1{
2 "campaign": {
3 "name": "Website reviews",
4 "brand_color": "#10b981",
5 "logo_url": "https://..."
6 },
7 "testimonials": [
8 {
9 "id": "...",
10 "customer_name": "Sarah Chen",
11 "customer_title": "Founder at Loop",
12 "text_content": "The fastest way we have ever collected proof.",
13 "ai_summary": "Praises speed of collection.",
14 "rating": 5,
15 "video_url": null,
16 "content_type": "text",
17 "created_at": "2026-01-12T09:30:00.000Z"
18 }
19 ]
20}

Fields#

FieldDescription
campaign.nameThe campaign's name
campaign.brand_colorThe campaign's brand color
campaign.logo_urlThe campaign's logo, if set
testimonials[].idUnique testimonial ID
testimonials[].customer_nameThe customer's name
testimonials[].customer_titleThe customer's title, for example "Founder at Loop"
testimonials[].text_contentThe written testimonial, if any
testimonials[].ai_summaryThe AI summary, if generated
testimonials[].ratingStar rating
testimonials[].video_urlVideo URL, if it is a video testimonial
testimonials[].content_typetext or video
testimonials[].created_atISO 8601 timestamp

Example: fetch in the browser#

js
1const res = await fetch('https://kudoso.io/api/embed/YOUR_CAMPAIGN_ID');
2const { campaign, testimonials } = await res.json();
3
4testimonials.forEach((t) => {
5 console.log(t.customer_name, '-', t.text_content ?? '[video]');
6});

Note

The endpoint returns only approved testimonials, so it is safe to expose publicly. Anything still pending or rejected in your dashboard never appears in the response.

Tip

Most teams do not need to call the API directly. The embed widget and the @kudoso/react package consume this endpoint for you. Reach for the raw API only when you want a completely custom display.

Next steps#