---
title: "POST /api/setup"
method: POST
path: "/api/setup"
tags: ["/api/setup"]
---

# POST /api/setup

`POST /api/setup`

Special endpoint for creating the first user during setup. This endpoint both creates the user AND logs them in and
  returns a session ID. This endpoint can also be used to set specific settings from the setup flow.

## Request body

- object
  - `prefs` object, required
    - `site_locale` string, nullable — String must be a valid two-letter ISO language or language-country code e.g. 'en' or 'en_US'.
    - `site_name` string, required
  - `token` string, required — Token does not match the setup token.
  - `user` object, required
    - `email` string, required — value must be a valid email address.
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `password` string, required — password is too common.

## Response `2XX`

Successful response

## Other responses

- `4XX` — Client error response
- `5XX` — Server error response

---

[API](https://skmtc.net/metabase/apis/metabase-api.md) · [All operations](https://skmtc.net/metabase/apis/metabase-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metabase/metabase-api/revisions/08b5a2bafb4f/schema)
