> ## Documentation Index
> Fetch the complete documentation index at: https://usegately.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign Up

> Create a new user account

## Request Body

<ParamField body="email" type="string" required>
  The user's email address
</ParamField>

<ParamField body="password" type="string" required>
  The user's password (minimum 6 characters)
</ParamField>

<ParamField body="metadata" type="object">
  Additional user metadata (name, etc.)
</ParamField>

## Response

<ResponseField name="user" type="object">
  The created user object
</ResponseField>

<ResponseField name="session" type="object">
  Session information with access token
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.usegately.com/api/v1/auth/signup" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "newuser@example.com",
      "password": "securepassword123",
      "metadata": {
        "name": "Jane Smith"
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.usegately.com/api/v1/auth/signup', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: JSON.stringify({
      email: 'newuser@example.com',
      password: 'securepassword123',
      metadata: {
        name: 'Jane Smith'
      }
    })
  })

  const data = await response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "user": {
      "id": "usr_xyz789",
      "email": "newuser@example.com",
      "user_metadata": {
        "role": "member",
        "project_id": "your-project-id",
        "metadata": {
          "name": "Jane Smith"
        }
      }
    },
    "session": {
      "access_token": "eyJhbGciOiJIUzI1NiIs...",
      "user": {
        "id": "usr_xyz789",
        "email": "newuser@example.com"
      }
    }
  }
  ```

  ```json Error Response theme={null}
  {
    "error": "Account already exists. Please sign in."
  }
  ```
</ResponseExample>
