Skip to main content

Tracking User Subscription Changes via Webhooks

This feature allows your system to receive real-time updates whenever a user subscribes or unsubscribes from communications in InTarget.

The event may originate from:

  • an email campaign (e.g., a user clicks Unsubscribe),

  • a user action via an API email link,

  • an action inside the InTarget CRM (e.g., a user was unsubscribed manually), or

  • an automatic system action (e.g., bounce or complaint).

InTarget sends these updates to your webhook endpoint in JSON format.


Quick Start

  1. Provide a webhook URL (HTTPS recommended) to your InTarget manager.

  2. The endpoint must accept POST requests with Content-Type: application/json.

  3. Return 200 OK within 5 seconds after receiving the event.


Event Payload

json

{
"event":"unsubscribe | subscribe",
"channel":"...",
"type":"...",
"value":"contact (email, phone, etc.) | null",
"playerId":"player ID | null",
"occurredAt":"2026-03-04 12:00:00",
"extra":{
}
}

Field Reference

Field

Type

Description

event

string

"subscribe" or "unsubscribe". Defines whether the user opted in or out.

channel

string

The source of the event. See channel table below.

type

string

The communication type affected — "Email", "Phone", "Web Push", or "Unknown".

value

string

The actual contact value (email address, phone number, push token, etc.).

playerId

string|null

The player ID associated with the contact, or null if not available.

occurredAt

string

Time of the event in YYYY-MM-DD HH:mm:ss (UTC).

extra

object

Additional context depending on the channel. See extra table below.


channel

Value

Description

crm

Event triggered inside the InTarget CRM (e.g., manually un/re-subscribed).

api

Unsubscribed via link in an API-sent email.

campaign

Unsubscribed or re-subscribed via link in a campaign email.

system

Automatically unsubscribed by the system due to a bounce or complaint.


extra

Key

Type

When present

Possible values

reason

string

channel = system

Received bounce — permanent bounce

Received 5 soft bounces in a row — repeated soft bounces

Received complaint — complaint from the recipient

templateId

mixed

channel = api

ID of the API email template that contained the unsubscribe link

campaignId

int

channel = campaign

Campaign ID

Did this answer your question?