> This page is for Applications Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.humansecurity.com/llms.txt.

# Get account settings

GET https://api-gw.perimeterx.com/v1/account-settings

Returns an object with general information about the account. 


Reference: https://docs.humansecurity.com/applications/reference/get-account-settings

## Authentication

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

## Response

### 200

Success

- `applications` (list of GetAccountSettingsApplicationsItems, optional) — The applications associated with the account.
- `accountName` (string, optional) — Name of the account.
- `alerts` (list of GetAccountSettingsAlertsItems, optional) — Array of configured alerts.

## Errors

### 401 Unauthorized Error

Access token is missing or invalid.

- `any`

### 422 Unprocessable Entity Error

Invalid or missing parameters.

- `any`

### 500 Internal Server Error

Internal error. Contact HUMAN if the error persists.

- `any`

## Types

### GetAccountSettingsApplicationsItems

- `app_id` (string, optional) — The ID of an application.
- `name` (string, optional) — The name of the application.
- `enabled` (boolean, optional) — Whether the application is enabled.
- `hostDomains` (list of GetAccountSettingsApplicationsItemsHostDomainsItems, optional) — Host domain and last created baseline date pairs associated with the given `app_id`.
- `csm_enabled` (boolean, optional) — Whether Client-Side Mitigation (CSM) is enabled.
- `sensor_version` (string, optional) — The account's sensor version.
- `muvs` (map from string to integer, optional) — Object of month: number of monthly unique visitors (MUVs) key: value pairs.
- `account_name` (string, optional) — Name of the account.

### GetAccountSettingsAlertsItems

- `name` (string, optional) — Name of the test.
- `type` (string, optional) — The type of alert.
- `notifications` (list of GetAccountSettingsAlertsItemsNotificationsItems, optional)

### GetAccountSettingsApplicationsItemsHostDomainsItems

- `domain` (string, optional)
- `last_created_baseline` (string, optional)

### GetAccountSettingsAlertsItemsNotificationsItems

- `app_id` (string, optional) — The Application ID.
- `host_domain` (string, optional)
- `notification_levels` (map from string to boolean, optional) — The notification levels that, when enabled, the alert will trigger for. `true` means the alert will trigger for that level.

## Examples

**Response**

```json
{
  "applications": [
    {
      "app_id": "PXabc123",
      "name": "HUMAN Security",
      "enabled": true,
      "hostDomains": [
        {
          "domain": "string",
          "last_created_baseline": "string"
        }
      ],
      "csm_enabled": true,
      "sensor_version": "4.1.1",
      "muvs": {
        "2022-08": 8698227,
        "2022-09": 9432064,
        "2022-10": 11399034,
        "2022-11": 15275195,
        "2022-12": 8480986,
        "2023-01": 10015053,
        "2023-02": 7668405
      },
      "account_name": "HUMAN Security"
    }
  ],
  "accountName": "HUMAN Security",
  "alerts": [
    {
      "name": "Test 1",
      "type": "email",
      "notifications": [
        {
          "app_id": "PXabc123",
          "host_domain": "domain1.com",
          "notification_levels": {
            "high": true,
            "low": false,
            "medium": false
          }
        }
      ]
    },
    {
      "name": "Test 2",
      "type": "slack",
      "notifications": [
        {
          "app_id": "PXabc123",
          "host_domain": "domain1.com",
          "notification_levels": {
            "high": true,
            "low": false,
            "medium": true
          }
        },
        {
          "app_id": "PXabc123",
          "host_domain": "domain2.com",
          "notification_levels": {
            "high": true,
            "low": false,
            "medium": false
          }
        }
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api-gw.perimeterx.com/v1/account-settings"

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

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

print(response.json())
```

```javascript
const url = 'https://api-gw.perimeterx.com/v1/account-settings';
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-gw.perimeterx.com/v1/account-settings"

	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-gw.perimeterx.com/v1/account-settings")

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-gw.perimeterx.com/v1/account-settings")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gw.perimeterx.com/v1/account-settings', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-gw.perimeterx.com/v1/account-settings");
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-gw.perimeterx.com/v1/account-settings")! 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()
```