Users & Profiles
PIP stores the extended user profile — fields beyond the authentication credential (email).
Profile structure
| Field group | Fields | Notes |
|---|---|---|
| Identity | id, email | Email managed by Kratos — read-only via PIP |
| Name | firstName, middleName, lastName, preferredName | |
| Personal | birthDate, gender | Optional |
| Display | displayName, avatarUrl | Used in UI headers |
| Contacts | user_contacts[] | Multiple entries; types: email, phone, line, instagram |
| Addresses | user_addresses[] | Multiple entries; types: home, work, billing |
| Preferences | preferences (JSONB) | Notification settings, theme, locale |
Get profile
GET /identity/me
Authorization: Bearer <token>{
"id": "usr_xxxx",
"email": "user@example.com",
"firstName": "Somchai",
"lastName": "Jaidee",
"displayName": "Somchai",
"avatarUrl": null,
"contacts": [
{ "id": "cnt_xxxx", "type": "phone", "value": "+66812345678", "isPrimary": true }
],
"addresses": [
{
"id": "adr_xxxx",
"type": "work",
"addressLine": "123 Sukhumvit Rd",
"city": "Bangkok",
"country": "TH"
}
]
}Update profile
PATCH /identity/me
Authorization: Bearer <token>
Content-Type: application/json
{
"firstName": "Somchai",
"lastName": "Jaidee",
"displayName": "Somchai"
}Contacts
POST /identity/me/contacts
{
"type": "phone",
"value": "+66812345678",
"isPrimary": true
}Valid type values: email · phone · line · instagram · facebook · x
Addresses
POST /identity/me/addresses
{
"type": "billing",
"addressLine": "123 Main St",
"city": "Bangkok",
"country": "TH"
}Valid type values: home · work · billing · shipping