All Collections
Integrate
Iterable
PassKit + Iterable - How to update pass records from a webhook
PassKit + Iterable - How to update pass records from a webhook
Jesse Langford avatar
Written by Jesse Langford
Updated over a week ago

In this article, I'll be going over how you can use an Iterable Journey Webhook to update a PassKit member record.

The first thing we need is a long-lived API token from PassKit. A long-lived API token will allow you to make authenticated requests to PassKit servers without needing to refresh the token every hour.

Navigate to the program where your members will be enrolled into. Once there, click on the Settings link in the header, then click the "Pass APIs" tab. Provide your account password into the text box and click the "Generate API Token" button.

You should be served a token in a popup, copy this token for later.

Next, head over to Iterable and click on the integrations tab and select the Journey webhooks option.

Click the New Webhook button and fill out the form as follows.

For Destination, make sure the Custom option is selected. Select PUT for the method. In the endpoint provide https://api.pub1.passkit.io/members/member

*** Note: If you have requested a USA data instance from us, change pub1 to pub2 ***

Change Authentication to None. Add a custom header with the name Authorization and a value of Bearer followed by the long-lived API token copied from PassKit earlier.

Scroll down to the Body section and add the following:

{
"programId": "program_id",
"externalId": "{{email}}",
}

At a minimum, you will need to send along with a programId and externalId . For the programId, you can either provide a static value here or pull it from your user record if you have provided it on signup. This body is a PassKit member record. You can see all values available here.

As an example, If you have a journey where a customer can update either their first name or last name, you could pass in a body like this:

{
"programId": "program_id",
"externalId": "{{email}}",
"person": {
"forename" "{{firstname}}",
"surname": "{{lastname}}"
}
}

Once you have the Body set up, click "Create webhook". Now you can add this webhook into your journey when a user's record is updated.

Did this answer your question?