---
title: "Seed an owner user into an existing organization (internal)"
method: POST
path: "/v1/users/setup"
tags: ["Internal"]
---

# Seed an owner user into an existing organization (internal)

`POST /v1/users/setup`

## Request

- Base URL: `https://identity-api.paymongo.com`
- URL: `https://identity-api.paymongo.com/v1/users/setup`
- Auth: API key in header `X-Internal-Api-Key`

Upserts a user attached to organization_id. If a non-deleted user already exists for the org, identity columns are overwritten; otherwise a new owner user is created with a randomly-generated password.

## Request body

- UserSetupUserRequestDTO
  - `accepted_terms` boolean
  - `contact_number` string
  - `email` string, required
  - `enforce_unique_contact_number` boolean: EnforceUniqueContactNumber opts into rejecting a contact_number already used by a different organization (409), mirroring the cross-org mobile- number rule gateway-api enforces for consumer accounts. Optional, defaults to false so existing callers are unaffected.
  - `first_name` string, required
  - `last_name` string, required
  - `organization_id` string, required

## Response `200`

OK

- object: Standard response containing data and its metadata if any
  - `data` UserSetupUserResponseDTO
    - `created` boolean
    - `email` string
    - `organization_id` string
    - `user_id` string
  - `has_more` boolean

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `409`: Conflict
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/paymongo/apis/identity.md) - [All operations](https://skmtc.dev/paymongo/apis/identity/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/identity/revisions/cc3056164874?raw)
