Skip to main content
GET
/
api
/
v1
/
attributes
List Attributes
curl --request GET \
  --url https://api.example.com/api/v1/attributes
{
  "attributes": [
    {
      "name": "email",
      "data-format": "string",
      "context-format": null,
      "attestation-required": false
    },
    {
      "name": "age-verify",
      "data-format": "boolean",
      "context-format": null,
      "attestation-required": true
    },
    {
      "name": "pseudonym",
      "data-format": "string",
      "context-format": null,
      "attestation-required": false
    },
    {
      "name": "payment-method",
      "data-format": "object",
      "context-format": "json",
      "attestation-required": false
    }
  ]
}

Overview

Returns a comprehensive list of all attributes registered in the BOOP Network. This endpoint is useful for discovering available user attributes that can be requested during authentication.
This endpoint does not require authentication and can be used to build dynamic attribute selection interfaces.

Response

attributes
array
required
Array of attribute objects containing details about each registered attribute
{
  "attributes": [
    {
      "name": "email",
      "data-format": "string",
      "context-format": null,
      "attestation-required": false
    },
    {
      "name": "age-verify",
      "data-format": "boolean",
      "context-format": null,
      "attestation-required": true
    },
    {
      "name": "pseudonym",
      "data-format": "string",
      "context-format": null,
      "attestation-required": false
    },
    {
      "name": "payment-method",
      "data-format": "object",
      "context-format": "json",
      "attestation-required": false
    }
  ]
}

Usage Examples

async function getAvailableAttributes() {
  const response = await fetch('https://dev.app.boop.it/api/v1/attributes');
  const { attributes } = await response.json();

  return attributes;
}

// Build attribute selection interface
const attributes = await getAvailableAttributes();
const attributeOptions = attributes.map(attr => ({
  value: attr.name,
  label: attr.name.replace('-', ' ').toUpperCase(),
  requiresAttestation: attr['attestation-required']
}));

Common Attributes

The BOOP Network typically includes these standard attributes:
AttributeData FormatAttestation RequiredUse Case
emailstringfalseContact information
pseudonymstringfalseAnonymous identification
age-verifybooleantrueAge verification
payment-methodobjectfalsePayment processing
phonestringtrueContact verification
addressobjecttrueShipping/billing

Attribute Categories

Authentication Attributes

Used for basic user identification:
  • pseudonym - Anonymous user identifier
  • email - Contact information
  • phone - Phone verification

Identity Attributes (Attestation Required)

Require trusted third-party verification:
  • age-verify - Age verification status
  • id-document - Government ID verification
  • address - Verified address information

Payment Attributes

Used for transaction processing:
  • payment-method - Payment card or account details
  • billing-address - Billing information

Dynamic Attribute Requests

Use this endpoint to build dynamic authentication interfaces:
async function buildAuthenticationRequest(requiredAttributes) {
  const availableAttributes = await getAvailableAttributes();

  // Validate requested attributes exist
  const validAttributes = requiredAttributes.filter(attr =>
    availableAttributes.some(available => available.name === attr)
  );

  // Warn about attestation requirements
  const attestationRequired = validAttributes.filter(attr => {
    const attrInfo = availableAttributes.find(a => a.name === attr);
    return attrInfo?.['attestation-required'];
  });

  if (attestationRequired.length > 0) {
    console.warn(`These attributes require attestation: ${attestationRequired.join(', ')}`);
  }

  return validAttributes;
}

Integration with WebSocket

Use attribute information when creating authentication contexts:
const attributes = await getAvailableAttributes();

// Create authentication context with validated attributes
const authRequest = {
  type: 'create_context',
  context_id: 'ctx_123',
  requirements: {
    type: 'payment',
    amount: 2500,
    attributes: attributes
      .filter(attr => ['email', 'pseudonym'].includes(attr.name))
      .map(attr => attr.name)
  }
};

Caching Recommendations

Attribute lists change infrequently, so consider caching:
class AttributeService {
  constructor() {
    this.cache = null;
    this.cacheExpiry = 0;
  }

  async getAttributes() {
    if (this.cache && Date.now() < this.cacheExpiry) {
      return this.cache;
    }

    const response = await fetch('/api/v1/attributes');
    const { attributes } = await response.json();

    this.cache = attributes;
    this.cacheExpiry = Date.now() + (5 * 60 * 1000); // 5 minutes

    return attributes;
  }
}

Rate Limits

  • 1000 requests per minute per IP address
  • No authentication required for this endpoint