This page shows you how to list the organizations a user belongs to, read one of
them, and read the user's role on its team. You need a user access token with
org:list and org:read.
List the user's organizations
curl "https://api.davi.social/api/v1/organizations" \
-H "Authorization: Bearer ACCESS_TOKEN"
GET /organizations (scope org:list) returns the organizations the caller owns
or is a member of, paginated.
With an organization-scoped token it returns only that organization. The endpoint lists the organizations the token can act for. To build an organization picker, list with the user's token, then exchange it for a token scoped to the organization they choose.
Read one organization
curl "https://api.davi.social/api/v1/organizations/acme-inc" \
-H "Authorization: Bearer ACCESS_TOKEN"
GET /organizations/{organization_slug} (scope org:read) returns one
organization. Use the slug. A UUID is also accepted while v1 is in preview, but
that is transitional.
Read the caller's staff role
curl "https://api.davi.social/api/v1/organizations/acme-inc/staff/me" \
-H "Authorization: Bearer ACCESS_TOKEN"
GET /organizations/{organization_slug}/staff/me (scope org:read) returns the
caller's own role on the organization's team.
Read the role to decide what the user may do. Do not infer it from the organization appearing in the listing.
Staff is not membership. Staff is who administers the organization; membership is enrolment in one of its tiers. The two are independent: somebody can hold a paid tier without being staff, or run the organization without holding a tier.
Next
- Acting as an Organization: the token needed to write on an organization's behalf.
- Membership Tiers and Members: tiers and who holds them.
- Org Activities: what an organization runs.