---
title: "Provision User"
method: POST
path: "/api/internal/provision-user"
tags: ["internal"]
---

# Provision User

`POST /api/internal/provision-user`

## Request

- Base URL: `https://api.tintin-x.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tintin-x.com/api/internal/provision-user`
- Auth: none declared

Idempotently provision a headless platform account (User + Wallet) for an
external first-party surface — currently the Shopify app bridge, which maps
each shop to one Tintin user so it can reuse the studio-credit REST APIs
(nail-art / try-on) with a self-minted user JWT.

Idempotent on `email`: re-provisioning an existing shop returns the same
``user_id`` (``created=False``) and does NOT re-grant credits. A Wallet row
is ALWAYS ensured — the gateway's studio-credit debit 404s without one — but
it starts empty unless ``bonus_credits`` is passed (granted once, on
creation).

Deliberately does NOT reuse ``auth._create_user_with_wallet``: that path
fires a welcome email + attaches transfer invites, neither of which is
wanted for a synthetic shop address. X-Internal-Key gated (VPC-internal),
same as the other internal endpoints.

## Request body

- ProvisionUserRequest
  - `email` string, required
  - `bonus_credits` integer

## Response `200`

Successful Response

- ProvisionUserResponse
  - `user_id` string, required
  - `created` boolean, required
  - `studio_bonus_credits` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tintin-x/apis/tintin-api.md) · [All operations](https://skmtc.dev/tintin-x/apis/tintin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tintin-x/apis/tintin-api/revisions/8839a8d0a66c?raw)
