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

# Create a new user

`POST /users`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/users`
- Auth: HTTP bearer

Create a new internal user (Admin or Cohort Manager). An invitation email will be sent.

## Request body

- CreateUserInput
  - `email` string, email, required
  - `first_name` string, required
  - `last_name` string, required
  - `persona` 'internal_admin' | 'internal_user', required
  - `job_title` string, required
  - `department` string, required

## Response `201`

User created successfully

- object
  - `success` boolean
  - `data` InternalUser
    - `id` string, uuid
    - `email` string, email
    - `first_name` string
    - `last_name` string
    - `job_title` string
    - `department` string
    - `phone` string
    - `avatar_url` string
    - `is_active` boolean
    - `last_login_at` string, date-time
    - `created_at` string, date-time
    - `persona` 'internal_admin' | 'internal_user'
    - `persona_display` 'Admin' | 'Cohort Manager'
  - `message` string

## Other responses

- `400`: Bad request - validation error
- `401`: Unauthorized
- `409`: Conflict - email already exists

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
