PureStamp API Quickstart

Issue and verify cryptographic provenance for AI and human content with PureStamp’s REST API. Get started with copy-paste examples in cURL, JavaScript, and Python.

Base URL

          https://09v8qle7x5.execute-api.us-east-1.amazonaws.com/prod/purestamp/
          
        

Authenticate with your x-api-key header.

Overview

PureStamp’s API secures your content with tamper-evident provenance. Follow these steps: ① Get a pre-signed S3 upload URL, ② Upload your file, ③ Issue or verify a stamp.

POST /upload-url

Generate a pre-signed URL for secure S3 uploads.

POST /purestamp/issue

Add a cryptographic stamp to your file, returning a watermarked URL.

POST /purestamp/verify

Validate provenance and signature for any file or text.

API Endpoints

POST /upload-url

Auth: x-api-key

Request: { "filename": string, "contentType": string }
Response: { "uploadUrl": string, "s3Uri": string, "contentType": string }

            curl -X POST "$BASE/upload-url" \
                  -H "x-api-key: $API_KEY" \
                  -H "Content-Type: application/json" \
                  -d '{"filename":"sample.pdf","contentType":"application/pdf"}'
            
          

POST /purestamp/issue

Auth: x-api-key

Request: { "s3_uri": string, "mime_type": string, "who": "Human | AI | Unknown", "model"?: string }
Response: { "download_url": string, "receipt_id": string }

            curl -X POST "$BASE/purestamp/issue" \
                  -H "x-api-key: $API_KEY" \
                  -H "Content-Type: application/json" \
                  -d '{
                    "s3_uri": "s3://bucket/key.pdf",
                    "mime_type": "application/pdf",
                    "who": "AI",
                    "model": "PureVector"
                  }'
            
          

POST /purestamp/verify

Auth: x-api-key

Request: { "s3_uri": string, "mime_type": string }
Response: { "status": "trusted | untrusted", "who": string, "model"?: string, "signature_valid": boolean, "receipt_id"?: string }

            curl -X POST "$BASE/purestamp/verify" \
                  -H "x-api-key: $API_KEY" \
                  -H "Content-Type: application/json" \
                  -d '{
                    "s3_uri": "s3://bucket/key.pdf",
                    "mime_type": "application/pdf"
                  }'
            
          

POST /onboard

Onboard new customers via AWS Marketplace or direct signup.

Request: { "x-amzn-marketplace-token": string, "product": "purevector" | "purestamp", "email": string }
Response: { "status": "onboarded", "customer_id": string, "api_key": string, "plan": "Pro" }

            curl -X POST "$BASE/onboard" \
                  -H "Content-Type: application/json" \
                  -d '{
                    "x-amzn-marketplace-token": "token123",
                    "product": "purevector",
                    "email": "user@example.com"
                  }'
            
          

Code Examples

Try these examples with your API credentials. Update the hero inputs to customize.


export BASE="https://09v8qle7x5.execute-api.us-east-1.amazonaws.com/prod/purestamp/" 
  
  export API_KEY="<YOUR_API_KEY>"

# Get pre-signed URL
curl -X POST "$BASE/upload-url" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"file.pdf","contentType":"application/pdf"}'

# Upload file (use uploadUrl from response)
# curl -X PUT "" -H "Content-Type: application/pdf" --data-binary @file.pdf

# Issue stamp
curl -X POST "$BASE/purestamp/issue" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"s3_uri":"s3://bucket/key.pdf","mime_type":"application/pdf","who":"AI","model":"PureVector"}'

# Verify content
curl -X POST "$BASE/purestamp/verify" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"s3_uri":"s3://bucket/key.pdf","mime_type":"application/pdf"}'
            
          

Tip: Enter your API credentials in the hero section to customize examples. Try the demo UI.

Status Codes & Errors

Common Errors

  • 400 Bad Request: Missing or invalid input (e.g., no s3_uri, unsupported mime_type)
  • 401 Unauthorized: Invalid or missing x-api-key
  • 403 Forbidden: API key lacks permission or plan limit exceeded
  • 429 Too Many Requests: Rate limit hit; retry with exponential backoff
  • 5xx Server Error: Transient issue; retry with exponential backoff

CORS Configuration

Endpoints support permissive CORS with Access-Control-Allow-* headers for browser compatibility. For custom setups, ensure OPTIONS responses include these headers.

All endpoints now include Access-Control-Allow-Origin: * and Access-Control-Allow-Headers: Content-Type,x-api-key.

Start Building with PureStamp

Secure your AI and human content with our API. Sign up for a free API key or explore the demo UI.