
API Documentation
v1.0
Getting Started
The Cabbage & Tea API provides programmatic access to content provenance verification, gating, and stamping services. All API requests require authentication via API key.
Base URL
https://api.cabbageandtea.comQuick Start
- Sign up for a Cabbage & Tea account
- Generate an API key from your dashboard
- Make your first API request using the examples below
- Configure webhooks to receive real-time notifications
Authentication
All API requests must include your API key in the Authorization header using Bearer authentication.
Authorization Header
Authorization: Bearer YOUR_API_KEYPOST /verify
Verify C2PA credentials for an asset and return a trust score with credential summary.
Request Body
{
"url": "string", // Asset URL to verify
"bytes_base64": "string" // Or base64-encoded asset bytes
}Response
{
"trust_score": 94.5,
"credentials": {
"issuer": "Adobe",
"timestamp": "2024-01-15T14:30:22Z",
"signature_valid": true
},
"label_url": "https://verify.cabbageandtea.com/..."
}Code Examples
curl
curl -X POST https://api.cabbageandtea.com/verify \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/image.jpg"
}'POST /gate/check
Determine if an asset should be allowed or blocked based on provenance policy.
Request Body
{
"asset_id": "string", // Asset identifier
"policy": "hard|soft" // Enforcement policy
}Response
{
"decision": "allow|block",
"reasons": ["Missing C2PA credentials", "..."]
}curl
curl -X POST https://api.cabbageandtea.com/gate/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"asset_id": "img_2024_001",
"policy": "hard"
}'POST /stamp
Attach signed Content Credentials to an asset with your organization identity.
Request Body
{
"url": "string", // Asset URL to stamp
"signer_id": "string", // Your signer identifier
"claims": { // Custom claims to include
"author": "string",
"location": "string"
}
}curl
curl -X POST https://api.cabbageandtea.com/stamp \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/image.jpg",
"signer_id": "org-prod-001",
"claims": {
"author": "Jane Doe",
"location": "New York, NY"
}
}'Webhooks
Receive real-time notifications when events occur in your Cabbage & Tea account.
Available Events
asset.verifiedAsset verification completed
asset.blockedAsset blocked by gate
override.performedManual override executed
metadata.strippedC2PA metadata removed detected
Webhook Payload Example
{
"event": "asset.verified",
"timestamp": "2024-01-15T14:30:22Z",
"data": {
"asset_id": "img_2024_001",
"trust_score": 94.5,
"verified": true
}
}