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

# Update the banner

PUT http://localhost:3000/customization/banner
Content-Type: application/json

Updates the banner.

Reference: https://docs.itential.com/itential-platform/6/api-reference/customization/update-banner

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.

## Request

### Body (application/json)

This endpoint expects an object.

- `active` (boolean, required) — A flag indicating if the banner will be displayed to users
- `text` (string, required) — Text in the banner when displayed
- `dismissible` (boolean, required) — A flag indicating if a banner should be dismissible by users
- `startTime` (string, required) — An ISO Timestring value indicating when the banner will show
- `allPages` (boolean, required) — A flag indicating if the banner should show on all pages or only the IAP home page
- `_id` (string, optional) — String representation of a MongoDB ObjectId
- `backgroundColor` (string, optional) — The background color for the banner displayed
- `endTime` (string, optional) — A, ISO Timestring value indicating when the banner will no longer show
- `image` (string, optional) — A base64 image string containing the image that will be shown on the banner
- `messageLastUpdated` (string, optional) — An ISO Timestring value indicating when the banner message was last updated

## Response

### 200

The result from the database

- `status` (enum, optional) — The status of the API request.
  - Allowed values: `OK`, `Created`
- `message` (string, optional) — Message containing either confirmation of the operation or the reason for the failure of the operation.

## Errors

### 500 Internal Server Error

Error response from API

- `any`

## Examples

**Request**

```json
{
  "active": true,
  "text": "string",
  "dismissible": true,
  "startTime": "2018-08-02T15:56:12.912Z",
  "allPages": true
}
```

**Response**

```json
{
  "status": "OK",
  "message": "A sample success message"
}
```

**SDK Code**

```python
import requests

url = "http://localhost:3000/customization/banner"

payload = {
    "active": True,
    "text": "string",
    "dismissible": True,
    "startTime": "2018-08-02T15:56:12.912Z",
    "allPages": True
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:3000/customization/banner';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: '{"active":true,"text":"string","dismissible":true,"startTime":"2018-08-02T15:56:12.912Z","allPages":true}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:3000/customization/banner"

	payload := strings.NewReader("{\n  \"active\": true,\n  \"text\": \"string\",\n  \"dismissible\": true,\n  \"startTime\": \"2018-08-02T15:56:12.912Z\",\n  \"allPages\": true\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Content-Type", "application/json")

	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("http://localhost:3000/customization/banner")

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

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"active\": true,\n  \"text\": \"string\",\n  \"dismissible\": true,\n  \"startTime\": \"2018-08-02T15:56:12.912Z\",\n  \"allPages\": true\n}"

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.put("http://localhost:3000/customization/banner")
  .header("Content-Type", "application/json")
  .body("{\n  \"active\": true,\n  \"text\": \"string\",\n  \"dismissible\": true,\n  \"startTime\": \"2018-08-02T15:56:12.912Z\",\n  \"allPages\": true\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'http://localhost:3000/customization/banner', [
  'body' => '{
  "active": true,
  "text": "string",
  "dismissible": true,
  "startTime": "2018-08-02T15:56:12.912Z",
  "allPages": true
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("http://localhost:3000/customization/banner");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": true,\n  \"text\": \"string\",\n  \"dismissible\": true,\n  \"startTime\": \"2018-08-02T15:56:12.912Z\",\n  \"allPages\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "active": true,
  "text": "string",
  "dismissible": true,
  "startTime": "2018-08-02T15:56:12.912Z",
  "allPages": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:3000/customization/banner")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```