CapyDB/ docs
ReferenceAPI

Programs

Growth programs: startup and partner applications (submitted through the CapyDB website with a narrow service token, reviewed by platform operators) and customer referrals. Every reward is a Polar discount redeemed at checkout; nothing here changes a plan directly.

POST
/v1/program-applications

Authorization

AuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

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

curl -X POST "https://example.com/v1/program-applications" \  -H "Content-Type: application/json" \  -d '{    "company_name": "string",    "contact_name": "string",    "email": "string",    "program": "startup",    "segment": "string",    "team_size": 1,    "use_case": "stringstringstringst"  }'
{  "program_application": {    "company_name": "string",    "company_website": "string",    "contact_name": "string",    "created_at": "2019-08-24T14:15:22Z",    "decided_at": "2019-08-24T14:15:22Z",    "decided_by_user_id": "string",    "discount_code": "string",    "discount_id": "string",    "email": "string",    "id": "string",    "locale": "string",    "operator_note": "string",    "program": "startup",    "referral_source": "string",    "segment": "string",    "status": "received",    "team_size": 0,    "updated_at": "2019-08-24T14:15:22Z",    "use_case": "string"  }}
POST
/v1/organizations/{orgID}/referral-code

Authorization

AuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

In: header

Path Parameters

orgID*string

Organization id.

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

curl -X POST "https://example.com/v1/organizations/string/referral-code" \  -H "Content-Type: application/json" \  -d '{}'
{  "referral_code": {    "code": "string",    "created_at": "2019-08-24T14:15:22Z",    "discount_id": "string",    "locale": "string",    "organization_id": "string",    "updated_at": "2019-08-24T14:15:22Z"  }}
PATCH
/v1/organizations/{orgID}/referral-code

Authorization

AuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

In: header

Path Parameters

orgID*string

Organization id.

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

curl -X PATCH "https://example.com/v1/organizations/string/referral-code" \  -H "Content-Type: application/json" \  -d '{    "discount_id": "string"  }'
{  "referral_code": {    "code": "string",    "created_at": "2019-08-24T14:15:22Z",    "discount_id": "string",    "locale": "string",    "organization_id": "string",    "updated_at": "2019-08-24T14:15:22Z"  }}
GET
/v1/organizations/{orgID}/referrals

Authorization

AuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

In: header

Path Parameters

orgID*string

Organization id.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/organizations/string/referrals"
{  "referrals": [    {      "code": "string",      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "referred_organization_id": "string",      "referred_subscription_id": "string",      "referrer_organization_id": "string",      "reward_discount_id": "string",      "rewarded_at": "2019-08-24T14:15:22Z",      "status": "pending",      "updated_at": "2019-08-24T14:15:22Z",      "void_reason": "string"    }  ]}