a84d4905fdbb
latestOpenAPI 3.1.02026-08-143874115.7 MBMemberships
Update Membership
Updates a membership: merge metadata key-value pairs, or toggle cancel_at_period_end — true schedules the cancellation for the end of the current billing period, false reverses a pending one.
patch/memberships/{id}
Request body
Example request
{
"cancel_at_period_end": true,
"metadata": {
"seat": "42"
}
}Response
membership updated
Example response
{
"account": {
"id": "biz_xxxxxxxxxxxxxx",
"logo_url": "https://assets-2-rough.whop.com/uploads/image/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"route": "shine-time-auto-detailing",
"title": "Shine Time Auto Detailing"
},
"created_at": "2026-01-01T12:00:00.000Z",
"current_period_end": "2026-01-01T12:00:00.000Z",
"id": "mem_xxxxxxxxxxxxxx",
"license_key": "license_key32_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"member": {
"access_level": "customer",
"last_accessed_at": "2026-01-01T12:00:00.000Z",
"position": 1767268800000
},
"metadata": {},
"plan_id": "plan_xxxxxxxxxxxxxx",
"product_id": "prod_xxxxxxxxxxxxxx",
"status": "active",
"user_id": "user_xxxxxxxxxxxxxx"
}