Webhooks
Updating Contacts via a Webhook
Learn how to use a webhook to update existing contacts in Swivel, including how to authenticate requests, use the contact ID, update contact fields, and add campaigns or Marketing Events.
Overview
Section titled “Overview”You can connect external sources (such as lead generation platforms, marketing tools, or website forms) to automatically update contacts in Swivel.
The Update Contacts Webhook is designed to update contacts that were previously created through the Create Contacts Webhook. Your external source must save the Swivel contact ID returned when a contact is created. This ID is required to identify the contact when updating it later.
This guide walks you through how to connect an external source to Swivel and update existing contact information without manual entry.
Generate an API Key in Swivel
Section titled “Generate an API Key in Swivel”Swivel uses an API key to securely receive contact data from external sources. If you have already generated an API key for this source and used it with the Create Contacts Webhook, you can use the same key.
If you need to generate a new API key, follow the instructions in Creating Contacts via a Webhook.
Connect Swivel to the Contact Source
Section titled “Connect Swivel to the Contact Source”If your source sends data via a webhook:
-
Open your source’s integration settings.
-
Paste your Swivel API key when prompted for authentication.
- use x-api-key as the header key name
-
Configure the webhook to use a PATCH request with the following endpoint:
**https://swivelcrm.io/api/webhook/v1/contacts/{contactId}** -
Define the data to send in the request body using the available parameter keys from the Swivel Supported Fields table. The endpoint accepts JSON and form-urlencoded data.
-
Test the webhook with a sample contact submission.
Updating Your Contacts
Section titled “Updating Your Contacts”The Update Contacts Webhook accepts the same attributes as the Create Contacts endpoint. See the Supported Fields table in Creating Contacts via a Webhook for the available fields.
Any fields included in the request will be updated when they contain a value. Blank fields do not overwrite existing contact information.
For example, if a contact’s name is Johnathan Smith and you send an update with the first name set to John while leaving the last name blank, the contact’s first name will be updated to John and the last name will remain Smith.
Updating Addresses
Section titled “Updating Addresses”Address updates must include all address data you want to keep.
For example, if a contact already has an address in Address Line 1 and you send an update that only adds an apartment number in Address Line 2, Address Line 1 will be removed unless the complete address is included in the update.
Adding Campaigns and Marketing Events
Section titled “Adding Campaigns and Marketing Events”Campaigns and Marketing Events can be added to a contact through an update.
Adding a campaign or Marketing Event will not override or remove existing campaigns or events associated with the contact.

