---
title: "Lookup Account"
method: POST
path: "/api/v1/accounts/lookup"
tags: ["Accounts"]
---

# Lookup Account

`POST /api/v1/accounts/lookup`

Resolve a user UUID to its credit wallet, creating it on first sight.

Get-or-create, so a brand-new user always has a uuid to submit with. A
created account starts at zero credits — exactly the account POST /videos
would have provisioned — so `can_upload` is false until credits are bought.

``user_id`` is the canonical billing key. Email and org_id remain supported
only as legacy lookup inputs.

## Headers

- `x-api-key` string, required — Required API key issued by Preciser.
- `League` string, required — Required tenant/database selector, for example pitchbio-master.

## Request body

- union — Request schema for account lookup (POST /api/v1/accounts/lookup).
  - object
    - `user_id` string, uuid, nullable, required — Glory League user UUID and current billing key. Send this to create or read the same wallet used by POST /videos.
    - `email` string, nullable — Optional end-user email retained as a lookup handle for legacy accounts. Matched case-insensitively.
    - `org_id` string, nullable — Legacy wallet id accepted for backward compatibility. New clients must use user_id; organization metadata does not control billing.
    - `jwt` string, nullable — Short-lived token Glory League issued for this user; stored for reference when the account is first created.
    - `video_uuid` string, uuid, nullable — Optional video UUID. When supplied, the response includes the return URL previously bound to this user and video, if any.
  - object
    - `user_id` string, uuid, nullable — Glory League user UUID and current billing key. Send this to create or read the same wallet used by POST /videos.
    - `email` string, nullable, required — Optional end-user email retained as a lookup handle for legacy accounts. Matched case-insensitively.
    - `org_id` string, nullable — Legacy wallet id accepted for backward compatibility. New clients must use user_id; organization metadata does not control billing.
    - `jwt` string, nullable — Short-lived token Glory League issued for this user; stored for reference when the account is first created.
    - `video_uuid` string, uuid, nullable — Optional video UUID. When supplied, the response includes the return URL previously bound to this user and video, if any.
  - object
    - `user_id` string, uuid, nullable — Glory League user UUID and current billing key. Send this to create or read the same wallet used by POST /videos.
    - `email` string, nullable — Optional end-user email retained as a lookup handle for legacy accounts. Matched case-insensitively.
    - `org_id` string, nullable, required — Legacy wallet id accepted for backward compatibility. New clients must use user_id; organization metadata does not control billing.
    - `jwt` string, nullable — Short-lived token Glory League issued for this user; stored for reference when the account is first created.
    - `video_uuid` string, uuid, nullable — Optional video UUID. When supplied, the response includes the return URL previously bound to this user and video, if any.

## Response `200`

Successful Response

- GLAccountResponse — An account's identity + credit balance.
  - `user_id` string, required — User UUID — send this as user_id on POST /videos and in the JWT
  - `org_id` string, nullable — Deprecated wallet-id alias retained for legacy clients
  - `org_name` string, required — Legacy account handle; normally blank for user-id wallets
  - `video_quota` integer, required — Credits ever granted to this account
  - `video_usage` integer, required — Credits finalized and already spent
  - `video_reserved` integer, required — Credits temporarily held by videos awaiting game info; these are not spent yet but are unavailable to another concurrent upload
  - `remaining` integer, required — Unspent and unreserved credits left (never negative)
  - `can_upload` boolean, required — False means the next POST /videos returns payment_required — send the user to the purchase page first
  - `return_url` string, nullable — HTTPS return URL bound to the requested user and video UUID, if one was supplied with POST /videos.

## Other responses

- `422` — Validation Error

---

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