List Programs

GET
/v1/programs

List the Programs of a Project, oldest first, with their enrollment and referral counts. Needs the programs:read key permission.

Authorization

WorkspaceApiKey
X-Api-Key<token>

Workspace-owned Better Auth API key of one environment (Sandbox or Live); it authorizes the Projects of that environment in its Workspace. A Project of the other environment returns 403 ENVIRONMENT_MISMATCH. Never expose it in the browser.

In: header

Query Parameters

projectId*string
Length1 <= length <= 128

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/programs?projectId=string"
{  "success": true,  "data": [    {      "id": "string",      "createdAt": "string",      "updatedAt": "string",      "projectId": "string",      "kind": "referral",      "name": "string",      "status": "draft",      "startDate": "string",      "endDate": "string",      "config": {        "schemaVersion": 1,        "brandConfig": {          "landingPageUrl": "string"        },        "widgetConfig": {          "theme": {            "preset": "default",            "brandColor": "string",            "mode": "auto",            "radius": 0,            "font": "inherit",            "density": "compact",            "overrides": {              "light": {                "property1": "string",                "property2": "string"              },              "dark": {                "property1": "string",                "property2": "string"              }            }          },          "launcher": {            "style": "pill",            "position": "bottom-right",            "offsetX": 0,            "offsetY": 0,            "size": "sm",            "mobile": "same",            "icon": "gift",            "text": "string"          },          "share": {            "platforms": [              "email"            ],            "iconStyle": "mono"          },          "title": "string",          "subtitle": "string",          "shareMessage": "string",          "helpText": "string",          "termsUrl": "string",          "showBadge": true,          "showRefereeNames": true,          "referralLink": "string",          "referralCode": "string"        },        "partnerApplicationsOpen": true,        "enrollAtSignup": true,        "applicationQuestions": [          {            "id": "string",            "kind": "text",            "label": "string",            "required": true,            "options": [              "string",              "string"            ]          }        ],        "applicationReview": {          "mode": "manual",          "rules": [            {              "questionId": "string",              "equals": "string",              "action": "approve"            }          ]        },        "applicationTitle": "string",        "applicationDescription": "string",        "applicationTermsUrl": "string"      },      "enrollmentCount": 0,      "referralCount": 0    }  ]}