---
title: "Store a new user"
method: POST
path: "/v1/users"
tags: ["users"]
---

# Store a new user

`POST /v1/users`

## Request

- Base URL: `https://demo.firefly-iii.org/api`
- URL: `https://demo.firefly-iii.org/api/v1/users`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://demo.firefly-iii.org/oauth/authorize`
    - Token URL: `https://demo.firefly-iii.org/oauth/token`
  - HTTP bearer

Creates a new user. The data required can be submitted as a JSON body or as a list of parameters. The user will be given a random password, which they can reset using the "forgot password" function.

## Headers

- `X-Trace-Id` string, uuid

## Request body

- User
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `email` string, email, required: The new users email address.
  - `blocked` boolean: Boolean to indicate if the user is blocked.
  - `blocked_code` 'email_changed' | 'null', string, nullable: If you say the user must be blocked, this will be the reason code.
  - `role` 'owner' | 'demo' | 'null', string, nullable: Role for the user. Can be empty or omitted.

## Response `200`

New user stored, result in response.

- UserSingle
  - `data` UserRead, required
    - `type` string, string, required: Immutable value
    - `id` string, string, required
    - `attributes` User, required
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `email` string, email, required: The new users email address.
      - `blocked` boolean: Boolean to indicate if the user is blocked.
      - `blocked_code` 'email_changed' | 'null', string, nullable: If you say the user must be blocked, this will be the reason code.
      - `role` 'owner' | 'demo' | 'null', string, nullable: Role for the user. Can be empty or omitted.
    - `links` ObjectLink, required
      - `0` object
        - `rel` string, string
        - `uri` string, string
      - `self` string, uri

## Other responses

- `400`: Bad request
- `401`: Unauthenticated
- `404`: Page not found
- `422`: Validation error. The body will have the exact details.
- `500`: Internal exception

---

[API](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-8.md) - [All operations](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-8/llms.txt) - [OpenAPI document](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-8/revisions/bf6c71da53e3?raw)
