Parameters

membership
dictionary
listing_id
integer
Required
Description
ID of the membership listing (must have `type: "membership"`).
membership_id
string
Required
Description
Your external member identifier, unique per tenant + listing (max 128 chars).
user_id
integer
Description
User to enrol. Admins only — defaults to the authenticated user.
status
string
Description
Initial status: `active` (default), `expired`, or `cancelled`.
joined_at
string
Description
ISO-8601 join timestamp. Defaults to now.
start_date
string
Description
Membership start date (`YYYY-MM-DD`).
end_date
string
Description
Membership expiry date (`YYYY-MM-DD`).
duration_months
integer
Description
Duration in months.
currency_id
integer
Description
Currency used for contribution tracking.
metadata
dictionary
Description
Arbitrary key-value metadata.
POST/v1/memberships
curl https://api.tradly.app/v1/memberships \
  -H "Authorization: Bearer YOUR_PUBLISHABLE_OR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{
  "membership": {
    "listing_id": 42,
    "membership_id": "MEM-001",
    "user_id": 1001,
    "status": "active",
    "joined_at": "2026-09-25T08:00:00Z",
    "start_date": "2026-09-25",
    "end_date": "2027-09-25",
    "duration_months": 12,
    "currency_id": 1,
    "metadata": {}
  }
}'
RESPONSE
{
  "status": true,
  "data": {
    "membership": {
      "id": 1,
      "tenant_id": 100,
      "listing_id": 42,
      "user_id": 1001,
      "membership_id": "MEM-001",
      "status": "active",
      "joined_at": "2026-09-25T08:00:00.000Z",
      "start_date": "2026-09-25",
      "end_date": "2027-09-25",
      "duration_months": 12,
      "currency_id": 1,
      "total_paid": "0.000000",
      "total_units": "0.000000",
      "metadata": {},
      "created_at": "2026-09-25T08:00:00.000Z",
      "updated_at": "2026-09-25T08:00:00.000Z"
    }
  }
}