:::endpoint POST /v1/auth/workspace

The first call an app makes, before anybody has typed a password. It turns an
address into the environment behind it, and hands back enough branding for the
sign-in screen to look like the firm it belongs to.

Needs no credential, which is the point: this is what you ask when you have none.

Accepts what somebody would actually type. `acmefunded.com`,
`https://acmefunded.com` and `https://acmefunded.com/` are the same answer.

## Request

```bash
curl https://api.proppertrading.com/v1/auth/workspace \
  -H "Content-Type: application/json" \
  -d '{"workspace": "acmefunded.com"}'
```

| Field       | Type   | Description                              |
| ----------- | ------ | ---------------------------------------- |
| `workspace` | string | The address of the environment. Required |

## Response

```json
{
    "data": {
        "object": "workspace",
        "id": "acme",
        "name": "Acme Funded",
        "platform": false,
        "branding": {
            "logo_url": "https://acmefunded.com/storage/tenants/4/branding/logo.webp",
            "logo_dark_url": null,
            "primary_color": "#3b82f6",
            "primary_color_dark": "#60a5fa"
        },
        "maintenance": false
    },
    "meta": { "request_id": "req_01kz4bkr1aj1gv63d8fv3133ey" }
}
```

| Field         | Description                                                                                                      |
| ------------- | ---------------------------------------------------------------------------------------------------------------- |
| `id`          | Send this nowhere. Sign-in takes the address again, not this id                                                  |
| `platform`    | True for Propper itself, false for a propfirm                                                                    |
| `branding`    | A fixed subset for a sign-in screen. Any field may be null, and the whole object is null when `platform` is true |
| `maintenance` | The firm is closed. Signing in will be refused until it reopens                                                  |

## Errors

| Status | Code                  | Meaning                                        |
| ------ | --------------------- | ---------------------------------------------- |
| 400    | `workspace_not_found` | Nothing is served from that address            |
| 429    | `rate_limit_exceeded` | More than 30 lookups a minute from one address |

:::note It never says whether an account exists
This endpoint knows nothing about people. It answers about domains only.
:::

:::warning Propper itself has no branding
`{"workspace": "proppertrading.com"}` answers with `"platform": true` and
`"branding": null`, not with an object of null fields. A client that reaches
straight into `branding.logo_url` crashes on the one environment our own staff
sign in on.
:::