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

# POST /api/user/

`POST /api/user/`

Creates a new user based on the provided values. If desired an authentication JWT can be generated right away. After creating an account the initial workspace containing a database is created.

## Request body

- Register
  - `name` string, required
  - `email` string, email, required — The email address is also going to be the username.
  - `password` string, required
  - `language` string — An ISO 639 language code (with optional variant) selected by the user. Ex: en-GB.
  - `authenticate` boolean — Indicates whether an authentication JWT should be generated and be included in the response.
  - `workspace_invitation_token` string — If provided and valid, the user accepts the workspace invitation and will have access to the workspace after signing up.
  - `template_id` integer — The id of the template that must be installed after creating the account. This only works if the `workspace_invitation_token` param is not provided.
  - `captcha_token` string — The captcha response token, required when captcha is enabled.

## Response `200`

- union
  - object
    - `user` object — An object containing information related to the user.
      - `first_name` string — The first name of related user.
      - `username` string, email — The username of the related user. This is always an email address.
      - `language` string — An ISO 639 language code (with optional variant) selected by the user. Ex: en-GB.
    - `token` string — Deprecated. Use the `access_token` instead.
    - `access_token` string — 'access_token' can be used to authorize for other endpoints that require authorization. This token will be valid for 10 minutes.
    - `refresh_token` string — 'refresh_token' can be used to get a new valid 'access_token'. This token will be valid for 168 hours.
  - object
    - `two_factor_auth` string — The type of the two factor auth that is required to perform.
    - `token` string — The temporary token for verifying authentication using 2fa.

## Other responses

- `400`
- `404`

---

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