PilotFoxDocs

Get a user

GET
/api/v1/sites/{siteId}/users/{userId}

One user's profile over all time: traits, totals, devices, locations, linked visitors, web vitals and an activity calendar. 404 for a user with neither a session nor a stored profile.

Requires users:read on the site (an API key, or a signed-in member's role). Share links: allowed, with the users:read scope.

Authorization

headerx-api-key<token>

An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).

Scope: users:read

Path Parameters

siteId*string
userId*string
Length1 <= length <= 255

Response Body

OK

application/json
  1. response
data*
meta*
Example Request
curl -X GET 'https://pilotfox.app/api/v1/sites/string/users/string'
Example Response200
{  "data": {    "user_id": "string",    "identified": true,    "traits": {      "property1": "string",      "property2": "string"    },    "profile": {      "first_seen_at": "string",      "updated_at": "string"    },    "first_seen": "string",    "last_seen": "string",    "totals": {      "sessions": 0,      "pageviews": 0,      "events": 0,      "errors": 0,      "avg_session_duration": 0    },    "devices": [      {        "device_type": "string",        "browser": "string",        "os": "string",        "sessions": 0      }    ],    "locations": [      {        "country": "string",        "region": "string",        "region_name": "string",        "city": "string",        "sessions": 0      }    ],    "linked_visitors": [      {        "visitor_id": "string",        "sessions": 0,        "first_seen": "string",        "last_seen": "string"      }    ],    "vitals": {      "lcp": 0,      "cls": 0,      "inp": 0,      "fcp": 0,      "ttfb": 0    },    "calendar": [      {        "date": "string",        "sessions": 0,        "pageviews": 0      }    ]  },  "meta": {    "window": {      "from": "string",      "to": "string",      "tz": "string",      "bucket": "minute"    },    "compare": {      "from": "string",      "to": "string"    },    "totalCount": -9007199254740991,    "nextCursor": "string",    "truncated": true,    "cache": "hit"  }}