> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.rightbrain.ai/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rightbrain.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rightbrain.ai/_mcp/server.

# Get User Profile

GET https://app.rightbrain.ai/api/v1/user

Get the current user's profile.

Returns:
- Email and name
- Bio and job role
- Avatar URL
- Newsletter subscription status
- Onboarding status

Reference: https://docs.rightbrain.ai/api-reference/api-reference/platform/users/get-current-user

## Authentication

- `Authorization` header (bearer token, required) — API key or access token, sent as `Authorization: Bearer <token>`. The simplest option: create an API key in your dashboard under Settings, then paste it here.

## Servers

- `https://app.rightbrain.ai/api/v1` (Production, default)
- `https://app.rightbrain.ai/api/v1` (Staging API)
- `https://app.rblocal.dev/api/v1` (Local development)

## Response

### 200

User details retrieved successfully

- `email` (string, required)
- `name` (string, required, nullable)
- `id` (string, required)
- `is_onboarding` (boolean, required)
- `bio` (string, optional, nullable)
- `avatar_url` (string, optional, nullable)
- `subscribed_to_newsletter` (boolean, optional, default: false)
- `job_role` (enum, optional, nullable)
  - Allowed values: `student`, `engineer`, `designer`, `product manager`, `entrepreneur`, `marketer`, `educator`, `researcher`, `freelancer`, `other`

## Errors

### 401 Unauthorized Error

Unauthorized - Authentication failed **Common causes:** - Missing `Authorization` header - Expired access token - Invalid or malformed token - Using API key in wrong format **Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.

- `detail` (ErrorResponseDetail, required) — A plain error message, a list of field-level validation errors, a service validation error, or a domain error object with `reason` and `message`.

### 500 Internal Server Error

Internal Server Error - Failed to retrieve user

- `detail` (ErrorResponseDetail, required) — A plain error message, a list of field-level validation errors, a service validation error, or a domain error object with `reason` and `message`.

## Types

### ErrorResponseDetail

A plain error message, a list of field-level validation errors, a service validation error, or a domain error object with `reason` and `message`.

- string
- list of ErrorResponseDetailOneOf1Items
- ErrorResponseDetail2
- ErrorResponseDetail3
- ErrorResponseDetail4

### ErrorResponseDetailOneOf1Items

- `type` (string, required) — Error type identifier
- `loc` (list of ErrorResponseDetailOneOf1ItemsLocItems, optional) — Path to the error location. Integer segments index into a list.
- `msg` (string, optional) — Human-readable error message. Present on errors produced by FastAPI's own request validation.
- `message` (string, optional) — Human-readable error message. Used instead of `msg` by Rightbrain's own validators.

### ErrorResponseDetail2

Validation error returned by a service after request parsing, such as a Task clone dependency failure.

- `type` ("validation_error", required)
- `errors` (list of ErrorResponseDetailOneOf2ErrorsItems, required)

### ErrorResponseDetail3

Domain error raised via a brain.exc.BaseError subclass. The exact extra field name and shape vary by error type.

- `reason` (string, required) — Machine-readable, upper-snake-case error reason, e.g. RESOURCE_NOT_FOUND, PERMISSION_CHECK_FAILED, TAG_NAME_CONFLICT.
- `message` (string, required) — Human-readable error message

### ErrorResponseDetail4

Integration precondition failure. Uses `code` rather than `reason`, and carries no extra field. Raised by the Gmail trigger routes when the underlying integration is not authorized.

- `code` (string, required) — Machine-readable code, e.g. GMAIL_INTEGRATION_AUTH_REQUIRED.
- `message` (string, required) — Human-readable error message

### ErrorResponseDetailOneOf1ItemsLocItems

- string
- integer

### ErrorResponseDetailOneOf2ErrorsItems

- `type` (string, required) — Error type identifier
- `loc` (list of ErrorResponseDetailOneOf2ErrorsItemsLocItems, optional) — Path to the error location. Integer segments index into a list.
- `msg` (string, optional) — Human-readable error message. Present on errors produced by FastAPI's own request validation.
- `message` (string, optional) — Human-readable error message. Used instead of `msg` by Rightbrain's own validators.

### ErrorResponseDetailOneOf2ErrorsItemsLocItems

- string
- integer

## Examples

**Response**

```json
{
  "email": "jamie.ortiz@meridianfreight.com",
  "name": "Jamie Ortiz",
  "id": "019a2f10-9a4f-7e45-8e86-1c9d4e7b6f11",
  "is_onboarding": false,
  "avatar_url": "https://cdn.rightbrain.ai/assets/avatars/user/019a2f10-9a4f-7e45-8e86-1c9d4e7b6f11/base.png",
  "subscribed_to_newsletter": true,
  "job_role": "engineer"
}
```

**SDK Code**

```python Users_getCurrentUser_example
import requests

url = "https://app.rightbrain.ai/api/v1/user"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Users_getCurrentUser_example
const url = 'https://app.rightbrain.ai/api/v1/user';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Users_getCurrentUser_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.rightbrain.ai/api/v1/user"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Users_getCurrentUser_example
require 'uri'
require 'net/http'

url = URI("https://app.rightbrain.ai/api/v1/user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Users_getCurrentUser_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.rightbrain.ai/api/v1/user")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Users_getCurrentUser_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.rightbrain.ai/api/v1/user', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Users_getCurrentUser_example
using RestSharp;

var client = new RestClient("https://app.rightbrain.ai/api/v1/user");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Users_getCurrentUser_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.rightbrain.ai/api/v1/user")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```