---
updatedAt: 2026-05-27T00:39:46.000Z
agentTools:
  projectIndex: https://docs.trybadge.com/llms.txt
---

# Create Pass Template

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Badge API",
    "version": "0"
  },
  "servers": [
    {
      "url": "https://api.trybadge.com/v0"
    }
  ],
  "security": [
    {
      "WorkspaceAuth": []
    }
  ],
  "tags": [
    {
      "name": "Pass Template"
    }
  ],
  "paths": {
    "/passTemplates": {
      "post": {
        "operationId": "passTemplateCreate",
        "tags": [
          "Pass Template"
        ],
        "summary": "Create Pass Template",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "passType",
                  "applePassTypeIdentifier",
                  "revision",
                  "publish"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "passType": {
                    "$ref": "#/components/schemas/PassType"
                  },
                  "applePassTypeIdentifier": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Set to `null` to create without an Apple Pass Type Identifier.\n"
                  },
                  "googleIssuerIdentifier": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The identifier of the Google Wallet Issuer to use. Set to `null` to create without a Google Wallet Issuer. Omitting this field is deprecated; supply an explicit identifier instead.\n"
                  },
                  "revision": {
                    "$ref": "#/components/schemas/PassTemplateRevisionCreate"
                  },
                  "publish": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "passTemplate"
                  ],
                  "properties": {
                    "passTemplate": {
                      "$ref": "#/components/schemas/PassTemplate"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400ErrorMessage"
          },
          "403": {
            "$ref": "#/components/responses/403ErrorMessage"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "WorkspaceAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "RelevantAt": {
        "type": "string",
        "format": "date-time",
        "description": "ISO 8601 datetime string. Sets the event start time for Apple and Google Wallet relevance triggering. EVENT_TICKET pass templates only. This field does not support dynamic values.\n",
        "example": "2026-09-15T19:00:00Z"
      },
      "PassTemplate": {
        "type": "object",
        "required": [
          "id",
          "name",
          "archivedAt",
          "latestRevision"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "archivedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "previewData": {
            "$ref": "#/components/schemas/PassTemplatePreviewData"
          },
          "latestRevision": {
            "$ref": "#/components/schemas/PassTemplateRevision"
          },
          "publishedRevision": {
            "$ref": "#/components/schemas/PassTemplateRevision"
          }
        }
      },
      "PassType": {
        "type": "string",
        "enum": [
          "LOYALTY",
          "GIFT_CARD",
          "EVENT_TICKET",
          "OFFER",
          "GENERIC"
        ]
      },
      "PassTemplatePreviewData": {
        "type": "object",
        "required": [
          "description",
          "iconUri",
          "logoUri",
          "backgroundColor",
          "labelColor",
          "supportEmail"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "iconUri": {
            "type": "string"
          },
          "logoUri": {
            "type": "string"
          },
          "backgroundColor": {
            "type": "string"
          },
          "labelColor": {
            "type": "string"
          },
          "supportEmail": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "PassTemplateRevision": {
        "type": "object",
        "required": [
          "description",
          "logoUri",
          "backgroundColorHex",
          "textColorHex",
          "secondaryFields",
          "backFields",
          "locationMessages",
          "iosStoreIdentifiers",
          "smartTap",
          "appleVas",
          "appleFeaturedActions",
          "applePosterStyleEnabled",
          "posterSuppressHeaderDarkening"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "The user facing name of this pass.\n"
          },
          "logoUri": {
            "type": "string"
          },
          "iconUri": {
            "type": "string"
          },
          "coverImageUri": {
            "type": "string"
          },
          "alternateCoverImageUri": {
            "type": "string"
          },
          "backgroundColorHex": {
            "$ref": "#/components/schemas/HexString"
          },
          "textColorHex": {
            "$ref": "#/components/schemas/HexString"
          },
          "applePosterStyleEnabled": {
            "type": "boolean"
          },
          "posterArtwork": {
            "type": "string"
          },
          "posterSuppressHeaderDarkening": {
            "type": "boolean"
          },
          "heading": {
            "type": "string"
          },
          "headerField": {
            "$ref": "#/components/schemas/RevisionField"
          },
          "secondaryFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RevisionField"
            }
          },
          "footerFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RevisionField"
            }
          },
          "barcodeType": {
            "$ref": "#/components/schemas/BarcodeType"
          },
          "barcodeData": {
            "type": "string"
          },
          "barcodeText": {
            "type": "string"
          },
          "backFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RevisionBackField"
            }
          },
          "locationMessages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PassLocationMessage"
            }
          },
          "expiresAt": {
            "type": "string",
            "description": "ISO 8601 date time string or a dynamic value."
          },
          "relevantAt": {
            "$ref": "#/components/schemas/RelevantAt"
          },
          "webAppLinkUrl": {
            "type": "string",
            "format": "uri"
          },
          "webAppLinkIdentifier": {
            "type": "string"
          },
          "androidPackageName": {
            "type": "string"
          },
          "androidLinkDisplayText": {
            "type": "string"
          },
          "iosStoreIdentifiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "iosLaunchUrl": {
            "type": "string",
            "format": "uri"
          },
          "smartTap": {
            "type": "object",
            "properties": {
              "redemptionIssuerIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "redemptionValue": {
                "type": "string"
              }
            }
          },
          "appleVas": {
            "type": "object",
            "properties": {
              "encryptionPublicKey": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "requiresAuthentication": {
                "type": "boolean"
              }
            }
          },
          "appleFeaturedActions": {
            "type": "array",
            "maxItems": 2,
            "items": {
              "$ref": "#/components/schemas/AppleFeaturedAction"
            }
          }
        }
      },
      "PassTemplateRevisionCreate": {
        "type": "object",
        "description": "Fields in this object support dynamic values, fields that do not support dynamic values are noted.\nSupport for dynamic values is as follows:\n  - Each field can be a string value or contain a single dynamic value.\n  - To make a field dynamic, it must be set in the following format `{{ entity.attribute }}`.\n  - A default value can be passed using the following syntax `{{ entity.attribute | \"default value\" }}`.\n  - A Pass Template Revision has support for attributes from two entities, Pass and User. These can be accessed with the entity name `pass` and `user`. EG: To have a field show the value of a Pass attribute named `memberId`, the field's value would be set to `{{ pass.memberId }}`.\n",
        "required": [
          "description",
          "logoUri",
          "backgroundColorHex",
          "textColorHex"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "The user facing name of this pass. This name should end with a descriptor noun; such as Pass, Ticket, or Card.\nThis field does not support dynamic values.\n"
          },
          "logoUri": {
            "type": "string",
            "minLength": 1
          },
          "iconUri": {
            "type": "string",
            "minLength": 1,
            "description": "This field is generated from the `logoUri` if it is not specified."
          },
          "coverImageUri": {
            "type": "string",
            "minLength": 1,
            "description": "This image is resized to display consistently across wallet platforms\n"
          },
          "alternateCoverImageUri": {
            "type": "string",
            "minLength": 1,
            "description": "A cover image to show on platforms with less strict cover image requirements. Currently this is only Google Wallet.\nThis image is not resized before sending to the wallet platform and is subject to the limitations of and resizing performed by each platform.\nAnimation can be achieved on Google Wallet by supplying a webp or gif image in this field.\n"
          },
          "backgroundColorHex": {
            "$ref": "#/components/schemas/HexString",
            "description": "This field does not support dynamic values."
          },
          "textColorHex": {
            "$ref": "#/components/schemas/HexString",
            "description": "This field does not support dynamic values."
          },
          "applePosterStyleEnabled": {
            "type": "boolean",
            "description": "Enable Apple Wallet Poster Layout on iOS 27+. This field does not support dynamic values."
          },
          "posterArtwork": {
            "type": "string",
            "minLength": 1,
            "description": "Background image used for Apple Wallet poster styles."
          },
          "posterSuppressHeaderDarkening": {
            "type": "boolean",
            "description": "Suppress Apple's header darkening gradient over poster artwork. This field does not support dynamic values."
          },
          "heading": {
            "type": "string"
          },
          "headerField": {
            "$ref": "#/components/schemas/RevisionFieldUpdate"
          },
          "secondaryFields": {
            "type": "array",
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/RevisionFieldUpdate"
            }
          },
          "footerFields": {
            "type": "array",
            "maxItems": 1,
            "description": "This field is shown on Google Wallet, and on Apple Wallet iOS 27+ when Apple Poster Layout is enabled.",
            "items": {
              "$ref": "#/components/schemas/RevisionFieldUpdate"
            }
          },
          "barcodeType": {
            "$ref": "#/components/schemas/BarcodeType",
            "description": "This field does not support dynamic values."
          },
          "barcodeData": {
            "type": "string"
          },
          "barcodeText": {
            "type": "string"
          },
          "backFields": {
            "type": "array",
            "description": "Link identifiers do not support dynamic values.",
            "items": {
              "$ref": "#/components/schemas/RevisionBackFieldUpdate"
            }
          },
          "locationMessages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PassLocationMessage"
            }
          },
          "expiresAt": {
            "type": "string",
            "description": "Use an ISO 8601 date-time string, such as\n`2026-01-01T00:00:00Z`, to give every pass the same expiry.\n\nTo set expiry per pass, use a dynamic pass attribute such as\n`{{ pass.expiry }}` and provide that pass attribute when creating\nor updating each pass. The pass attribute value must also be an ISO\n8601 date-time string, for example\n`\"expiry\": \"2026-01-01T00:00:00Z\"`.\n\nIf the value is not a valid ISO 8601 date-time string, the expiry\nis ignored.\n"
          },
          "relevantAt": {
            "$ref": "#/components/schemas/RelevantAt"
          },
          "webAppLinkUrl": {
            "type": "string",
            "description": "This field is only shown on Google Wallet",
            "format": "uri",
            "pattern": "^https?"
          },
          "webAppLinkIdentifier": {
            "type": "string",
            "minLength": 1,
            "description": "Setting this value enables tracking on the `webAppLinkUrl`. Use the same value across revisions to preserve tracking data, changing it will reset tracking to 0. This field does not support dynamic values.\n"
          },
          "androidPackageName": {
            "type": "string",
            "pattern": "^[a-z][a-zA-Z0-9_]*(?:\\.[a-z][a-zA-Z0-9_]*)+$"
          },
          "androidLinkDisplayText": {
            "type": "string",
            "description": "Recommended 30 characters max to ensure this is not truncated."
          },
          "iosStoreIdentifiers": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          "iosLaunchUrl": {
            "type": "string",
            "description": "A URL iOS passes to an associated app from iosStoreIdentifiers during launch. This value only takes effect when a valid value is passed in iosStoreIdentifiers.",
            "format": "uri"
          },
          "smartTap": {
            "type": "object",
            "description": "Setup Smart Tap to enable NFC for the Google Wallet platform.",
            "properties": {
              "redemptionIssuerIds": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "string",
                  "pattern": "^[0-9]+$",
                  "description": "This field does not support dynamic values."
                }
              },
              "redemptionValue": {
                "type": "string",
                "minLength": 1,
                "description": "The NFC payload transmitted to compatible Google Wallet's Smart Tap readers for contactless interactions. If not specified, the `barcodeData` will be used. The message may only contain ASCII characters. If the dynamic value contains invalid data, it will be ignored."
              }
            }
          },
          "appleVas": {
            "type": "object",
            "description": "Setup value added service to enable NFC for supported wallet platforms.",
            "properties": {
              "encryptionPublicKey": {
                "type": "string",
                "pattern": "^(-----BEGIN PUBLIC KEY-----[A-Za-z0-9+/\\s]+={0,2}\\s+-----END PUBLIC KEY-----|[A-Za-z0-9+/]+={0,2})$",
                "description": "This field does not support dynamic values."
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "description": "The NFC payload transmitted to compatible Apple Wallet's VAS readers for contactless interactions. The message may only contain ASCII characters. If the dynamic value contains invalid data, it will be ignored. If the message is more than 64 bytes, it will be truncated."
              },
              "requiresAuthentication": {
                "type": "boolean",
                "description": "This field does not support dynamic values."
              }
            }
          },
          "appleFeaturedActions": {
            "type": "array",
            "maxItems": 2,
            "description": "This field is only shown on Apple Wallet. Identifiers must be unique within the list.",
            "items": {
              "$ref": "#/components/schemas/AppleFeaturedActionUpdate"
            }
          }
        }
      },
      "HexString": {
        "type": "string",
        "pattern": "^#[a-fA-F0-9]{6}$"
      },
      "BarcodeType": {
        "type": "string",
        "enum": [
          "QR_CODE",
          "AZTEC",
          "CODE_128",
          "PDF_417"
        ]
      },
      "PassLocationMessage": {
        "type": "object",
        "required": [
          "message",
          "latitude",
          "longitude"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "latitude": {
            "type": "number",
            "format": "float"
          },
          "longitude": {
            "type": "number",
            "format": "float"
          }
        }
      },
      "RevisionField": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      },
      "RevisionFieldUpdate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      },
      "AppleFeaturedActionType": {
        "type": "string",
        "enum": [
          "addToBalance",
          "membershipBenefits",
          "order",
          "shop",
          "viewOffersRewards",
          "bookAppointment",
          "bookCar",
          "bookFlight",
          "bookStay",
          "viewSchedule",
          "listenToMusic",
          "watchTrailer"
        ]
      },
      "AppleFeaturedAction": {
        "type": "object",
        "required": [
          "identifier",
          "type",
          "url"
        ],
        "properties": {
          "identifier": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "$ref": "#/components/schemas/AppleFeaturedActionType",
            "description": "Refer to Apple's documentation on [featured actions](https://developer.apple.com/documentation/walletpasses/defining-the-metadata-of-your-wallet-pass#Add-featured-actions).\n"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "AppleFeaturedActionUpdate": {
        "type": "object",
        "required": [
          "identifier",
          "type",
          "url"
        ],
        "properties": {
          "identifier": {
            "type": "string",
            "minLength": 1,
            "description": "Tracking identifier for this action. Use the same value across revisions to preserve tracking data, changing it will reset tracking to 0. This field does not support dynamic values.\n"
          },
          "type": {
            "$ref": "#/components/schemas/AppleFeaturedActionType",
            "description": "Refer to Apple's documentation on [featured actions](https://developer.apple.com/documentation/walletpasses/defining-the-metadata-of-your-wallet-pass#Add-featured-actions). This field does not support dynamic values.\n"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "RevisionBackField": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "link": {
            "type": "object",
            "required": [
              "url",
              "identifier"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "identifier": {
                "type": "string",
                "description": "Used for tracking the same link across revisions.\n"
              }
            }
          }
        }
      },
      "RevisionBackFieldUpdate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "link": {
            "type": "object",
            "required": [
              "url",
              "identifier"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "identifier": {
                "type": "string",
                "description": "Used for tracking the same link across revision updates. This value should be set to the same value for like links between updates. Changing this value for a link will reset the link click count.\n"
              }
            }
          }
        }
      }
    },
    "responses": {
      "403ErrorMessage": {
        "description": "Request failed due to insufficient permissions.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "400ErrorMessage": {
        "description": "Invalid input was received.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
```