---
title: "Register User"
method: POST
path: "/v1/register-web"
tags: ["users"]
---

# Register User

`POST /v1/register-web`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/register-web`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/register-web/post.ts> (a function with typed inputs; its response is checked against the schema)

Register the caller's Google OAuth connection.

Args:
    http_request: Incoming request.
    request: Registration payload.
    auth: Authenticated caller.
    service: User service.

Returns:
    Registration response.

Raises:
    HTTPException: If captcha, token, encryption, or identity validation fails.

## Request body

- UserRegistrationRequest: Request for user registration with Google OAuth. The user's email and full name are intentionally NOT accepted from the client — the brain always sources them from the immutable Supabase auth identity (JWT email + ``auth.users.user_metadata``). Accepting them from the request body was a phishing primitive (ENG-1214) that allowed any authenticated user to overwrite ``public.users.email`` for their own row with an arbitrary string, e.g. another user's address.
  - `refresh_token` string, required
  - `twitter_url` string, nullable
  - `linkedin_url` string, nullable
  - `captcha_token` string, nullable

## Response `200`

Successful Response

- UserRegistrationResponse: Response for user registration.
  - `success` boolean, required
  - `message` string, required
  - `connection_id` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/register-web/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
