
# Update a subscriber

Update a subscriber's name or phone, or confirm them with `"confirmed": true`. Subscribers cannot be unconfirmed.

```sh
PATCH https://sitepaste.com/api/v1/public/sites/{siteId}/newsletter-subscribers/{subscriberId}
```

Requires the `data` scope.

## Usage

```bash
curl -X PATCH "https://sitepaste.com/api/v1/public/sites/default/newsletter-subscribers/n8qjx2v7mz4r" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "confirmed": true }'
```

## Authorizations

| Header | Type | Required | Description |
|--------|------|----------|-------------|
| Authorization | string | Yes | Bearer token (`Authorization: Bearer sp_...`). Created in the dashboard under Account > Tokens. See [authentication](/api/authentication). |



## Body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| name | string | No | Display name, up to 100 characters. Trimmed; an empty string clears it, and it is then omitted on read. |
| phone | string | No | Phone number, up to 20 characters. Trimmed; an empty string clears it, and it is then omitted on read. |
| confirmed | boolean | No | `true` confirms the subscriber. `false` is rejected. |

## Response

200 OK with the updated subscriber record. Sending `"confirmed": true` for a subscriber who is already confirmed returns the record with its original `confirmedAt`.

422 when the body names no field (`{}`), or when `confirmed` is `false`.

400 when `{subscriberId}` is malformed; 404 when it is well formed but names no subscriber on the site.