Register Content API
Register media content on the blockchain
Endpoint
POST https://api.blockfact.io/v1/content/registerRequest Body
{
"content_url": "https://s3.amazonaws.com/...",
"creator": "0xabc...def",
"timestamp": "2026-03-06T17:24:30Z",
"latitude": 40.7128,
"longitude": -74.0060,
"metadata": {
"description": "Optional metadata"
},
"exif_data": {
"Make": "Apple",
"Model": "iPhone 15 Pro",
"DateTime": "2026:03:06 17:24:30"
},
"capture_timestamp": "2026-03-06T17:24:30Z",
"device_attestation": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| content_url | string | Yes | URL to uploaded image |
| creator | string | Yes | Starknet wallet address |
| timestamp | string | Yes | ISO 8601 timestamp |
| latitude | number | Yes | GPS latitude |
| longitude | number | Yes | GPS longitude |
| exif_data | object | Yes | Camera EXIF metadata |
| capture_timestamp | string | Yes | When photo was captured |
| device_attestation | string | Yes | DeviceCheck/Play Integrity token |
| metadata | object | No | Additional metadata |
Response
{
"session_id": "sess_abc123",
"status": "processing",
"message": "Content registration initiated"
}WebSocket Updates
Connect to WebSocket for real-time status updates:
wss://api.blockfact.io/v1/ws?session_id=sess_abc123Status Updates
// 1. Processing
{
"stage": "preprocessing",
"status": "processing",
"message": "Validating image..."
}
// 2. Blockchain
{
"stage": "blockchain",
"status": "processing",
"message": "Registering on Starknet..."
}
// 3. Complete
{
"stage": "complete",
"status": "completed",
"tx_hash": "0x1234...abcd",
"facti_url": "https://ipfs.io/ipfs/bafybei...",
"facti_cid": "bafybei..."
}Error Responses
400 Bad Request
{
"error": "EXIF data required",
"message": "Image must be captured from camera with EXIF data"
}403 Forbidden
{
"error": "Image too old",
"message": "Image must be captured within last 30 seconds"
}500 Server Error
{
"error": "Blockchain error",
"message": "Failed to submit transaction to Starknet"
}Example: cURL
curl -X POST https://api.blockfact.io/v1/content/register \
-H "Content-Type: application/json" \
-d '{
"content_url": "https://s3.amazonaws.com/...",
"creator": "0xabc...def",
"timestamp": "2026-03-06T17:24:30Z",
"latitude": 40.7128,
"longitude": -74.0060,
"exif_data": {...},
"capture_timestamp": "2026-03-06T17:24:30Z",
"device_attestation": "..."
}'Rate Limits
- Free Tier: 100 registrations/day
- Pro Tier: 1,000 registrations/day
- Enterprise: Unlimited
💡 Use the SDK
The React Native SDK handles all of this automatically. Use the API directly only if building custom integrations.