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

# Get Notification Preferences

> Read the authenticated user's disabled push notification types

Returns the set of notification event types the acting user has disabled for push. A user with no preference row is **all-on** — the response is an empty `disabledTypes` array.

Disabling a type only suppresses **push**; the in-app notification is still written.

Requires authentication. **Acting-user-scoped:** an end-user token (`Authorization: Bearer <accessToken>`) reads its own preferences. A service/master key acts on behalf of a named user via the optional `userId` query param — a service key without `userId` is rejected, and an end-user token may not name a different user. Requires the `push` bundle.

## Query Parameters

<ParamField query="userId" type="string">
  The acting user whose preferences are read. **Service/master keys only** — a service key must pass it; an end-user token infers it from the auth token and may not name a different user.
</ParamField>

## Response

Returns `200`.

```json theme={null}
{ "disabledTypes": ["new-follow", "message"] }
```

<ResponseField name="disabledTypes" type="string[]">
  The event types the user has opted out of. Empty when no preferences are set (all-on). Values are drawn from the [event palette](/v8/notification-preferences#the-event-palette).
</ResponseField>

## Error Responses

<AccordionGroup>
  <Accordion title="No Credential — 401">
    Plain-text `Unauthorized`, with no JSON body and no `code`. Returned when the
    request carries no `Authorization` header at all.
  </Accordion>

  <Accordion title="Rejected Credential — 403">
    Plain-text `Forbidden`, with no JSON body and no `code`. Returned when the
    access token is malformed, has the wrong signature, or has **expired** — the
    common case, since access tokens live 30 minutes. Refresh the access token
    and retry.
  </Accordion>

  <Accordion title="Acting As Another User — 403">
    ```json theme={null}
    { "error": "Unauthorized", "code": "notification-preferences/unauthorized" }
    ```

    Returned when an end-user token names a `userId` other than its own.
  </Accordion>

  <Accordion title="Invalid Query — 400">
    ```json theme={null}
    { "error": "...", "code": "notification-preferences/invalid-query" }
    ```

    Returned when the `userId` query parameter is not a valid identifier.
  </Accordion>

  <Accordion title="Missing User ID — 400">
    ```json theme={null}
    { "error": "Missing user ID", "code": "notification-preferences/missing-user-id" }
    ```

    Returned when a service/master key omits the required `userId` (it has no implicit session user).
  </Accordion>

  <Accordion title="Bundle Not Installed — 403">
    ```json theme={null}
    {
      "code": "database/tables-not-available",
      "missingTables": ["PushProviderConfigs", "PushDevices", "NotificationPreferences"],
      "dashboardUrl": "https://…/<projectId>/database"
    }
    ```

    Returned when the `push` bundle is not installed for this project.
  </Accordion>

  <Accordion title="Bundle Provisioning — 503">
    ```json theme={null}
    {
      "code": "database/tables-provisioning",
      "missingTables": ["PushProviderConfigs", "PushDevices", "NotificationPreferences"],
      "bundleId": "push"
    }
    ```

    Returned while the `push` bundle is mid-install. Retry shortly.
  </Accordion>

  <Accordion title="Server Error — 500">
    ```json theme={null}
    {
      "error": "Internal server error.",
      "code": "notification-preferences/server-error"
    }
    ```
  </Accordion>
</AccordionGroup>

**Rate limit:** 100 requests per 5 minutes per IP. Exceeding it returns `429` with a plain-text message and no `code`.

## See Also

* [Update Notification Preferences](/v8/api-reference/push-notifications/update-preferences)
* [`useNotificationPreferences`](/v8/hooks/push/use-notification-preferences)
* [Notification Preferences & Mute](/v8/notification-preferences)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.