Users

Get User Info

Returns detailed information about a specific user, including their profile traits and linked devices.

GET /api/sites/:site/users/:userId

Returns detailed information about a specific user, including their profile traits and linked devices.

Path Parameters

Prop

Type

Response

Prop

Type

UserInfo Object

Prop

Type

UserVitals Object

Prop

Type

UserLocation Object

Prop

Type

UserDevice Object

Prop

Type

LinkedDevice Object

Prop

Type

Request
curl -X GET "https://app.rybbit.io/api/sites/123/users/user@example.com" \
  -H "Authorization: Bearer your_api_key_here"
Request
const response = await fetch(
  'https://app.rybbit.io/api/sites/123/users/user@example.com',
  {
    headers: {
      'Authorization': 'Bearer your_api_key_here'
    }
  }
);

const data = await response.json();
Request
import requests

response = requests.get(
    'https://app.rybbit.io/api/sites/123/users/user@example.com',
    headers={
        'Authorization': 'Bearer your_api_key_here'
    }
)

data = response.json()
Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/sites/123/users/user@example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer your_api_key_here'
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
Request
require 'net/http'
require 'json'

uri = URI('https://app.rybbit.io/api/sites/123/users/user@example.com')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer your_api_key_here'

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
Request
req, _ := http.NewRequest("GET", "https://app.rybbit.io/api/sites/123/users/user@example.com", nil)
req.Header.Set("Authorization", "Bearer your_api_key_here")

client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()

var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
Request
let client = reqwest::Client::new();
let res = client
    .get("https://app.rybbit.io/api/sites/123/users/user@example.com")
    .header("Authorization", "Bearer your_api_key_here")
    .send()
    .await?;

let data: serde_json::Value = res.json().await?;
Request
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://app.rybbit.io/api/sites/123/users/user@example.com"))
    .header("Authorization", "Bearer your_api_key_here")
    .GET()
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
Request
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");

var response = await client.GetAsync("https://app.rybbit.io/api/sites/123/users/user@example.com");
var data = await response.Content.ReadAsStringAsync();
Response
{
  "data": {
    "user_id": "abc123def456",
    "identified_user_id": "user@example.com",
    "traits": {
      "name": "John Doe",
      "plan": "pro",
      "company": "Acme Inc"
    },
    "sessions": 12,
    "pageviews": 156,
    "events": 23,
    "duration": 245,
    "country": "US",
    "region": "California",
    "city": "San Francisco",
    "language": "en-US",
    "browser": "Chrome",
    "browser_version": "120.0.0",
    "operating_system": "macOS",
    "operating_system_version": "14.2",
    "device_type": "desktop",
    "screen_width": 2560,
    "screen_height": 1440,
    "first_seen": "2024-01-15T10:30:00.000Z",
    "last_seen": "2024-01-31T14:22:00.000Z",
    "timezone": "America/Los_Angeles",
    "ip": "203.0.113.42",
    "first_referrer": "https://google.com",
    "first_channel": "Organic Search",
    "first_entry_page": "/pricing",
    "first_utm_source": "google",
    "first_utm_medium": "cpc",
    "first_utm_campaign": "launch",
    "last_referrer": "https://twitter.com",
    "last_channel": "Social",
    "vitals": {
      "lcp_p75": 1240,
      "cls_p75": 0.02,
      "inp_p75": 180,
      "fcp_p75": 890,
      "ttfb_p75": 210,
      "performance_events": 48
    },
    "locations": [
      {
        "country": "US",
        "region": "California",
        "city": "San Francisco",
        "sessions": 10,
        "last_seen": "2024-01-31T14:22:00.000Z"
      }
    ],
    "devices": [
      {
        "device_type": "desktop",
        "browser": "Chrome",
        "browser_version": "120.0.0",
        "operating_system": "macOS",
        "operating_system_version": "14.2",
        "screen_width": 2560,
        "screen_height": 1440,
        "sessions": 9,
        "last_seen": "2024-01-31T14:22:00.000Z"
      }
    ],
    "linked_devices": [
      {
        "anonymous_id": "xyz789ghi012",
        "created_at": "2024-01-20T08:15:00.000Z"
      }
    ]
  }
}