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

# Update email

Whenever any of your subscribers change their email, use this endpoint to update it into Taag (we use emails to send invoices, receipts, etc)

```method: POST theme={null}
https://api.taag.cc/v1/subscribers/update/email
```

## Authorization

All you need is to include your **secret key** as a value of **authorization** in the header and hit the endpoint above.

```bash theme={null}
Authorization: taag_sk_mode_xxxxxxxxx
```

<ParamField path="Authorization" type="string" required>
  Use the secret key that matches the mode you are in TEST or LIVE
</ParamField>

## Request body

```bash theme={null}
{
	"oldEmail": "user1@example.com",
    "newEmail": "singlemoms@gmail.com"
}
```

<ResponseField name="oldEmail" type="string" required>
  Use the old subscriber email that has to be updated
</ResponseField>

<ResponseField name="newEmail" type="email" required>
  The new email of the subscriber
</ResponseField>

## Response

When successful you will receive this response:

```bash theme={null}
    {
        "message": "Subscriber email updated successfully",
        "mode": "TEST",
        "subscriber": {
            "email": "singlemoms@gmail.com",
            "subscriberId": "f3a5e5afda82acd2569415e869193d9d"
        }
    }
```
