:::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,
        "url": "https://acmefunded.com",
        "branding": {
            "logo_url": "https://acmefunded.com/storage/tenants/4/branding/logo.webp",
            "logo_dark_url": null,
            "icon_url": null,
            "primary_color": "#3b82f6",
            "primary_color_dark": "#60a5fa",
            "primary_foreground": "#ffffff",
            "primary_foreground_dark": "#0b1530"
        },
        "maintenance": false
    },
    "meta": { "request_id": "req_01kz4bkr1aj1gv63d8fv3133ey" }
}
```

| Field         | Description                                                                                                      |
| ------------- | ---------------------------------------------------------------------------------------------------------------- |
| `id`          | What [choosing an environment](/docs/api/apps/choose-workspace) and the `Propper-Workspace` header take. Signing in with an environment takes the address, not this id |
| `platform`    | True for Propper itself, false for a propfirm                                                                    |
| `url`         | Where its website is, for opening something from a notification there                                            |
| `branding`    | A fixed subset for a sign-in screen. Any field may be null, and the whole object is null when `platform` is true |
| `branding.icon_url` | Square, at most 512 pixels, for the firm in a small space such as a switcher. Made from the favicon the firm uploads, so null until it uploads one again after 2026-10-15, and null for a favicon uploaded as an ICO: then use the logo |
| `branding.primary_foreground` | What the firm writes on its own colour, such as the label of a button. `_dark` for dark mode. Null when the firm never set one: then pick black or white by contrast |
| `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.
:::