API Reference
Identity Platform
Users

Users API

ดูข้อมูล user ปัจจุบัน

GET /identity/me
Authorization: Bearer <token>

แก้ไขโปรไฟล์ user ปัจจุบัน

PATCH /identity/me
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "firstName": "string",
  "middleName": "string",
  "lastName": "string",
  "preferredName": "string",
  "birthDate": "2000-01-01",
  "gender": "string",
  "displayName": "string",
  "avatarUrl": "string"
}

ดู users ทั้งหมด (admin)

GET /identity/users?limit=20&cursor=<cursor>&orgId=<orgId>
Authorization: Bearer <token>

Permission ที่ต้องการ: console.users.read

ดู user ด้วย ID (admin)

GET /identity/users/:userId
Authorization: Bearer <token>

Contacts

ดู contacts ทั้งหมด

GET /identity/me/contacts

เพิ่ม contact

POST /identity/me/contacts
Content-Type: application/json
 
{
  "type": "phone | email | line | instagram | facebook | x",
  "value": "string",
  "isPrimary": false
}

แก้ไข contact

PATCH /identity/me/contacts/:contactId
Content-Type: application/json
 
{ "value": "string", "isPrimary": true }

ลบ contact

DELETE /identity/me/contacts/:contactId

Addresses

ดู addresses ทั้งหมด

GET /identity/me/addresses

เพิ่ม address

POST /identity/me/addresses
Content-Type: application/json
 
{
  "type": "home | work | billing | shipping",
  "addressLine": "string",
  "city": "string",
  "state": "string",
  "postalCode": "string",
  "country": "TH"
}

แก้ไข address

PATCH /identity/me/addresses/:addressId

ลบ address

DELETE /identity/me/addresses/:addressId

Users API

Get current user

GET /identity/me
Authorization: Bearer <token>

Update current user profile

PATCH /identity/me
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "firstName": "string",
  "middleName": "string",
  "lastName": "string",
  "preferredName": "string",
  "birthDate": "2000-01-01",
  "gender": "string",
  "displayName": "string",
  "avatarUrl": "string"
}

List users (admin)

GET /identity/users?limit=20&cursor=<cursor>&orgId=<orgId>
Authorization: Bearer <token>

Required permission: console.users.read

Get user by ID (admin)

GET /identity/users/:userId
Authorization: Bearer <token>

Contacts

List contacts

GET /identity/me/contacts

Add contact

POST /identity/me/contacts
Content-Type: application/json
 
{
  "type": "phone | email | line | instagram | facebook | x",
  "value": "string",
  "isPrimary": false
}

Update contact

PATCH /identity/me/contacts/:contactId
Content-Type: application/json
 
{ "value": "string", "isPrimary": true }

Delete contact

DELETE /identity/me/contacts/:contactId

Addresses

List addresses

GET /identity/me/addresses

Add address

POST /identity/me/addresses
Content-Type: application/json
 
{
  "type": "home | work | billing | shipping",
  "addressLine": "string",
  "city": "string",
  "state": "string",
  "postalCode": "string",
  "country": "TH"
}

Update address

PATCH /identity/me/addresses/:addressId

Delete address

DELETE /identity/me/addresses/:addressId