# PUT /auth/notifications/{kind}

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the auth group.

Set the caller's preference for one notification kind

- Who may call it: administrator
- Token scope, any of: security, all
- Answers: 200 OK

Set enabled to true or false for a kind returned by GET /auth/notifications. An unknown kind or a missing enabled field returns 400. The response contains the caller's updated preferences for all notification kinds and their email address.

## As a command

- [urbestack-notify-set](https://urbestack.com/docs/commands/urbestack-notify-set.md): Sets one administrator's preference for one kind of server notification.

## Parameters

- `kind` (path, string, matching ^[a-z]+\.[a-z_]+$, required)

## Request body

JSON, the type [NotificationSwitch](https://urbestack.com/docs/api/types/NotificationSwitch.md).

- `enabled` (boolean, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X PUT "$API/auth/notifications/profile" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true
  }'
```

Response, 200 OK:

```
{
  "email": "alice@example.com",
  "kinds": [
    {
      "default": 0,
      "description": "text",
      "enabled": true,
      "kind": "profile",
      "title": "text"
    }
  ]
}
```

## Errors

- 400: --kind is required
- 400: --user is required
- 400: Invalid boolean
- 400: Say --on or --off, one of them
- 400: Unknown notification kind
- 400: body is missing required field enabled
- 401: Authentication required
- 403: Notifications are the administrators'
- 404: Unknown user <user>
