# Create user account

URL: /en/docs/api/v1/signup/post
Last Updated: 2026-07-30T21:15:44.962Z

## Description
No description available.

## Available Actions
- Execute POST request
- View request parameters
- View response schema
- Get code examples
- Navigate to related topics
- View step-by-step instructions
- Get best practices

## Content
### POST /api/v1/signup

**Create user account**

Creates a new user account and associated tenant in the system.
Supports multiple authentication providers including email/password and OAuth.
Includes advanced security features like CAPTCHA verification and risk assessment.

For OAuth providers (GitHub, Google), returns a redirect URL.
For email/password signup, creates the tenant and returns a session ID.

**Request body** (`application/json`) - required:

- `company_name` (string, required): Company or organization name
- `first_name` (string, required): User's first name
- `last_name` (string): User's last name (optional)
- `title` (string): User's job title (optional)
- `provider` (enum: default | github | google, required): Authentication provider to use
- `email` (string (email)): Email address (required for default provider)
- `password` (string (password)): Password (required for default provider)
- `legal_consent` (boolean): Acceptance of terms of service (required for default provider)
- `altcha_payload` (string): CAPTCHA verification payload (optional but recommended)
- `user_timezone` (string): User's timezone for verification (optional)

**Request body** (`application/x-www-form-urlencoded`) - required:

- `company_name` (string, required): Company or organization name
- `first_name` (string, required): User's first name
- `last_name` (string): User's last name (optional)
- `title` (string): User's job title (optional)
- `provider` (enum: default | github | google, required): Authentication provider to use
- `email` (string (email)): Email address (required for default provider)
- `password` (string (password)): Password (required for default provider)
- `legal_consent` (boolean): Acceptance of terms of service (required for default provider)
- `altcha_payload` (string): CAPTCHA verification payload (optional but recommended)
- `user_timezone` (string): User's timezone for verification (optional)

**Responses:**

- `200` - Account creation initiated successfully
  - `success` (boolean): Whether the signup was successful
  - `sessionId` (string): Session ID for tracking tenant creation (email signup only)
  - `redirectUrl` (string): URL to redirect user to continue the signup process

  Example (Email/password signup success):
  
  ```json
  {
  "success": true,
  "sessionId": "session_abc123",
  "redirectUrl": "/api/v1/admin/tenants/progress?session=session_abc123"
}
  ```

  Example (OAuth signup redirect):
  
  ```json
  {
  "success": true,
  "redirectUrl": "/auth/github?state=eyJjb21wYW55X25hbWUi..."
}
  ```
- `400` - Bad Request - validation failed
  - `errors` (array of object, required): List of validation or processing errors
    - `field` (string, required): Field name that caused the error
    - `message` (string, required): Human-readable error message

  Example (Validation errors):
  
  ```json
  {
  "errors": [
    {
      "field": "email",
      "message": "Valid email required"
    },
    {
      "field": "password",
      "message": "Password must be at least 8 characters"
    }
  ]
}
  ```

  Example (Missing legal consent):
  
  ```json
  {
  "errors": [
    {
      "field": "provider",
      "message": "Email, password, and legal consent required for email signup"
    }
  ]
}
  ```
- `409` - Conflict - duplicate company or email
  - `errors` (array of object, required): List of validation or processing errors
    - `field` (string, required): Field name that caused the error
    - `message` (string, required): Human-readable error message

  Example (Company name already exists):
  
  ```json
  {
  "errors": [
    {
      "field": "company_name",
      "message": "A company with this name already exists"
    }
  ]
}
  ```

  Example (Email already exists):
  
  ```json
  {
  "errors": [
    {
      "field": "email",
      "message": "An account with this email already exists"
    }
  ]
}
  ```
- `500` - Internal server error
  - `errors` (array of object, required): List of validation or processing errors
    - `field` (string, required): Field name that caused the error
    - `message` (string, required): Human-readable error message

  Example (Unexpected server error):
  
  ```json
  {
  "errors": [
    {
      "field": "form",
      "message": "An unexpected error occurred. Please try again."
    }
  ]
}
  ```

**Code samples:**

JavaScript (Email Signup):

```js
const response = await fetch("https://app.orbiqhq.com/api/v1/signup", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    company_name: "Acme Corporation",
    first_name: "John",
    last_name: "Doe",
    title: "CEO",
    email: "john@acme.com",
    password: "SecurePass123!",
    provider: "default",
    legal_consent: true,
    user_timezone: "America/New_York"
  })
});

if (!response.ok) throw new Error(await response.text());
const result = await response.json();

if (result.success && result.redirectUrl) {
  window.location.href = result.redirectUrl;
}

```

JavaScript (OAuth Signup):

```js
const response = await fetch("https://app.orbiqhq.com/api/v1/signup", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    company_name: "Acme Corporation",
    first_name: "John", 
    last_name: "Doe",
    title: "CEO",
    provider: "github"
  })
});

const result = await response.json();
if (result.success && result.redirectUrl) {
  window.location.href = result.redirectUrl; // Redirect to OAuth provider
}

```

cURL:

```bash
curl -X POST "https://app.orbiqhq.com/api/v1/signup" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Acme Corporation",
    "first_name": "John",
    "last_name": "Doe", 
    "title": "CEO",
    "email": "john@acme.com",
    "password": "SecurePass123!",
    "provider": "default",
    "legal_consent": true,
    "user_timezone": "America/New_York"
  }'
```

