Skip to main content

Store Metadata

Store the mapping between policy ID and IPFS CID after creating an on-chain policy.

Endpoint

Request Body

Parameters

Response

Success (201)

Error (400)

Error (409)

Error (401)

Example Usage

JavaScript

cURL

Flow Integration

This endpoint is called after:
  1. Content encrypted client-side
  2. Encrypted content uploaded to IPFS
  3. Policy created on-chain

Validation

The API validates:
  • ✅ Authenticated session
  • ✅ Valid policyId format (0x + 64 hex chars)
  • ✅ Valid IPFS CID (Qm… or bafy…)
  • ✅ Valid Ethereum addresses
  • ✅ Future expiry timestamp
  • ✅ maxAttempts > 0

Rate Limits

Database Schema

Stored in PostgreSQL: