whoami:query

Description: Query the identity of the authenticated user and retrieve their full profile within the community context.


Request Schema

{
  "payload": {
    "type": "whoami:query"
  },
  "signature": "payload_ed25519_hex_signature",
  "source_public_key": "your_client_public_key"
}

Request Attributes

Response Schema

{
  "source_public_key": "community_public_key",
  "source_site": {
    "protocol": "https",
    "fqdn": "arkipel.localhost:3000"
  },
  "created_at": "2025-11-13T20:52:49Z",
  "signature": "8b6392d5550605bd6ccddf9c21ebec470de4b44e4b4deb746076e37ab61c5346e07e7c7c7cebb5bbee41cdd92a476bcd3f02373d146ec165b31c31fc31c9ce0d",
  "payload": {
    "type": "whoami:query",
    "identity": {
      "public_key": "abc123def456...",
      "name": "John Doe",
      "email": "john@example.com",
      "accounts": [
        {
          "public_key": "xyz789abc012...",
          "name": "Community Garden Project",
          "role": "admin"
        }
      ]
    },
    "profile": {
      "id": 12345,
      "status": "active",
      "first_name": "John",
      "last_name": "Doe",
      "dob": "1990-01-15",
      "gender": "man",
      "locale": "fr",
      "account": {
        "id": 67890,
        "public_key": "def789abc012...",
        "name": "Local Community"
      },
      "contact_informations": [
        {
          "id": 111,
          "type": "Email",
          "info": "john@example.com",
          "label": "Personal",
          "main": true
        },
        {
          "id": 112,
          "type": "PhoneNumber",
          "info": "+1-555-0123",
          "label": "Home",
          "main": false
        }
      ],
      "addresses": [
        {
          "id": 222,
          "name": "Home",
          "street1": "123 Main St",
          "street2": "Apt 4B",
          "city": "Springfield",
          "zip": "12345",
          "country_code": "US",
          "region_code": "IL",
          "main": true
        }
      ],
      "collaborations": [
        {
          "id": 333,
          "main": true,
          "title": null,
          "contact": {
            "id": 444,
            "name": "Doe Family"
          }
        }
      ],
      "picture_url": "https://...",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-12-20T14:22:00Z"
    }
  }
}

Response Attributes

  • See global response attributes
  • payload.identity - Object - User identity information
    • public_key - String - The normalized public key of the user
    • name - String - The user’s display name
    • email - String - The user’s email address
    • accounts - Array - All accounts the user has access to
      • public_key - String - The account’s public key
      • name - String - The account/site name
      • role - String - User’s role in that account (owner, admin, standard, partner, guest)
  • payload.profile - Object - Complete person profile
    • id - Integer - The person ID in the community
    • status - String - Person status: “wizard”, “active”, or “inactive”
    • first_name, last_name - String - Person’s name
    • dob - String - Date of birth (ISO 8601 format)
    • gender - String - Gender value
    • locale - String - Language preference (e.g., “fr”, “en”)
    • account - Object - The community account context
    • contact_informations - Array - All contact details (emails, phones, websites, etc.)
    • addresses - Array - Physical addresses
    • collaborations - Array - Households and organizations the person belongs to
    • picture_url - String, optional - URL to profile picture (if uploaded)

Error Responses

User Not Found

{
  "payload": {
    "type": "whoami:query",
    "identity": null,
    "profile": null
  },
  "error": "User not found for the provided public key"
}

Person Not Found in Community

Returned when the user is authenticated but has no associated person record in the target community:

{
  "payload": {
    "type": "whoami:query",
    "identity": null,
    "profile": null
  },
  "error": "Person not found in this community"
}

Processing Error

{
  "payload": {
    "type": "whoami:query"
  },
  "error": "Failed to retrieve identity information",
  "status": "internal_server_error"
}

Real Life Example - Successful Response

{
  "source_public_key": "bwyexzko74pnnjn741936fnaujxyhib9rpx8rggtejwnc3cz6ans",
  "source_site": {
    "protocol": "https",
    "fqdn": "arkipel.co"
  },
  "created_at": "2026-02-14T14:14:22Z",
  "signature": "0b7cf3e421c4d7e4212e2069fbfbfd6734d0809fa3603e492949dc5b948da691f277c601d48b9cbac2bebbfdf697e8e01aa93ff54ae53afab4c5c2272dea0400",
  "payload": {
    "type": "whoami:query",
    "identity": {
      "public_key": "abc123def456ghi789",
      "name": "Sarah Johnson",
      "email": "sarah.johnson@example.com",
      "accounts": [
        {
          "public_key": "xyz789abc012def345",
          "name": "Community Garden Project",
          "role": "admin"
        },
        {
          "public_key": "uvw456def789ghi012",
          "name": "Sister Community Site",
          "role": "standard"
        }
      ]
    },
    "profile": {
      "id": 9876,
      "status": "active",
      "import_id": "P2024-001",
      "gid": "gid://arkipel/Person/9876",
      "account": {
        "id": 5432,
        "public_key": "xyz789abc012def345",
        "name": "Community Garden Project"
      },
      "locale": "en",
      "accepts_marketing": true,
      "data_consent": "given",
      "dob_year": 1985,
      "gender": "woman",
      "zip": "94102",
      "created_at": "2024-03-15T09:00:00Z",
      "updated_at": "2025-01-10T16:45:00Z",
      "category": {
        "id": 100,
        "name": "Active Member"
      },
      "first_name": "Sarah",
      "last_name": "Johnson",
      "email": "sarah.johnson@example.com",
      "phone_number": "+1-415-555-0199",
      "dob": "1985-06-12",
      "note": "Joined through community outreach program",
      "contact_informations": [
        {
          "id": 5001,
          "info": "sarah.johnson@example.com",
          "label": "Personal",
          "type": "Email",
          "main": true
        },
        {
          "id": 5002,
          "info": "+1-415-555-0199",
          "label": "Mobile",
          "type": "CellNumber",
          "main": true
        },
        {
          "id": 5003,
          "info": "sarah.j",
          "label": "Instagram",
          "type": "Website",
          "main": false
        }
      ],
      "addresses": [
        {
          "id": 6001,
          "name": "Home",
          "street1": "456 Oak Street",
          "street2": "Unit 12",
          "city": "San Francisco",
          "zip": "94102",
          "country_code": "US",
          "region_code": "CA",
          "main": true
        }
      ],
      "collaborations": [
        {
          "id": 7001,
          "main": true,
          "title": null,
          "contact": {
            "id": 8001,
            "name": "Johnson Family"
          }
        },
        {
          "id": 7002,
          "main": false,
          "title": "Treasurer",
          "contact": {
            "id": 8002,
            "name": "Community Garden Club"
          }
        }
      ],
      "picture_url": "https://arkipel.co/rails/active_storage/representations/.../profile.jpg",
      "tags": [
        {
          "id": 9001,
          "name": "Garden Volunteer"
        }
      ]
    }
  }
}

Usage Notes

  • The identity object provides basic user identification (public_key, name, email) plus a list of all accounts the user has access to with their role in each
  • The profile object contains the complete person record including:
    • Personal information (name, DOB, gender)
    • All contact methods (emails, phone numbers, websites)
    • Physical addresses
    • Household and organization memberships (via collaborations)
    • Profile picture URL (if available)
  • This is an ephemeral query - no message is persisted to the database
  • Authentication can be via token, whitelist, or membership
  • The public_key in the identity is normalized (arki: prefix and @domain suffix removed)
  • Requires an active membership in the target community to return profile data

Back to top

Welcome to the Arkipel DevKit! This documentation will guide you through everything you need to build clients for Arkipel communities.

Contact: devkit@arkipel.co | Page URLs

Copyright © 2026 Arkipel. Distributed under an MIT license.