Team & roles

Organizations hold your team, keys, terminals and money. Roles are ranked owner > admin > finance > support > developer — see Authentication for the capability matrix.

Organizations

# Organizations you belong to, with your role
curl -s https://api.fluense.social/orgs -H "authorization: Bearer $SESSION"

# Create another org
curl -s https://api.fluense.social/orgs \
  -H "authorization: Bearer $SESSION" -H 'content-type: application/json' \
  -d '{"name":"Acme EU","country_code":"IE"}'

# Read / rename
curl -s https://api.fluense.social/orgs/$ORG -H "authorization: Bearer $SESSION"
curl -s -X PATCH https://api.fluense.social/orgs/$ORG \
  -H "authorization: Bearer $SESSION" -H 'content-type: application/json' \
  -d '{"name":"Acme Goods Ltd"}'

Members

curl -s https://api.fluense.social/orgs/$ORG/members -H "authorization: Bearer $SESSION"

# Add an existing user
curl -s -X POST https://api.fluense.social/orgs/$ORG/members \
  -H "authorization: Bearer $SESSION" -H 'content-type: application/json' \
  -d '{"user_id":"019a…","role":"finance"}'

# Change role / remove
curl -s -X PATCH https://api.fluense.social/orgs/$ORG/members/$USER \
  -H "authorization: Bearer $SESSION" -H 'content-type: application/json' -d '{"role":"support"}'
curl -s -X DELETE https://api.fluense.social/orgs/$ORG/members/$USER -H "authorization: Bearer $SESSION"

Member management requires owner or admin.

Invites

Invite by email; the invite is claimed automatically when that email signs in with an OTP (email ownership is proven by the code).

curl -s https://api.fluense.social/orgs/$ORG/invites \
  -H "authorization: Bearer $SESSION" -H 'content-type: application/json' \
  -d '{"email":"dev@acme.test","role":"developer"}'

curl -s https://api.fluense.social/orgs/$ORG/invites -H "authorization: Bearer $SESSION"
curl -s -X DELETE https://api.fluense.social/orgs/$ORG/invites/$INVITE -H "authorization: Bearer $SESSION"

Invites are PENDING until claimed or revoked. Re-inviting the same email updates the pending invite's role.