Skip to content

Memberships API

Memberships bridge subscriptions and entitlements: a membership row ties a user, organization, or project to a membership tier and an optional subscription_id. Tiers list features (for access checks); products can auto-map to tiers via metadata.

Base URL

https://your-instance.pubflow.com/bridge-payment/memberships

Admin routes:

https://your-instance.pubflow.com/bridge-payment/admin/memberships

Do not use /api/memberships

The Bridge server mounts this router at /bridge-payment/memberships only. Paths under /api/memberships are not served by Bridge Payments.

Authentication

  • Public tier catalog: GET /memberships/tiers and GET /memberships/tiers/:id are optionally unauthenticated (read-only).
  • User/org/project membership routes: require a Flowless session (X-Session-ID, Bearer, etc.) and ownership checks.
  • Admin routes: require admin privileges.

Core concepts

ConceptMeaning
Membership type / tierRow in membership_types — id, price, features JSON, metadata
Entity membershipActive (or historical) link of user, organization, or project to a tier + subscription
Product mappingProduct metadata.membership_type_id targets a tier id; when a subscription is created/paid, Bridge can create or update the right membership row
Project tierGET /memberships/projects/:projectId returns active memberships for quota / billing badges (used by Flowfull clients)

Endpoint map (public)

MethodPathPurpose
GET/memberships/tiersList active tiers
GET/memberships/tiers/:idTier detail
GET/memberships/users/meCurrent user’s memberships
GET/memberships/users/me/:idSingle membership (current user)
POST/memberships/users/me/:id/cancelCancel (current user)
GET/memberships/users/:userIdList for user (authorized)
GET/memberships/users/:userId/:idDetail
POST/memberships/users/:userId/:id/cancelCancel
GET/memberships/organizations/:organizationIdOrg memberships
GET/memberships/organizations/:organizationId/:idOrg membership detail
POST/memberships/organizations/:organizationId/:id/cancelCancel org membership
GET/memberships/projects/:projectIdActive project memberships
GET/memberships/projects/:projectId/:idDetail
POST/memberships/projects/:projectId/:id/cancelCancel project membership
GET/memberships/accessFeature access check (?feature=)

Admin endpoints (prefix /bridge-payment/admin/memberships) manage tiers and entity memberships—see the canonical reference below.

Field-level and admin detail

Use the API Reference for request/response shapes where operations are published in OpenAPI. This page summarizes routes and concepts; expand the Memberships and Admin groups in the sidebar as your instance’s spec exposes them.