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

# Create a new user

`POST /api/v1/users`

Creates a new record in the sandbox. Data is session-scoped and auto-expires in 30 minutes.

## Request body

- object
  - `name` string, required — Full name
  - `email` string, email, required — Email address (unique per session)
  - `role` 'user' | 'admin' | 'moderator' — User role
  - `age` integer — Age in years

## Response `201`

Default Response

- object
  - `success` boolean
  - `data` object
    - `id` string, uuid
    - `name` string
    - `email` string, email
    - `role` 'user' | 'admin' | 'moderator'
    - `age` integer, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400` — Validation failed

---

[API](https://skmtc.net/totalshiftleft/apis/api-learning-sandbox.md) · [All operations](https://skmtc.net/totalshiftleft/apis/api-learning-sandbox/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/totalshiftleft/api-learning-sandbox/revisions/3b3179c504b0/schema)
