Layers

GET /v1/projects/:projectId/users/:appUserId/signal

Per-user property state, consent, cohorts, and retention.

View as Markdown
GET/v1/projects/:projectId/users/:appUserId/signal
Phase 1stable
Auth
Bearer
Scope
events:read

Returns a merged view of a single user: their latest property state, consent flags, assigned cohorts, and day-1 / 7 / 30 retention status. Use it to render a "user detail" screen inside your partner UI, or to decide whether a user is eligible for a campaign before you target them.

The view is computed from the raw event stream and refreshed hourly. firstSeen / lastSeen reflect live event timestamps; retention and properties lag by up to 60 minutes. PII fields follow the same redaction rules as GET /events — redacted unless the key carries events:read+pii.

cohorts is always returned as an empty array in Phase 1 — the cohort materializer hasn't shipped yet. The field is reserved so partners can begin reading it without a future schema bump.

Path
  • projectId
    stringrequired
    Project ID.
  • appUserId
    stringrequired
    The `app_user_id` the SDK emits with each event.

Example request

curl "https://api.layers.com/v1/projects/prj_01HX9Y7K8M2P4RSTUV56789AB/users/user_a7f3c1d9/signal" \
  -H "Authorization: Bearer lp_live_01HX9Y6K7EJ4T2_4QZpN..."
const signal = await layers.users.signal(
  "prj_01HX9Y7K8M2P4RSTUV56789AB",
  "user_a7f3c1d9"
);
signal = layers.users.signal(
    project_id="prj_01HX9Y7K8M2P4RSTUV56789AB",
    app_user_id="user_a7f3c1d9",
)

Response

200OK
{
  "appUserId": "user_a7f3c1d9",
  "firstSeen": "2026-03-28T14:02:11Z",
  "lastSeen": "2026-04-18T19:41:57Z",
  "eventCount30d": 214,
  "properties": {
    "plan": "pro",
    "signup_source": "ios_appstore",
    "locale": "en-US",
    "email": "[redacted]"
  },
  "consent": {
    "analytics": true,
    "marketing": false,
    "personalization": true,
    "capturedAt": "2026-03-28T14:02:14Z"
  },
  "cohorts": [],
  "retention": {
    "day1": true,
    "day7": true,
    "day30": false
  },
  "refreshedAt": "2026-04-18T19:00:00Z"
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing or invalid key.
403FORBIDDEN_SCOPEKey lacks events:read.
404NOT_FOUNDProject does not exist, or no events received yet for this appUserId.
429RATE_LIMITEDRead budget exhausted.

See also

On this page