# Set the founder's passphrase (first run only).

> For the dashboard.
> https://koi.dog/docs/api/session/setup-session/

`POST /api/v1/session/setup` · Key: `none`

Sets the session cookie. Needs an allowed Origin. An install that signs in with Clerk has no passphrase and answers `409 passphrase_disabled`. No path or query parameters.

## Headers.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | `string` | no | Makes a retry safe: the same key with the same request returns the first answer and does nothing else. |

## Body.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `passphrase` | `string` | yes | The passphrase that signs in to the dashboard. Only while the server has none. At least 10 characters. |

## Response.

200 OK: a JSON object. The example has placeholder values.

- **422 validation_failed**: The body does not match its schema; each problem is in `details`.

## Request.

```sh
curl -X POST https://app.koi.dog/api/v1/session/setup \
    -H "Origin: https://app.koi.dog" \
    -H "Content-Type: application/json" \
    -d '{
      "passphrase": "<at least 10 characters>"
    }'
```

```js
const res = await fetch("https://app.koi.dog/api/v1/session/setup", {
  method: "POST",
  headers: {
    Origin: "https://app.koi.dog",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    passphrase: "<at least 10 characters>",
  }),
});
console.log(await res.json());
```

```python
import requests

r = requests.post(
    "https://app.koi.dog/api/v1/session/setup",
    headers={
        "Origin": "https://app.koi.dog",
    },
    json={
        "passphrase": "<at least 10 characters>",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "authenticated": false,
  "setupRequired": false,
  "installId": "string",
  "version": "string",
  "auth": "passphrase",
  "clerkPublishableKey": "string"
}
```
