Set Qualifying Event Types

PUT
/v1/qualifying-event-types

Set the Event types that create a referral in the Project (default signup and purchase). A write applies at once. Needs the programs:write 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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/qualifying-event-types" \  -H "Content-Type: application/json" \  -d '{    "qualifyingEventTypes": [      "string"    ],    "projectId": "string"  }'
{  "success": true,  "data": {    "id": "string",    "createdAt": "string",    "updatedAt": "string",    "workspaceId": "string",    "environment": "sandbox",    "liveProjectId": "string",    "name": "string",    "slug": "string",    "logo": "string",    "logoDark": "string",    "icon": "string",    "brandColor": "string",    "url": "string",    "metadata": "string",    "appType": "saas",    "profile": {      "sourceUrl": "string",      "readStatus": "read",      "readAt": "2019-08-24T14:15:22Z",      "model": "string",      "description": "string",      "brandColor": "string",      "pricing": [        {          "plan": "string",          "price": "string",          "amountMinor": 0,          "currency": "string",          "interval": "month"        }      ],      "trialDays": 1,      "setupPath": "suggested"    },    "qualifyingEventTypes": [      "string"    ]  }}