---
title: "Toggle a newsletter subscription"
method: PUT
path: "/marketing/subscribers/{id}"
tags: ["Admin Marketing: Communications"]
---

# Toggle a newsletter subscription

`PUT /marketing/subscribers/{id}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/marketing/subscribers/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/marketing/subscribers/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Sets is_subscribed for the subscriber row and mirrors the flag onto the linked customer (if any).

## Path parameters

- `id` integer, required

## Request body

- object
  - `is_subscribed` boolean, required

## Response `200`

Subscription updated.

## Other responses

- `400`: Invalid input
- `404`: Subscriber not found.
- `422`: Validation failed (is_subscribed required).

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
