curl -X PATCH "https://api.usegately.com/api/v1/members/mem_abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"full_name": "John Smith",
"plan_id": "plan_enterprise",
"metadata": {
"upgraded_at": "2024-01-20"
}
}'
const response = await fetch('https://api.usegately.com/api/v1/members/mem_abc123', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
full_name: 'John Smith',
plan_id: 'plan_enterprise',
metadata: {
upgraded_at: '2024-01-20'
}
})
})
const data = await response.json()
{
"success": true,
"data": {
"id": "mem_abc123",
"email": "john@example.com",
"full_name": "John Smith",
"status": "active",
"plan_id": "plan_enterprise",
"metadata": {
"company": "Acme Inc",
"upgraded_at": "2024-01-20"
},
"updated_at": "2024-01-20T16:00:00Z"
}
}
{
"success": false,
"error": "Member not found",
"code": "NOT_FOUND"
}
Members
Update Member
Update an existing member
PATCH
/
api
/
v1
/
members
/
{id}
curl -X PATCH "https://api.usegately.com/api/v1/members/mem_abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"full_name": "John Smith",
"plan_id": "plan_enterprise",
"metadata": {
"upgraded_at": "2024-01-20"
}
}'
const response = await fetch('https://api.usegately.com/api/v1/members/mem_abc123', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
full_name: 'John Smith',
plan_id: 'plan_enterprise',
metadata: {
upgraded_at: '2024-01-20'
}
})
})
const data = await response.json()
{
"success": true,
"data": {
"id": "mem_abc123",
"email": "john@example.com",
"full_name": "John Smith",
"status": "active",
"plan_id": "plan_enterprise",
"metadata": {
"company": "Acme Inc",
"upgraded_at": "2024-01-20"
},
"updated_at": "2024-01-20T16:00:00Z"
}
}
{
"success": false,
"error": "Member not found",
"code": "NOT_FOUND"
}
Path Parameters
Request Body
Response
curl -X PATCH "https://api.usegately.com/api/v1/members/mem_abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"full_name": "John Smith",
"plan_id": "plan_enterprise",
"metadata": {
"upgraded_at": "2024-01-20"
}
}'
const response = await fetch('https://api.usegately.com/api/v1/members/mem_abc123', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
full_name: 'John Smith',
plan_id: 'plan_enterprise',
metadata: {
upgraded_at: '2024-01-20'
}
})
})
const data = await response.json()
{
"success": true,
"data": {
"id": "mem_abc123",
"email": "john@example.com",
"full_name": "John Smith",
"status": "active",
"plan_id": "plan_enterprise",
"metadata": {
"company": "Acme Inc",
"upgraded_at": "2024-01-20"
},
"updated_at": "2024-01-20T16:00:00Z"
}
}
{
"success": false,
"error": "Member not found",
"code": "NOT_FOUND"
}
Notes
- Only provided fields will be updated
- Metadata is merged with existing metadata (use
nullto remove a key) - Changing email will require re-verification if email confirmation is enabled
- Plan changes take effect immediately
Was this page helpful?