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

# Marquer les notifications comme lues

PATCH https://workflow-manager/api/unreadNotifications
Content-Type: application/x-www-form-urlencoded

Marque toutes les notifications comme lues.

Aucun. Autorisés : le propriétaire.

Reference: https://docs.goodflag.com/wm/api-reference/documentation-api/token-portail/notifications/read-notifications

## Authentication

- `Authorization` header (bearer token, required) — Authentification Bearer par jeton utilisateur ou jeton d'accès : `Authorization: Bearer <token>`.

## Request

### Query parameters

- `text` (string, optional) — Le texte à rechercher.
- `items.id` (string, optional) — La ou les valeurs de filtre du champ id.
- `items.tenantId` (string, optional) — La ou les valeurs de filtre du champ tenantId.
- `items.userId` (string, optional) — La ou les valeurs de filtre du champ userId.
- `items.email` (string, optional) — La ou les valeurs de filtre du champ email.
- `items.creator` (string, optional) — La ou les valeurs de filtre du champ creator.
- `items.workflowId` (string, optional) — La ou les valeurs de filtre du champ workflowId.
- `items.stepId` (string, optional) — La ou les valeurs de filtre du champ stepId.
- `items.eventType` (string, optional) — La ou les valeurs de filtre du champ eventType.
- `items.isUnread` (string, optional) — La ou les valeurs de filtre du champ isUnread.
- `items.jobOperation` (string, optional) — La ou les valeurs de filtre du champ jobOperation.
- `items.jobErrorCode` (string, optional) — La ou les valeurs de filtre du champ jobErrorCode.
- `items.created` (string, optional) — La ou les valeurs de filtre du champ created.
- `items.updated` (string, optional) — La ou les valeurs de filtre du champ updated.
- `items.sendingState` (string, optional) — La ou les valeurs de filtre du champ sendingState.

### Body (application/x-www-form-urlencoded)

This endpoint expects a string.

- `string`

## Response

### 200

Notifications marquées comme lues.

- File download.

## Errors

### 400 Bad Request Error

InvalidFilterField : Un paramètre de filtre porte un nom de champ incorrect. ; InvalidFilterValue : Un paramètre de filtre porte une valeur incorrecte.

- `status` (integer, required) — Le code de statut HTTP.
- `error` (string, required) — Le message de statut HTTP.
- `message` (string, required) — Le message d'erreur.
- `code` (string, required) — Le code d'erreur.

### 403 Forbidden Error

AuthenticatedUserDisabled : L'utilisateur authentifié est désactivé. ; MissingBearerToken : Un jeton Bearer est requis. ; TenantInactive : Le tenant est inactif et n'autorise aucune opération. ; UserGroupDisabled : Le groupe de l'utilisateur spécifié est désactivé. ; UserNotAllowed : L'utilisateur authentifié n'est pas autorisé à effectuer cette opération.

- `status` (integer, required) — Le code de statut HTTP.
- `error` (string, required) — Le message de statut HTTP.
- `message` (string, required) — Le message d'erreur.
- `code` (string, required) — Le code d'erreur.

## Examples

**Request**

```json
"string"
```

**SDK Code**

```python
import requests

url = "https://workflow-manager/api/unreadNotifications"

payload = ""
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.patch(url, data=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://workflow-manager/api/unreadNotifications';
const options = {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: new URLSearchParams('')
};

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://workflow-manager/api/unreadNotifications"

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	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://workflow-manager/api/unreadNotifications")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'

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.patch("https://workflow-manager/api/unreadNotifications")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://workflow-manager/api/unreadNotifications', [
  'form_params' => null,
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/x-www-form-urlencoded',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://workflow-manager/api/unreadNotifications");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/x-www-form-urlencoded"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://workflow-manager/api/unreadNotifications")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```