---
title: "Create a managed user"
method: POST
path: "/workspace/users"
tags: ["Workspace"]
---

# Create a managed user

`POST /workspace/users`

Create a new managed user under your workspace.
The user can then connect their social accounts via a connection URL.

**Requires Workspace access - contact serge@publora.com to enable.**

## Request body

- object
  - `username` string, email, required — User's email address (must be unique)
  - `displayName` string — Display name (defaults to email if not provided)

## Response `201`

User created

- object
  - `user` ManagedUser
    - `_id` string — User ID
    - `username` string — User email
    - `displayName` string
    - `role` 'managed'
    - `dailyPostsLeft` integer
    - `connectionsPageUrl` string, uri, nullable — URL for user to connect their social accounts
    - `connectionsPageTokenExpiresAt` string, date-time, nullable

## Other responses

- `400` — Missing required fields
- `403` — Workspace access not enabled
- `409` — An account with this email already exists. The response includes `userId` and membership fields (`attachable`, `requiresConsent`, `reason`, `alreadyInWorkspace`, `managedByAnotherWorkspace`). When `attachable: true`, attach the user via POST /workspace/users/attach.
- `500` — Server error

---

[API](https://skmtc.dev/publora/apis/publora-api.md) · [All operations](https://skmtc.dev/publora/apis/publora-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/publora/publora-api/revisions/a1534a88d80a/schema)
