Skip to main content

Webhook payload

Learn about the content of the payload received.

About webhook payload

You have the flexibility to specify which webhooks (ie events) you would like to receive. To optimize the volume of HTTP requests directed to your server, it's advisable to only subscribe to the events you're equipped to manage. For detailed guidance on setting up webhooks, refer to the "Subscribing to Swapcard's webhooks" section.

Delivery Headers

When you receive an HTTP POST request on the url configured for Swapcard's webhooks, it will include several specific headers:

HeaderDescription
Content-TypeIndicates the content type of the request (e.g., application/json).
User-AgentIdentifies the agent sending the request (e.g., Swapcard/Webhook).
X-Signature-256A HMAC hex digest used for request authentication.

Delivery payload fields

The JSON body of each request will vary based on the action that initiated the request. Below is a list of top-level fields in the payload:

FieldRequiredTypeDescription
contextYesContextIncludes information such as the event ID, community ID (if the action happened on the community profile) and the user ID.
event_profileOptional, present if action taken on profilePeopleDetails of the profile on which the action was taken
event_exhibitorOptional, present if action taken on exhibitorExhibitorDetails of the exhibitor on which the action was taken
planningOptional, present if action taken on planningPlanningDetails of the planning on which the action was taken
actionYesstring, one of profile_update, profile_create, exhibitor_create, exhibitor_update, planning_create, planning_updateSpecifies the action.
datetimeYesISO datetime stringTimestamp of the action

To get the full payload detail of each webhook, have a look at the reference page.