From zero to a generated, ESPR-ready Digital Product Passport in a handful of cURL commands - then hand the same key to an AI agent so it keeps producing them for you. No package install, no language client; every example is plain HTTP against the REST API.
1. Create a workspace
Sign up and a personal workspace is provisioned for you automatically. A workspace owns your passports, learnings, settings and API keys, and carries the AI mode (Review or Auto). You can rename it and invite teammates later from Dashboard > Workspace.
2. Create a master API key
Open Settings > API Keys in the dashboard and create a key. The secret (it starts with ep_live_sk_) is shown once - copy it now and export it:
# Settings > API Keys in the dashboard creates the key.
# Copy the secret (shown once) and export it for this shell.
export DPP_API_KEY="ep_live_sk_..."- Pick the permissions the key needs:
read,write,delete(anadminkey grants all). - Store keys in environment variables or a secrets manager - never in your source tree.
- If a key leaks, rotate or revoke it from the dashboard; the old key stops working right away.
Confirm the key works by reading your workspace:
curl https://dppautomate.com/api/v1/workspace \
-H "Authorization: Bearer $DPP_API_KEY"{
"data": {
"id": "...",
"name": "Acme GmbH",
"mode": "review",
"role": "owner",
"entitlement": {
"tierId": "starter",
"active": true,
"capacity": 100,
"activePassportCount": 12,
"needsPlan": false
}
}
}3. Generate a passport from an image
The fastest path to a passport: send a product photo to POST /api/v1/passports/generate. The image is a data URL or raw base64. The workspace AI mode decides what happens to the result - in Review mode it lands as a draft; in Auto mode it goes live. Pass create: falsefor a preview that isn't saved.
curl https://dppautomate.com/api/v1/passports/generate \
-X POST \
-H "Authorization: Bearer $DPP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "data:image/png;base64,<BASE64_OF_PRODUCT_PHOTO>"
}'The response wraps the passport with the mode and resulting status:
{
"data": {
"passport": {
"id": "...",
"object": "digital_product_passport",
"identification": {
"productName": "Merino Wool Beanie",
"productCategory": "Textiles & Apparel",
"dppUid": "DPP-1717-AB12CD"
},
"status": "draft"
},
"mode": "review",
"status": "draft",
"created": true
}
}4. List passports
Read your passports back with pagination and filters (status, category, search, favorite, per_page):
curl "https://dppautomate.com/api/v1/passports?status=active&per_page=25" \
-H "Authorization: Bearer $DPP_API_KEY"5. Approve a draft
In Review mode, generations queue up as drafts. List them, then approve the ones you trust - approval promotes the draft to an active passport and captures any human edits as learnings.
# 1. List drafts awaiting review.
curl https://dppautomate.com/api/v1/drafts \
-H "Authorization: Bearer $DPP_API_KEY"
# 2. Approve one -> it becomes an active passport.
curl -X POST https://dppautomate.com/api/v1/drafts/PASSPORT_ID/approve \
-H "Authorization: Bearer $DPP_API_KEY"6. Add a learning
Learnings steer future generations. Add one whenever you notice the AI getting a field wrong; active learnings are injected into the prompt so the next passport is more accurate.
curl https://dppautomate.com/api/v1/learnings \
-X POST \
-H "Authorization: Bearer $DPP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instruction": "Always read the country of origin from the sewn-in label.",
"section": "production"
}'7. Set the mode
Once the model is dialled in for your catalogue, switch the workspace to Auto so new passports go live without a manual approval step:
curl https://dppautomate.com/api/v1/workspace/mode \
-X PUT \
-H "Authorization: Bearer $DPP_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "mode": "auto" }'8. Hand it to an AI agent
DPPAutomate is built to be operated by an LLM. Point your agent at the machine-readable spec and the operator guide, give it the master key, and it can run the whole loop - generate, review, learn, publish. A prompt like this is enough to get started:
You manage my DPPAutomate workspace via its REST API.
- Spec: https://dppautomate.com/api/openapi.json
- Operator guide: https://dppautomate.com/llms.txt
- Auth: send "Authorization: Bearer $DPP_API_KEY" on every /api/v1 request.
Task: for each product photo I give you, call
POST /api/v1/passports/generate. We are in Review mode, so each one
becomes a draft - list them with GET /api/v1/drafts and summarise what
needs a human decision. When I correct a field, add a learning via
POST /api/v1/learnings so future passports improve.The two URLs the agent needs: /api/openapi.json (the full OpenAPI 3.1 contract) and /llms.txt (a concise operator guide). For the full endpoint list, permissions and error model, see the API reference.