> For the complete documentation index, see [llms.txt](https://api.senderwiz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.senderwiz.com/customer/subscribers/update-a-subscriber-by-email.md).

# Update a Subscriber by Email

### 🔄 Update a Subscriber by Email

Search for a subscriber using their email, then update their details with a follow-up PUT request.

***

#### 🔹 HTTP Request

**Step 1:** Search by email

```http
GET API-URL/lists/LIST-UNIQUE-ID/subscribers/search-by-email
```

**Step 2:** Update using subscriber UID

```http
PUT API-URL/lists/LIST-UNIQUE-ID/subscribers/SUBSCRIBER-UNIQUE-ID
```

***

#### 🔸 URL Segments

| Segment                | Required | Description                         |
| ---------------------- | -------- | ----------------------------------- |
| `LIST-UNIQUE-ID`       | Yes      | List unique identifier              |
| `SUBSCRIBER-UNIQUE-ID` | Yes      | Subscriber UID returned from search |

***

#### 🔎 GET/PUT Parameters

| Parameter | Type   | Required | Description                                 |
| --------- | ------ | -------- | ------------------------------------------- |
| `EMAIL`   | string | Yes      | Email address to search                     |
| `data`    | array  | Yes      | Array of fields `{name => value}` to update |

***

#### 🔐 Authorization Header

```
X-API-KEY: your-api-key-here
```

***

#### 💻 PHP Example

```php
// UPDATE EXISTING SUBSCRIBER BY EMAIL
$response = $endpoint->updateByEmail('LIST-UNIQUE-ID', 'emma.woods@demo.org', [
    'EMAIL'    => 'emma.woods@demo.org',
    'FNAME'    => 'Emma',
    'LNAME'    => 'Woods Updated'
]);

// DISPLAY RESPONSE
echo '<hr />';
echo '<pre>';
print_r($response->body);
echo '</pre>';
```

***

#### 📦 Sample JSON Response

```json
{
  "status":"success",
  "data": {
    "record": {
      "subscriber_uid": "xy823cb90q812",
      "email": "emma.woods@demo.org",
      "ip_address": "192.168.1.88",
      "source": "api",
      "date_added": "2025-04-17 14:30:42"
    }
  }
}
```
