An organization offers one or more membership tiers; a user's membership is their join of an org at a tier, with its own membership wallet and validity window. See Core concepts for the model.
Membership tiers
Tiers live under an organization and require the org tier scopes.
| Method | Path | Scope |
|---|---|---|
| GET | /organizations/{organization_slug}/membership-tiers | org:tiers:read |
| POST | /organizations/{organization_slug}/membership-tiers | org:tiers:manage |
| GET | /organizations/{organization_slug}/membership-tiers/{tier_uuid} | org:tiers:read |
| PATCH / DELETE | /organizations/{organization_slug}/membership-tiers/{tier_uuid} | org:tiers:manage |
Managing tiers acts on behalf of the org, so use an org-scoped token. Create a tier with a name, price (in cents), and interval:
curl -X POST \
"https://api.davi.social/api/v1/organizations/ORG_SLUG/membership-tiers" \
-H "Authorization: Bearer ORG_SCOPED_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Gold",
"price_cents": 4900,
"payment_interval": "monthly",
"description": "Priority access and perks"
}'
payment_interval is one of daily, weekly, monthly, yearly, or
one_time.
Reading a user's memberships
GET /memberships (scope user:read) lists the authenticated user's active
memberships across organizations:
curl "https://api.davi.social/api/v1/memberships" \
-H "Authorization: Bearer ACCESS_TOKEN"
Each entry includes the organization_uuid and tier_uuid (with denormalized
organization_name / tier_name), joined_at, and valid_until — check
valid_until for expiry (null means it doesn't expire). With an
org-scoped token the list is filtered to that
organization.
GET /organizations/{organization_slug}/membership returns the current user's
membership in one specific organization.
Managing an organization's memberships
An organization can manage its own members' memberships. These act on behalf of the org, so use an org-scoped token.
| Method | Path | Purpose |
|---|---|---|
| GET | /organizations/{organization_slug}/memberships | List the org's memberships |
| POST | /organizations/{organization_slug}/memberships | Add a member at a tier |
| GET / PATCH / DELETE | /organizations/{organization_slug}/memberships/{user_uuid} | Read, change tier, or end a membership |
| POST | /organizations/{organization_slug}/memberships/{user_uuid}/renew | Renew a membership |
| GET | /organizations/{organization_slug}/memberships/{user_uuid}/history | Membership history, including ended ones |
| GET | /organizations/{organization_slug}/memberships/{user_uuid}/wallet | The member's membership wallet |
| GET | /organizations/{organization_slug}/memberships/{user_uuid}/cards | Cards issued to that member |
A membership is also created automatically when a user claims a card that carries a membership tier.
Next
- Rewards & triggers — reward members automatically.
- Activities & check-ins — run events for members.