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.

Creates a new benefit for a community. Optionally assign it to membership tiers during creation.

URL Parameters

community_id
integer
required
The ID of the community

Request Body

name
string
required
Benefit name (max 200 characters)
description
string
Benefit description (max 1,000 characters)
position
integer
Display position (default: 0)
status
string
Status: active or archived (default: active)
tier_ids
array
Array of tier IDs to assign this benefit to (optional)

Returns

Returns the created benefit object with assigned tiers.
curl -X POST https://api.onlydrams.app/odis/v1/communities/1/benefits \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "Early Access to Releases",
       "description": "Get first access to new bottle releases before general availability",
       "position": 1,
       "status": "active",
       "tier_ids": [1, 2]
     }'
{
  "id": 1,
  "name": "Early Access to Releases",
  "description": "Get first access to new bottle releases before general availability",
  "position": 1,
  "status": "active",
  "tier_ids": [1, 2],
  "tiers": [
    {
      "id": 1,
      "name": "Gold Member",
      "position": 1
    },
    {
      "id": 2,
      "name": "Platinum Member",
      "position": 2
    }
  ],
  "community": {
    "id": 1,
    "name": "Whisky Enthusiasts"
  },
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Notes

  • Authorization: Community owner or admin only
  • Tier Assignment: Tier IDs must belong to the same community
  • Position: Lower numbers appear first in listings
  • Status: Defaults to active if not specified