Arke
ReferenceSchemas

User

Reference for the arke/user@v1 profile -- human accounts on the network.

Profile

arke/user@v1

Users represent human accounts on the Arke network. Like all entity types, users extend the base Eidos schema with type-specific validation.

Required Properties

PropertyTypeConstraintsDescription
labelstringNon-emptyDisplay name for the user

Flexible Properties

User entities support flexible properties - any additional key-value pairs can be stored in the properties object without restriction.

Common optional properties include:

PropertyTypeDescription
namestringFull name (set from JWT claims during registration)
avatar_urlstringProfile image URL
biostringUser biography or description

Relationships

User relationships are flexible and not validated by the profile. Common relationship patterns:

PredicatePeer TypeDescription
ownercollectionCollections the user owns
editorcollectionCollections the user can edit
viewercollectionCollections the user can view
member_ofgroupGroups the user belongs to

Validation Rules

The user profile validates:

  1. On create: label must be provided and non-empty
  2. On update: If label is provided, it cannot be empty
  3. Type enforcement: Only entities with type: 'user' can be accessed via user operations

User Creation

Users are created via POST /auth/register when a user with a valid JWT first accesses the system:

  1. The JWT is verified using the configured JWT secret
  2. A new user entity is created with:
    • label: From JWT user_metadata.name, or fallback to User {short_id}
    • name property: Set if JWT contains a name
  3. A mapping is created between the external auth provider ID and the Arke entity ID

Registration is idempotent - calling it when already registered returns the existing user.

Update Operations

Users are updated via PUT /users/{id} with standard entity update semantics:

{
  "expect_tip": "bafyrei...",
  "label": "New Display Name",
  "properties": {
    "bio": "Updated biography"
  },
  "properties_remove": ["old_field"],
  "note": "Updated profile"
}

The expect_tip CID is required for optimistic concurrency control.

On this page