# Get the sending rules

> Pacing, new people per day, quiet hours, stop words, expiry and which chats the Mac copies.

`GET /v1/settings`

Pacing, new people per day, quiet hours, stop words, expiry and which chats the Mac copies.

Needs a key with the `account:read` scope. [Keys and scopes](https://usebluebot.com/docs/concepts/api-keys)

## Example

```bash
curl "https://usebluebot.com/api/v1/settings" \
  -H "Authorization: Bearer $BLUEBOT_API_KEY"
```

```ts
import BlueBot from '@usebluebot/sdk';

const client = new BlueBot({ apiKey: process.env.BLUEBOT_API_KEY });

const settings = await client.settings.get();
console.log(settings);
```

```python
import os
from bluebot import BlueBot

client = BlueBot(api_key=os.environ["BLUEBOT_API_KEY"])

settings = client.settings.get()
print(settings)
```

## Response

`200`: The settings.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | "settings" | Yes |   |
| `business_name` | string or null | Yes | Your business’s name, which `{{business}}` fills in. Null until you set it; texts that would name the business leave it out until then. |
| `time_zone` | string | Yes | The zone quiet hours and daily limits are read in. |
| `pace_seconds` | integer | Yes | Seconds between two texts leaving the Mac, 5 to 300. |
| `new_people_per_day` | integer | Yes | How many people you have never texted with BlueBot may be texted in a day, 0 to 1,000. |
| `quiet_hours` | object | Yes |   |
| `quiet_hours.enabled` | boolean | Yes |   |
| `quiet_hours.start` | string | Yes | When quiet hours start, in `time_zone`. |
| `quiet_hours.end` | string | Yes | When they end. |
| `smart_quiet_hours` | boolean | Yes | Read quiet hours in the recipient’s zone, from their area code, where BlueBot knows it. |
| `stop_words` | object | Yes |   |
| `stop_words.enabled` | boolean | Yes | Whether a reply of only a stop word puts the person on the stop list. |
| `stop_words.words` | array of strings | Yes | The stop words: your own list, or the defaults when `custom` is false. |
| `stop_words.custom` | boolean | Yes | Whether you changed the list. False means BlueBot’s defaults. |
| `stop_words.start_words` | array of strings | Yes | Words that take a person who stopped by reply off the list again. |
| `expiry_hours` | integer | Yes | A text still waiting this long after it was due expires, 1 to 168. |
| `inbound_mode` | string | Yes | Which chats the Mac copies to BlueBot: `replies` (people BlueBot has texted) or `everything`. One of `replies`, `everything` |
| `paused_until` | timestamp or null | Yes | While you have sending paused, until when. |
| `platform_daily_limit` | integer | Yes | BlueBot’s ceiling on texts a day, which you can’t change. |
| `warnings` | array of strings | Yes | Things worth knowing about these settings, in words. |

The answer, `200`:

```json
{
  "object": "settings",
  "business_name": "Dana Realty",
  "time_zone": "America/Chicago",
  "pace_seconds": 20,
  "new_people_per_day": 50,
  "quiet_hours": {
    "enabled": true,
    "start": "21:00",
    "end": "08:00"
  },
  "smart_quiet_hours": false,
  "stop_words": {
    "enabled": true,
    "words": [
      "stop",
      "stopall",
      "unsubscribe",
      "cancel",
      "end",
      "quit"
    ],
    "custom": false,
    "start_words": [
      "start",
      "unstop",
      "yes"
    ]
  },
  "expiry_hours": 24,
  "inbound_mode": "replies",
  "paused_until": null,
  "platform_daily_limit": 1000,
  "warnings": []
}
```

## Errors

Every refusal has the same envelope and a page of its own. These are the ones this operation can give.

| Code                                                    | Status | What it means                                                                                                                               |
| ------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| [`unauthorized`](https://usebluebot.com/docs/errors/unauthorized)             | 401    | The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API.                           |
| [`insufficient_scope`](https://usebluebot.com/docs/errors/insufficient_scope) | 403    | The key doesn’t carry the scope the endpoint needs. Each endpoint’s reference names its scope.                                              |
| [`rate_limited`](https://usebluebot.com/docs/errors/rate_limited)             | 429    | Too many requests. A key may make 120 requests a minute. The `RateLimit` header says how many are left, and `Retry-After` how long to wait. |
| [`internal`](https://usebluebot.com/docs/errors/internal)                     | 500    | Something went wrong on BlueBot’s side. It was reported. Send the request again; with an Idempotency-Key that is always safe.               |

## Try it
