> ## Documentation Index
> Fetch the complete documentation index at: https://usegately.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Member

> Update an existing member

## Path Parameters

<ParamField path="id" type="string" required>
  The member's unique identifier
</ParamField>

## Request Body

<ParamField body="email" type="string">
  Update the member's email address
</ParamField>

<ParamField body="full_name" type="string">
  Update the member's full name
</ParamField>

<ParamField body="avatar_url" type="string">
  Update the member's avatar URL
</ParamField>

<ParamField body="plan_id" type="string">
  Change the member's plan
</ParamField>

<ParamField body="status" type="string">
  Update status: `active`, `inactive`, `pending`
</ParamField>

<ParamField body="metadata" type="object">
  Update custom metadata (merged with existing)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  The updated member object
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  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"
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  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()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "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"
    }
  }
  ```

  ```json Error Response theme={null}
  {
    "success": false,
    "error": "Member not found",
    "code": "NOT_FOUND"
  }
  ```
</ResponseExample>

## Notes

* Only provided fields will be updated
* Metadata is merged with existing metadata (use `null` to remove a key)
* Changing email will require re-verification if email confirmation is enabled
* Plan changes take effect immediately
