Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

Updates member metadata. This is a flexible JSONB field for storing custom information about members.

URL Parameters

community_id
integer
required
The ID of the community
id
integer
required
The ID of the community membership

Request Body

metadata
object
required
Custom metadata object to store with the member

Returns

Returns the updated community membership object.
curl -X PATCH https://api.onlydrams.app/odis/v1/communities/1/members/50 \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "metadata": {
         "notes": "VIP member - send exclusive samples",
         "preferred_bottles": ["Lagavulin 16", "Ardbeg 10"],
         "allergies": "None",
         "tier_upgrade_requested": false
       }
     }'
{
  "id": 50,
  "status": "active",
  "metadata": {
    "notes": "VIP member - send exclusive samples",
    "preferred_bottles": ["Lagavulin 16", "Ardbeg 10"],
    "allergies": "None",
    "tier_upgrade_requested": false
  },
  "user": {
    "id": 200,
    "username": "whisky_lover",
    "email": "member@example.com"
  },
  "membership_tier": {
    "id": 1,
    "name": "Bronze Member"
  },
  "created_at": "2024-08-15T10:30:00Z",
  "updated_at": "2024-11-14T09:30:00Z"
}

Notes

  • Authorization: Community owner or admin only
  • Merge Behavior: Metadata is merged with existing data, not replaced
  • Flexible Schema: Store any JSON-compatible data structure
  • Use Cases: Member notes, preferences, custom flags, tracking data
  • Reserved Fields: Some metadata fields are system-managed (e.g., lifetime_spend_cents, blocked, refunds)