Profile

Profile API #

Profile API Reference #

Profile #

Below is the field description for the profile object.

FieldTypeDescription
idstringUnique identifier for the user profile.
namestringUser’s display name.
emailstringUser’s email address.
permissionsarray[string]List of permission keys assigned to the user, e.g., ["coco:document:read"].

Get Profile #

Requires authentication. Returns the current user’s profile information and permissions.

Request #

curl -XGET http://localhost:9000/account/profile \
  -H "Authorization: Bearer <access_token>"

Response #

{
  "id": "user123",
  "name": "jdoe",
  "email": "jdoe@example.com",
  "permissions": [
    "coco:document:create",
    "coco:document:read",
    "coco:search:search"
  ]
}
Edit Edit this page