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

# Notification History

> Retrieve all in-app notifications for the authenticated user.

Fetch the full notification history for the currently authenticated user. You must include a valid Bearer token — the response contains only notifications belonging to your account.

## Request

**`GET /notifications/history`**

```http theme={null}
Authorization: Bearer <token>
```

## Response

<ResponseField name="notifications" type="array">
  List of notification objects for the authenticated user.

  <Expandable title="Notification object">
    <ResponseField name="id" type="integer">
      Unique identifier for the notification.
    </ResponseField>

    <ResponseField name="userId" type="integer">
      ID of the user this notification belongs to.
    </ResponseField>

    <ResponseField name="rideId" type="integer">
      ID of the ride associated with this notification, if applicable.
    </ResponseField>

    <ResponseField name="title" type="string">
      Short heading for the notification (up to 120 characters).
    </ResponseField>

    <ResponseField name="message" type="string">
      Full notification body text (up to 800 characters).
    </ResponseField>

    <ResponseField name="channel" type="string">
      Delivery channel for the notification (e.g. `in_app`).
    </ResponseField>

    <ResponseField name="eventType" type="string">
      The event that triggered this notification (e.g. `RIDE_STARTED`, `PAYMENT_RECEIVED`).
    </ResponseField>

    <ResponseField name="read" type="boolean">
      `true` if you have already read this notification; `false` otherwise.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp of when the notification was created.
    </ResponseField>

    <ResponseField name="deliveredAt" type="string">
      ISO 8601 timestamp of when the notification was delivered. May be `null` if not yet delivered.
    </ResponseField>

    <ResponseField name="status" type="string">
      Current delivery status of the notification (e.g. `delivered`, `pending`).
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  This endpoint returns notifications scoped to the authenticated user only. Tokens from other users cannot access your notification history.
</Note>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET http://localhost:8080/notifications/history \
    -H "Authorization: Bearer <token>"
  ```

  ```json Response theme={null}
  {
    "notifications": [
      {
        "id": 42,
        "userId": 7,
        "rideId": 101,
        "title": "Your driver is arriving",
        "message": "Rahul (KA 05 AB 1234) is 2 minutes away.",
        "channel": "in_app",
        "eventType": "DRIVER_ARRIVING",
        "read": false,
        "createdAt": "2026-04-02T10:15:30Z",
        "deliveredAt": "2026-04-02T10:15:31Z",
        "status": "delivered"
      }
    ]
  }
  ```
</CodeGroup>
