Api
List 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
Length
1 <= length <= 128Response 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": "string", "startDate": "string", "endDate": "string", "config": { "schemaVersion": 1, "brandConfig": { "primaryColor": "string", "landingPageUrl": "string" }, "widgetConfig": { "position": "bottom-right", "triggerText": "string", "icon": "gift", "title": "string", "subtitle": "string", "logoUrl": "string", "cssVariables": { "property1": "string", "property2": "string" }, "shareMessage": "string", "enabledPlatforms": { "facebook": true, "twitter": true, "linkedin": true, "whatsapp": true, "email": true, "instagram": true, "telegram": true }, "referralLink": "string", "productName": "string" }, "partnerApplicationsOpen": true }, "enrollmentCount": 0, "referralCount": 0 } ]}