Copy curl -X POST https://api.passinstance.com/api/v1/templates \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "VIP Loyalty Card Template",
"description": "Exclusive loyalty and rewards card for VIP customers",
"organizationName": "Acme Rewards",
"kind": "storeCard",
"status": "ACTIVE",
"preferredStyleScheme": "DARK",
"colors": {
"backgroundColor": "#1b2d3c",
"foregroundColor": "#ffffff",
"labelColor": "#7db4f0"
},
"barcode": {
"format": "QR",
"message": "https://passinstance.com/p/{serialNumber}",
"altText": "Scan at checkout"
},
"images": {
"icon": "https://assets.passinstance.com/media/icon.png",
"logo": "https://assets.passinstance.com/media/logo.png",
"strip": "https://assets.passinstance.com/media/strip.png"
},
"fields": {
"headers": [{ "key": "tier", "label": "TIER", "value": "Gold VIP" }],
"primary": [{ "key": "memberName", "label": "MEMBER", "value": "{name}" }],
"secondary": [{ "key": "points", "label": "POINTS", "value": "0" }],
"auxiliary": [{ "key": "memberSince", "label": "MEMBER SINCE", "value": "2026" }],
"back": [{ "key": "terms", "label": "Terms & Conditions", "value": "Valid at all participating stores." }]
}
}'Created ApiResponseDto<{ id: string }> returned upon template creation.
Copy {
"success": true,
"data": {
"id": "tpl_8f2a1e0b-3c4d-4e5f-9a1b-2c3d4e5f6a7b"
},
"description": "Template successfully created!",
"errors": [],
"statusCode": 201
}Envelope: ApiResponseDto<T> HTTPS (TLS 1.3)