Skip to content

REST API

For clients that don't support MCP (ChatGPT, custom apps, scripts), use the Supabase REST API directly.

Base URL & Authentication

Base URL: https://nlnbbquyqrbkgaitbbgk.supabase.co

Include these headers with every request:

http
apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M
Authorization: Bearer <same key as apikey>
Content-Type: application/json

INFO

This is the public read-only anon key. It only grants SELECT access to the ab_tests table.

Endpoints

http
POST /rest/v1/rpc/search_tests
json
{
  "query_text": "social proof pricing",
  "max_results": 15,
  "section_filter": "hero",       // optional
  "result_filter": "winner",      // optional
  "principle_filter": "social_proof" // optional
}
http
POST /functions/v1/semantic-search
json
{
  "query": "how to build trust on a SaaS pricing page",
  "max_results": 10,
  "threshold": 0.35
}

Browse & Filter Tests

http
GET /rest/v1/ab_tests?select=title,result,uplift_percent,key_insight,actionable_rule,element_tested,psychological_principle&website_section=eq.hero&result=eq.winner&limit=20

Common filters (append as query params):

  • website_section=eq.hero
  • result=eq.winner
  • page_type=eq.Landing Page
  • order=uplift_percent.desc.nullslast

Get a Specific Test

http
GET /rest/v1/ab_tests?id=eq.{uuid}&select=*

Get Patterns

http
POST /rest/v1/rpc/get_patterns
json
{
  "section_name": "hero",  // optional
  "min_tests": 3           // optional
}

Response Fields

FieldTypeDescription
idUUIDUnique test identifier
titlestringTest name
resultstringwinner, loser, or inconclusive
uplift_percentnumberConversion uplift (27 = +27%)
website_sectionstringPage section
element_testedstringWhat was changed
key_insightstringWhat we learned
actionable_rulestringWhat to do based on this
psychological_principlestringWhy it works
control_descriptionstringVersion A details
variation_descriptionstringVersion B details
brandstringCompany/brand tested
industrystringIndustry vertical
page_typestringType of page
source_namestringData source
source_urlstringLink to original test
quality_gradestringA, B, or C
devicestringDevice type tested
sample_sizenumberTest sample size

curl Examples

Search for tests

bash
curl -X POST 'https://nlnbbquyqrbkgaitbbgk.supabase.co/rest/v1/rpc/search_tests' \
  -H 'apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M' \
  -H 'Content-Type: application/json' \
  -d '{"query_text": "hero headline", "max_results": 5}'

Browse winners in a section

bash
curl 'https://nlnbbquyqrbkgaitbbgk.supabase.co/rest/v1/ab_tests?select=title,result,uplift_percent,key_insight&website_section=eq.trust&result=eq.winner&limit=10' \
  -H 'apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5sbmJicXV5cXJia2dhaXRiYmdrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE2NzcxODMsImV4cCI6MjA4NzI1MzE4M30.Kf_4ci_NVx6m8KCLnEP7Gj_GoygZ-PKbK1mHmITq77M'

A/B Test Library by klickstark