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

# Read Settings

> Reads the instance behavior settings

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** yes

## Description

Returns the 7 instance behavior flags: call rejection, ignore groups, keep online, mark as read, history sync, ignore status.

## Example

Performs a `GET` on the instance path and returns the `settings` object with all current flags. No query params are accepted, only the name in the path and the `token` in the header.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://ryzeapi.cloud/api/instance/getSettings/my-instance" \
    -H "token: $Token_Instance"
  ```

  ```javascript JavaScript theme={null}
  await fetch("https://ryzeapi.cloud/api/instance/getSettings/my-instance", {
    method: "GET",
    headers: {
      "token": process.env.Token_Instance
    }
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.get(
      "https://ryzeapi.cloud/api/instance/getSettings/my-instance",
      headers={
          "token": os.environ["Token_Instance"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/instance/getSettings/my-instance", nil)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

```json 200 OK theme={null}
{
  "success": true,
  "message": "Settings retrieved successfully",
  "settings": {
    "autoRejectCalls": false,
    "callRejectMessage": "",
    "ignoreGroupMessages": false,
    "keepOnlineStatus": false,
    "autoReadMessages": false,
    "disableHistorySync": true,
    "ignoreStatus": false
  }
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name.
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  TokenAccount or TokenInstance.
</ParamField>

## Fields

| Field                 | Type    | Description                              |
| --------------------- | ------- | ---------------------------------------- |
| `autoRejectCalls`     | boolean | Automatically rejects calls              |
| `callRejectMessage`   | string  | Message sent when rejecting              |
| `ignoreGroupMessages` | boolean | Ignores group events on ingestion        |
| `keepOnlineStatus`    | boolean | Keeps presence as `available`            |
| `autoReadMessages`    | boolean | Marks received messages as read          |
| `disableHistorySync`  | boolean | Disables history sync (default `true`)   |
| `ignoreStatus`        | boolean | Ignores "status" type messages (stories) |

## Errors

| HTTP | `error.message`                         | When                      |
| :--: | --------------------------------------- | ------------------------- |
|  401 | `Invalid token`                         | Token missing or invalid. |
|  404 | `Instance not found`                    | Name does not exist.      |
|  429 | `Rate limit exceeded. Try again later.` | More than 100 req/min.    |
|  500 | `Failed to get settings configuration`  | Database error.           |

```json theme={null}
{
  "success": false,
  "error": {
    "message": "Instance not found"
  }
}
```

## Next

<CardGroup cols={2}>
  <Card title="Update settings" icon="pen-to-square" href="/en/api/instance/settings-update">
    `POST /api/instance/settings/:instance` to change.
  </Card>
</CardGroup>
