Webhook Endpoints

API endpoints to manage webhook subscriptions for receiving real-time notifications about pass and template events.

POST/api/hook/subscribe

Subscribe to Webhooks

Creates a new webhook subscription to receive notifications for the specified event type.

URL Parameters

This endpoint has no path or query parameters for account-wide subscriptions.

To subscribe to events for a specific template only, use: /api/hook/subscribe/{templateIdentifier}

Example URL

Request URL

https://app.passcreator.com/api/hook/subscribe
https://app.passcreator.com/api/hook/subscribe/f4379715-7a69-1742-38ae-836554724306


Authorization

  • Name
    Authorization
    Type
    string
    (mandatory)
    Description

    HTTP Header containing your API key.

Example HTTP Header

HTTP header

POST /api/hook/subscribe HTTP/1.1
Host: app.passcreator.com
Authorization: yourApiKeyHere
Content-Type: application/json


Request Body

  • Name
    target_url
    Type
    string
    (mandatory)
    Description

    The URL that will receive webhook notifications. This URL must be publicly accessible and able to receive POST requests.

  • Name
    event
    Type
    string
    (mandatory)
    Description

    The event type to subscribe to. See Webhooks Overview for available event types.

  • Name
    subscription_url
    Type
    string
    (optional)
    Description

    An optional URL that identifies this subscription. Useful for tracking purposes.

  • Name
    retryEnabled
    Type
    boolean
    (optional)
    Description

    Default: false When set to true, failed webhook deliveries will be retried.

  • Name
    signPayload
    Type
    boolean
    (optional)
    Description

    Default: false When set to true, webhook payloads will be signed for verification.

Example Request

Request body

{
  "target_url": "https://your-server.com/webhook/receiver",
  "event": "pass_created",
  "retryEnabled": true,
  "signPayload": true
}


Returned Values

On success, the endpoint returns HTTP status 201 (Created).

If generateAccessToken query parameter is set to true, the response will include an access token.

  • Name
    accessToken
    Type
    string
    (optional)
    Description

    Only returned if generateAccessToken=true was passed as a query parameter.

Error Responses

  • Name
    ErrorMessage
    Type
    string
    (mandatory)
    Description

    Description of what went wrong. Returned with HTTP status 400 for invalid requests or 404 if the template is not found.

Example Response

Success Response (201)

{}

Success Response with Access Token (201)

{
  "accessToken": "generated-access-token-here"
}

Error Response (400)

{
  "ErrorMessage": "An unknown event type has been specified."
}

Error Response (404)

{
  "ErrorMessage": "The template ID is not known or you don't have access to it."
}

POST / DELETE/api/hook/unsubscribe

Unsubscribe from Webhooks

Removes an existing webhook subscription.

URL Parameters

This endpoint has no path or query parameters.

Example URL

Request URL

https://app.passcreator.com/api/hook/unsubscribe


Authorization

  • Name
    Authorization
    Type
    string
    (mandatory)
    Description

    HTTP Header containing your API key.

Example HTTP Header

HTTP header

POST /api/hook/unsubscribe HTTP/1.1
Host: app.passcreator.com
Authorization: yourApiKeyHere
Content-Type: application/json


Request Body

  • Name
    target_url
    Type
    string
    (mandatory)
    Description

    The target URL of the webhook subscription to remove. This must match the target_url that was used when subscribing.

Example Request

Request body

{
  "target_url": "https://your-server.com/webhook/receiver"
}


Returned Values

On success, the endpoint returns HTTP status 200 (OK) with an empty response body.

If the target_url parameter is missing, HTTP status 400 (Bad Request) is returned.

Example Response

Success Response (200)

{}

GET/api/hook/list

List Active Hooks

Returns a list of all active webhook subscriptions for the authenticated customer.

URL Parameters

This endpoint has no path or query parameters.

Example URL

Request URL

https://app.passcreator.com/api/hook/list


Authorization

  • Name
    Authorization
    Type
    string
    (mandatory)
    Description

    HTTP Header containing your API key.

Example HTTP Header

HTTP header

GET /api/hook/list HTTP/1.1
Host: app.passcreator.com
Authorization: yourApiKeyHere


Returned Values

Returns an array of webhook subscription objects.

  • Name
    subscription_url
    Type
    string | null
    (mandatory)
    Description

    The subscription URL if one was provided during subscription.

  • Name
    target_url
    Type
    string
    (mandatory)
    Description

    The URL that receives webhook notifications.

  • Name
    event
    Type
    string
    (mandatory)
    Description

    The event type this subscription is listening for.

  • Name
    pass_template
    Type
    string | null
    (mandatory)
    Description

    The UUID of the template this subscription is tied to, or null if it applies to all templates.

Example Response

Success Response (200)

[
  {
    "subscription_url": "https://your-server.com/subscriptions/123",
    "target_url": "https://your-server.com/webhook/receiver",
    "event": "pass_created",
    "pass_template": null
  },
  {
    "subscription_url": null,
    "target_url": "https://your-server.com/webhook/template-updates",
    "event": "pass_template_updated",
    "pass_template": "f4379715-7a69-1742-38ae-836554724306"
  }
]

GET/api/hook/publickey

Get Public Key for Signature Verification

Returns the public key used to verify webhook payload signatures.

URL Parameters

This endpoint has no path or query parameters.

Example URL

Request URL

https://app.passcreator.com/api/hook/publickey


Authorization

  • Name
    Authorization
    Type
    string
    (mandatory)
    Description

    HTTP Header containing your API key.

Example HTTP Header

HTTP header

GET /api/hook/publickey HTTP/1.1
Host: app.passcreator.com
Authorization: yourApiKeyHere


Returned Values

  • Name
    publicKey
    Type
    string
    (mandatory)
    Description

    The PEM-encoded public key that can be used to verify webhook signatures.

Use this public key with the signature and signedData fields in webhook payloads to verify authenticity. See Verify a Signature for implementation examples.

Example Response

Success Response (200)

{
  "publicKey": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEpP9pRdcwFoOrhPJCX3WnH8jUpcLe\nP2PxZvOO4Y4hrGVpD8QpISTNPdVYZZBH2x4dlGuHYHMkYph5DqwvzjY00Q==\n-----END PUBLIC KEY-----"
}