For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDashboard
Getting StartedAPI ReferenceRoadmapBlog
Getting StartedAPI ReferenceRoadmapBlog
    • Resources
    • Authentication
    • Pagination
    • Rate limiting
  • API Keys
    • GETList api keys
    • GETGet api key
    • POSTCreate api key
    • PUTUpdate api key
    • DELDelete api key
  • Environments
    • POSTCreate environment
    • PUTUpdate environment
    • DELDelete environment
  • Plans
    • The Plan object
    • GETList plans
    • GETGet plan
    • POSTCreate plan
    • PUTUpdate plan
    • DELDelete plan
  • Companies
    • The Company object
    • GETList companies
    • POSTUpsert company
    • GETLookup company
    • DELDelete company
    • POSTDelete company by keys
    • GETList company memberships
    • POSTGet or create company membership
    • DELDelete company membership
    • POSTUpsert company trait
  • Users
    • The User object
    • GETList users
    • GETLookup user
    • POSTUpsert user
    • DELDelete user
    • POSTDelete user by keys
    • POSTUpsert user trait
  • Events
    • The Event object
    • GETList events
    • POSTCreate event
    • POSTCreate event batch
    • GETGet event
  • Features
    • The Feature object
    • GETList features
    • GETGet feature
    • POSTCreate feature
    • PUTUpdate feature
    • DELDelete feature
  • Flags
    • The Flag object
    • GETList flags
    • GETGet flag
    • POSTCreate flag
    • PUTUpdate flag
    • DELDelete flag
    • PUTUpdate flag rules
    • POSTCheck flag
    • POSTCheck flags
  • Entitlements
    • GETList company overrides
    • GETGet company override
    • POSTCreate company override
    • PUTUpdate company override
    • DELDelete company override
    • GETList plan entitlements
    • GETGet plan entitlement
    • POSTCreate plan entitlement
    • PUTUpdate plan entitlement
    • DELDelete plan entitlement
  • Feature Usage
    • GETList feature usage
  • Billing Credits
    • GETList credits
    • POSTCreate credit
    • GETGet credit
    • PUTUpdate credit
    • DELDelete credit
    • GETList credit bundles
    • POSTCreate credit bundle
    • GETGet credit bundle
    • PUTUpdate credit bundle
    • DELDelete credit bundle
    • POSTGrant credits to company
    • GETList company credit grants
    • GETList credit grants
    • PUTZero out credit grant
    • GETList plan credit grants
    • POSTCreate plan credit grant
    • DELDelete plan credit grant
    • GETGet credit ledger
  • Account Members
    • GETList account members
    • GETGet account member
LogoLogo
SupportDashboard
Users

Lookup user

GET
https://api.schematichq.com/users/lookup
GET
/users/lookup
1import { SchematicClient } from "@schematichq/schematic-typescript-node";
2
3async function main() {
4 const client = new SchematicClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.companies.lookupUser({
8 keys: {},
9 });
10}
11main();
1{
2 "data": {
3 "company_memberships": [
4 {
5 "company_id": "comp_123456789",
6 "created_at": "2023-11-20T08:45:00Z",
7 "id": "mem_456789123",
8 "updated_at": "2024-04-01T12:00:00Z",
9 "user_id": "user_789123456",
10 "company": {
11 "created_at": "2023-11-20T08:45:00Z",
12 "environment_id": "env_987654321",
13 "id": "comp_123456789",
14 "name": "Acme Corporation",
15 "updated_at": "2024-04-01T12:00:00Z",
16 "last_seen_at": "2024-04-10T16:20:00Z",
17 "logo_url": "https://example.com/logos/acme_corp.png"
18 }
19 }
20 ],
21 "created_at": "2023-10-15T14:30:00Z",
22 "entity_traits": [
23 {
24 "created_at": "2023-10-15T14:30:00Z",
25 "definition_id": "traitdef_001",
26 "environment_id": "env_987654321",
27 "id": "trait_123456",
28 "updated_at": "2024-01-10T09:00:00Z",
29 "value": "true",
30 "definition": {
31 "created_at": "2023-09-01T10:00:00Z",
32 "display_name": "Premium Member",
33 "entity_type": "user",
34 "hierarchy": [
35 "membership",
36 "status"
37 ],
38 "id": "traitdef_001",
39 "trait_type": "boolean",
40 "updated_at": "2024-01-10T09:00:00Z"
41 }
42 }
43 ],
44 "environment_id": "env_987654321",
45 "id": "user_789123456",
46 "keys": [
47 {
48 "created_at": "2023-10-15T14:30:00Z",
49 "definition_id": "keydef_001",
50 "entity_id": "user_789123456",
51 "entity_type": "user",
52 "environment_id": "env_987654321",
53 "id": "key_654321",
54 "key": "email",
55 "updated_at": "2024-01-05T08:00:00Z",
56 "value": "jane.doe@example.com",
57 "definition": {
58 "created_at": "2023-08-20T11:00:00Z",
59 "entity_type": "user",
60 "id": "keydef_001",
61 "key": "email",
62 "updated_at": "2024-01-05T08:00:00Z"
63 }
64 }
65 ],
66 "name": "Jane Doe",
67 "updated_at": "2024-04-01T12:00:00Z",
68 "last_seen_at": "2024-04-10T16:20:00Z",
69 "traits": {
70 "preferred_language": "English",
71 "timezone": "America/New_York"
72 }
73 },
74 "params": {
75 "keys": {
76 "email": "jane.doe@example.com",
77 "username": "janedoe123"
78 }
79 }
80}
Was this page helpful?
Previous

Upsert user

Next
Built with

Authentication

X-Schematic-Api-Keystring
API Key authentication via header

Query parameters

keysmap from strings to stringsRequired

Key/value pairs

Response

OK
dataobject
paramsobject
Input parameters

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error