:::endpoint GET /v1/admin/settings/support

Support settings on the website, as one object: who answers a new ticket, how
the assistant sounds, what `/contact` on the firm's domain shows, how long a
ticket waiting on the trader stays open, and which mails the trader gets about
it. With it come what the screen needs to explain the settings: whether the
assistant can answer at all right now, how many people and tickets the
settings reach, and the firm's FAQ the assistant answers from.

The assistant and the two mails are kept where the AI Settings and Email
templates screens keep them, so each needs that screen's permission to read
and is null without it. `can` says what this person may change with
[change support settings](/docs/api/admin/support-settings-update).

Needs a firm. Our own staff name one with the `Propper-Workspace` header.

## Request

```bash
curl "https://api.proppertrading.com/v1/admin/settings/support" \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme"
```

## Response

```json
{
    "data": {
        "object": "support_settings",
        "mode": "ai_first",
        "external_contact_url": "https://help.acme.com/contact",
        "support_email": "support@acme.com",
        "support_phone": "+1 12 34 56 78",
        "support_address": "67 trading street",
        "auto_close_enabled": true,
        "auto_close_warn_after_days": 5,
        "auto_close_after_warning_days": 2,
        "modes": [
            "ai_first",
            "human_only",
            "disabled"
        ],
        "limits": {
            "default_warn_after_days": 5,
            "default_after_warning_days": 2,
            "max_warn_after_days": 60,
            "max_after_warning_days": 30
        },
        "assistant": {
            "name": "AI",
            "personality": "friendly",
            "instructions": "Always say \"WSUP!\" as your start message.",
            "personalities": [
                "professional",
                "casual",
                "friendly",
                "custom"
            ],
            "in_chat": {
                "traders": true,
                "team": true
            }
        },
        "ai": {
            "available": true,
            "reason": null,
            "resets_at": null
        },
        "mail": {
            "reply": {
                "type": "ticket_reply",
                "enabled": true,
                "subject": "New reply on your support ticket"
            },
            "idle_warning": {
                "type": "ticket_idle_warning",
                "enabled": true,
                "subject": "Your support ticket is waiting for you"
            }
        },
        "reach": {
            "agents": 2,
            "waiting": 7,
            "with_assistant": 2,
            "with_trader": 4
        },
        "faqs": {
            "total": 5,
            "questions": [
                "How do I start a challenge?",
                "What happens if I breach a rule?",
                "How do payouts work?"
            ]
        },
        "domain": "dashboard.acme.com",
        "can": {
            "manage": true,
            "assistant": true,
            "mail": true,
            "tickets": true,
            "faqs": true
        },
        "action_url": "/admin/settings/support"
    },
    "meta": {
        "request_id": "req_01m50v31j6n89srqt209k71ytt"
    }
}
```

| Field                           | Description |
| ------------------------------- | ----------- |
| `mode`                          | `ai_first`: the assistant answers every new ticket and hands it to the team when it cannot help. `human_only`: every new ticket goes to the team. `disabled`: traders cannot open a ticket or read the ones they have. It decides who answers new tickets, never a conversation already going |
| `external_contact_url`          | Where `/contact` sends everybody. Null for the firm's own contact page |
| `support_email`, `support_phone`, `support_address` | The contact details on the firm's own contact page. Kept, but shown to nobody, while `/contact` sends people elsewhere |
| `auto_close_enabled`            | Quiet tickets close by themselves. A ticket waiting on the trader is warned after `auto_close_warn_after_days` of silence, and closes `auto_close_after_warning_days` after that warning unless the trader answers |
| `auto_close_warn_after_days`, `auto_close_after_warning_days` | The numbers in force: the platform's defaults while the firm never chose its own |
| `modes`                         | Every value `mode` takes |
| `limits`                        | The platform's defaults for the two numbers, and the largest each may be |
| `assistant`                     | The assistant that answers in `ai_first`: its `name`, `personality` (one of `personalities`) and `instructions`. `in_chat` says whether the same assistant also answers traders and the team in the AI chat, which a change here reaches too. Null without `view_ai_settings` |
| `ai`                            | Whether the assistant can answer a ticket now. When it cannot, `reason` is `plan` (the firm's package has no AI, or we switched it off for the firm), `platform` (ours to fix) or `allowance` (the firm's AI allowance is spent until `resets_at`). `ai_first` still works then: every new ticket goes to the team |
| `mail`                          | The two mails a trader gets about a ticket, `reply` and `idle_warning`, each with its `type` under Email templates, whether it is `enabled`, and its `subject` as a trader reads it. Null without `view_email` |
| `reach`                         | How many active people may answer tickets (`agents`), and how many tickets wait for the team, are with the assistant and wait on a trader right now. Those three are null without `view_tickets` |
| `faqs`                          | How many questions of the firm's FAQ a trader gets, and the first three, as the contact page lists them. The assistant answers from the same questions |
| `domain`                        | The firm's domain, where a trader opens `/contact`. Null without one |
| `can.manage`                    | May change the mode, the contact page, the contact details and quiet tickets (`manage_support_settings`) |
| `can.assistant`                 | May also change the assistant (`manage_ai_settings`) |
| `can.mail`                      | May also switch the two mails (`manage_email`) |
| `can.tickets`, `can.faqs`       | May open Tickets and the FAQ on the website (`view_tickets`, `view_faqs`) |

## Errors

| Status | Code                      | Meaning                                                                         |
| ------ | ------------------------- | ------------------------------------------------------------------------------- |
| 400    | `workspace_required`      | Asked by our own staff without naming a firm                                    |
| 401    | `invalid_token`           | Not a token, or the secret does not match                                       |
| 401    | `revoked_token`           | Signed out here or from another device                                          |
| 401    | `expired_token`           | Ninety days without use, or a set expiry passed                                 |
| 403    | `admin_access_required`   | This account no longer helps run the environment                                |
| 403    | `insufficient_scope`      | This device does not hold `admin:read`                                          |
| 403    | `workspace_not_permitted` | The `Propper-Workspace` header names an environment this account cannot act in |
| 403    | `forbidden`               | Without `view_support_settings`                                                 |