> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.projectmanager.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.projectmanager.com/_mcp/server.

# Retrieve Notifications

GET https://api.projectmanager.com/api/data/notifications

Retrieve the most recent notifications for the current user, along with the amount of notifications.
            
A notification represents a message sent to a user to inform them of relevant actions or events within their
workspace. Notifications are ephemeral and may be deleted when they are no longer needed.  When a user has more
than 1,000 pending notifications some old notifications will be deleted automatically.
            
This API retrieves 500 notifications at a time.  To fetch more than 500 notifications, repeat this API call
using the parameter `lastId` of the oldest notification from each batch to fetch the next 500 notifications.

Reference: https://developer.projectmanager.com/api-reference/notification/retrieve-notifications

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `lastId` (string, optional) — To continue loading more notifications in a series of requests, provide the ID of the oldest notification from the currently loaded batch as the `lastId` parameter
- `senderId` (string, optional) — Filter the notifications to only those sent by the user with the specified ID
- `notificationTypes` (list of string, optional) — Specifies the types of notifications to return. If not provided, all notifications will be returned.
- `asFlatList` (boolean, optional, default: false) — If set to true all notifications will be returned as a flat list, otherwise they will be grouped by parent in the same manner as displayed in the UI.

### Headers

- `x-integration-name` (string, optional) — The name of the calling system passed along as a header parameter

## Response

### 200

Success

- `error` (AstroError, optional, nullable) — If the API call failed, this will contain information about the error that occurred.
- `success` (boolean, optional) — True if the API call succeeded; false otherwise.
- `hasError` (boolean, optional) — True if the API call failed.
- `statusCode` (enum, optional) — The HTTP code of the response.
  - Allowed values: `Continue`, `SwitchingProtocols`, `Processing`, `EarlyHints`, `OK`, `Created`, `Accepted`, `NonAuthoritativeInformation`, `NoContent`, `ResetContent`, `PartialContent`, `MultiStatus`, `AlreadyReported`, `IMUsed`, `MultipleChoices`, `MovedPermanently`, `Found`, `SeeOther`, `NotModified`, `UseProxy`, `Unused`, `TemporaryRedirect`, `PermanentRedirect`, `BadRequest`, `Unauthorized`, `PaymentRequired`, `Forbidden`, `NotFound`, `MethodNotAllowed`, `NotAcceptable`, `ProxyAuthenticationRequired`, `RequestTimeout`, `Conflict`, `Gone`, `LengthRequired`, `PreconditionFailed`, `RequestEntityTooLarge`, `RequestUriTooLong`, `UnsupportedMediaType`, `RequestedRangeNotSatisfiable`, `ExpectationFailed`, `MisdirectedRequest`, `UnprocessableEntity`, `Locked`, `FailedDependency`, `UpgradeRequired`, `PreconditionRequired`, `TooManyRequests`, `RequestHeaderFieldsTooLarge`, `UnavailableForLegalReasons`, `InternalServerError`, `NotImplemented`, `BadGateway`, `ServiceUnavailable`, `GatewayTimeout`, `HttpVersionNotSupported`, `VariantAlsoNegotiates`, `InsufficientStorage`, `LoopDetected`, `NotExtended`, `NetworkAuthenticationRequired`
- `data` (NotificationResponseDto, optional) — Information about notifications for the current user. A notification represents a message sent to a user to inform them of relevant actions or events within their workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more than 1,000 pending notifications some old notifications will be deleted automatically.

## Types

### AstroError

Information about an error that occurred within the ProjectManager API.

- `technicalError` (string, optional, nullable) — A technical description of the error that occurred. Not suitable for display to end users.
- `additionalErrors` (list of string, optional, nullable) — If additional errors beyond the main error in `Message` occurred, they will be listed here as individual messages.
- `validationErrors` (map from string to list of string, optional, nullable) — This contains a dictionary of validation errors. The key is the name of the field
- `message` (string, optional, nullable) — A description of the error that occurred. If your application has a user interface, show this message to explain what went wrong.

### NotificationResponseDto

Information about notifications for the current user. A notification represents a message sent to a user to inform them of relevant actions or events within their workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more than 1,000 pending notifications some old notifications will be deleted automatically.

- `items` (list of NotificationDto, optional) — The most recent notifications pending for the current user. If no notifications are pending for the current user, this will be an empty array. If there are more than 1,000 notifications this list may be truncated to only the 1,000 most recent notifications.
- `totalCount` (integer, optional) — The total number of pending notifications for the current user, including both read and unread.
- `unreadCount` (integer, optional) — The number of unread notifications for the current user.

### NotificationDto

A notification represents a message sent to a user to inform them of relevant actions or events within their workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more than 1,000 pending notifications some old notifications will be deleted automatically.

- `id` (string, optional) — The unique identifier of this notification
- `senderId` (string, optional) — The unique identifier of the sender of this notification
- `children` (list of NotificationDto, optional, nullable) — If you received multiple notifications from the same user in a short period of time, they will be grouped together. For example, if you receive multiple notifications about users joining the same project, they will be grouped together in the Children element.
- `notificationType` (string, optional) — A friendly category or type for this notification
- `createDate` (string, optional) — Timestamp when the notification was sent
- `subject` (string, optional) — User readable subject line for the notification
- `message` (string, optional) — User readable message content for the notification
- `readDate` (string, optional, nullable) — Timestamp when the notification was acknowledged as read
- `data` (NotificationDataDto, optional) — A string containing JSON-encoded extra data for the notification

### NotificationDataDto

Contains the optional data associated with the notifcation.

- `taskId` (string, optional, nullable) — Set if the notification is related to a task
- `projectId` (string, optional, nullable) — Set if the notification is related to a project
- `taskShortId` (string, optional, nullable) — set if the notification is related to a task
- `projectShortId` (string, optional, nullable) — set if the notification is related to a project
- `projectName` (string, optional, nullable) — Name of the project the notification is related to
- `taskName` (string, optional, nullable) — Name of the task this notification is related to
- `senderFirstName` (string, optional, nullable) — Firstname of the person initiating the notification
- `assigneeId` (string, optional, nullable) — Assignee for the notification
- `view` (string, optional, nullable) — View
- `shareId` (string, optional, nullable) — Id for the shared item
- `fileName` (string, optional, nullable) — Name of the file

## Examples

**Response**

```json
{
  "error": {
    "technicalError": "string",
    "additionalErrors": [
      "string"
    ],
    "validationErrors": {},
    "message": "string"
  },
  "success": true,
  "hasError": true,
  "statusCode": "Continue",
  "data": {
    "items": [
      {
        "id": "string",
        "senderId": "string",
        "children": [
          null
        ],
        "notificationType": "string",
        "createDate": "2024-01-15T09:30:00Z",
        "subject": "string",
        "message": "string",
        "readDate": "2024-01-15T09:30:00Z",
        "data": {
          "taskId": "string",
          "projectId": "string",
          "taskShortId": "string",
          "projectShortId": "string",
          "projectName": "string",
          "taskName": "string",
          "senderFirstName": "string",
          "assigneeId": "string",
          "view": "string",
          "shareId": "string",
          "fileName": "string"
        }
      }
    ],
    "totalCount": 1,
    "unreadCount": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.projectmanager.com/api/data/notifications"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.projectmanager.com/api/data/notifications';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.projectmanager.com/api/data/notifications"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.projectmanager.com/api/data/notifications")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.projectmanager.com/api/data/notifications")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.projectmanager.com/api/data/notifications', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.projectmanager.com/api/data/notifications");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.projectmanager.com/api/data/notifications")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```