Webhook payloads

The following sections outline the available webhooks and their corresponding payloads.

Subscribe

This event occurs when a user opts in to a subscription.

Parameter Description Example Type Notes
type Type of event sms.subscribed String The following options are available:
  • email.subscribed
  • sms.subscribed
timestamp Timestamp of when the event occured originally 1632945178104 Long
company Company of the originating event
display_name Name of the company that appears in the Attentive platform Hudson & Ivy String
company_id Unique identifier of the company MDc6Q29tcGFueTU String
subscriber User who has opted in
external_id Unique identifier of the subscriber 16467358 Long
phone Phone number of the subscriber +15555555555 String Note that this may not be included if the user only subscribed to receive email
email Email address of the subscriber test@gmail.com String Note that this may not be included if the user only subscribed to receive SMS
external_identifiers Identifiers from third-party sources
client_user_id List of client user identifiers tied to the subscriber List Only will be included if a client user identifier is available.
custom identifiers Collection of customer identifiers tied to the subscriber Object Additional custom identifiers tied to a subscriber. Can be set via the Subscriptions API
creative Sign-up source of the subscription
name Name of the sign-up source Text to Join String
type Type of sign-up source TEXT_TO_JOIN String
subtype Subtype of sign-up source CODE String
subscription Subscription metadata of the subscribe event
type The specifc type of subscription MARKETING String The following options are available:
  • MARKETING
  • TRANSACTIONAL

Subscribe event types

Two Subscribe event types can be triggered: email.subscribed and sms.subscribed. The following sections outline each event type and provide an example payload.

email.subscribed

This event occurs when a user opts in to an email subscription. The following is an example of the email.subscribed payload:

  
{
	"type": "email.subscribed",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "",
		"external_id": 16467358
	},
	"creative": {
		"name": "Desktop Fullscreen (Email + SMS) - 15% Off",
		"type": "DESKTOP",
		"subtype": "DYNAMIC"
	},
	"subscription": {
		"type": "MARKETING"
	}
}

sms.subscribed

This event occurs when a user opts in to an SMS subscription. The following is an example of the sms.subscribed payload:

  {
	"type": "sms.subscribed",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "+15555555555 ",
		"external_id": 16467358
	},
	"creative": {
		"name": "Desktop Fullscreen (Email + SMS) - 15% Off",
		"type": "DESKTOP",
		"subtype": "DYNAMIC"
	},
	"subscription": {
		"type": "MARKETING"
	}
}

Unsubscribe

This event occurs when a user opts out of a subscription.

Parameter Description Example Type Notes
type Type of event sms.unsubscribed String The following options are available:
  • email.unsubscribed
  • sms.unsubscribed
timestamp Timestamp of when the event occured originally 1632945178104 Long
company Company of the originating event
display_name Name of the company that appears in the Attentive platform Hudson & Ivy String
company_id Unique identifier of the company MDc6Q29tcGFueTU String
subscriber User who has opted in
external_id Unique identifier of the subscriber 16467358 Long
phone Phone number of the subscriber +15555555555 String Note that this may not be included if the user only subscribed to receive email
email Email address of the subscriber test@gmail.com String Note that this may not be included if the user only subscribed to receive SMS
external_identifiers Identifiers from third-party sources
client_user_id List of client user identifiers tied to the subscriber List Only will be included if a client user identifier is available.
custom identifiers Collection of customer identifiers tied to the subscriber Object Additional custom identifiers tied to a subscriber. Can be set via the Subscriptions API
subscription Subscription metadata of the unsubscribe event
type The specifc type of subscription MARKETING String The following options are available:
  • MARKETING
  • TRANSACTIONAL

Unsubscribe event types

Two Unsubscribe event types can be triggered: email.unsubscribed and sms.unsubscribed. The following sections outline each event type and provide an example payload.

email.unsubscribed

This event occurs when a user opts out of an email subscription. The following is an example of the email.unsubscribed payload:

  {
	"type": "email.unsubscribed",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "",
		"external_id": 16467358
	},
	"subscription": {
		"type": "MARKETING"
	}
}

sms.unsubscribed

This event occurs when a user opts out of an SMS subscription. The following is an example of the sms.unsubscribed payload:

  
{
	"type": "sms.unsubscribed",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "+15555555555",
		"external_id": 16467358
	},
	"subscription": {
		"type": "MARKETING"
	}
}

Message Sent

This event occurs when a message is sent.

Parameter Description Example Type Notes
type Type of event sms.sent String The following options are available:
  • sms.sent
  • email.sent
timestamp Timestamp of when the event occured originally 1632945178104 Long
company Company of the originating event
display_name Name of the company that appears in the Attentive platform Hudson & Ivy String
company_id Unique identifier of the company MDc6Q29tcGFueTU String
subscriber User who has opted in
external_id Unique identifier of the subscriber 16467358 Long
phone Phone number of the subscriber +15555555555 String Note that this may not be included if the user only subscribed to receive email
email Email address of the subscriber test@gmail.com String Note that this may not be included if the user only subscribed to receive SMS
external_identifiers Identifiers from third-party sources
client_user_id List of client user identifiers tied to the subscriber List Only will be included if a client user identifier is available.
custom identifiers Collection of customer identifiers tied to the subscriber Object Additional custom identifiers tied to a subscriber. Can be set via the Subscriptions API
message Message that was sent
id Unique identifier of the message MDc6TWVzc2FnZTEyNzI1MA String
type The type of message sent ONE_TIME String
text The copy of the message sent Shop this deal! https://example.attn.tv/l/abc/123 String
channel The channel the message was the sent through TEXT String
subject Subject of email Message 50% all Jeans String Note that this only exists for Email Sent payloads
from_email The email address from which the email was sent noreply@gmail.com String Note that this only exists for Email Sent payloads
to_email Email Address which the email was sent to subscriber-email@gmail.com String Note that this only exists for Email Sent payloads

Message sent event type

Two Message Sent event types can be triggered: sms.sent and email.sent. The following section outlines this event type and provides example payloads.

sms.sent

This event occurs when an SMS message is sent. The following is an example of the sms.sent payload:

  
{
	"type": "sms.sent",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "+15555555555",
		"external_id": 16467358
	},
	"message": {
		"id": "MDc6TWVzc2FnZTEyNzI1MA",
		"type": "ONE_TIME",
                "text": "Shop this deal! https://example.attn.tv/l/abc/123",
                "channel": "TEXT"
	}
}

email.sent

This event occurs when an email message is sent. The following is an example of the email.sent payload:

  
{
	"type": "email.sent",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "+15555555555",
		"external_id": 16467358
	},
	"message": {
		"id": "MTY6RW1haWxNZXNzYWdlU2VudDI",
		"subject": "ONE_TIME",
		"from_email": "no-reply@attentivemobile.com",
                "to_email": "test@attentivemobile.com",
                "channel": "EMAIL"
	}
}

Message Link Clicked

This event occurs when a message link is clicked.

Parameter Description Example Type Notes
type Type of event sms.message_link_click String The following options are available:
  • sms.message_link_click
  • email.message_link_click
timestamp Timestamp of when the event occured originally 1632945178104 Long
company Company of the originating event
display_name Name of the company that appears in the Attentive platform Hudson & Ivy String
company_id Unique identifier of the company MDc6Q29tcGFueTU String
subscriber User who has opted in
external_id Unique identifier of the subscriber 16467358 Long
phone Phone number of the subscriber +15555555555 String Note that this may not be included if the user only subscribed to receive email
email Email address of the subscriber test@gmail.com String Note that this may not be included if the user only subscribed to receive SMS
external_identifiers Identifiers from third-party sources
client_user_id List of client user identifiers tied to the subscriber List Only will be included if a client user identifier is available.
custom identifiers Collection of customer identifiers tied to the subscriber Object Additional custom identifiers tied to a subscriber. Can be set via the Subscriptions API
message_link_click Message link that was clicked
message_id GID of message id MDc6TWVzc2FnZTE String
link_target The link target https://testsite.com/ String
message_type The type of message sent AUTOMATED String
link_id The identifier of the link MTY6TWVzc2FnZUxpbmtDbGljazI String
channel The channel the message was the sent through TEXT String

Message link clicked event type

Two message link clicked event types can be triggered: sms.message_link_click and email.message_link_click. The following section outlines this event type and provides example payloads.

sms.message_link_click

This event occurs when a link is clicked in an SMS message. The following is an example of the sms.message_link_click payload:

{
	"type": "sms.message_link_click",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "+15555555555",
		"external_id": 16467358
	},
	"message_link_click": {
		"linkTarget": "https://testsite.com/?utm_medium=text&utm_source=attentive&utm_campaign=exampletext",
		"messageId": "MDc6TWVzc2FnZTE",
		"messageType": "AUTOMATED",
                "linkId": "MTY6TWVzc2FnZUxpbmtDbGljazI"
	}
}

email.message_link_click

This event occurs when a link is clicked in an email message. The following is an example of the email.message_link_click payload:

{
	"type": "email.message_link_click",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "+15555555555",
		"external_id": 16467358
	},
	"message_link_click": {
		"linkTarget": "https://testsite.com/?utm_medium=text&utm_source=attentive&utm_campaign=exampletext",
		"messageId": "MDc6TWVzc2FnZTE",
		"messageType": "AUTOMATED",
                "linkId": "MTY6TWVzc2FnZUxpbmtDbGljazI"
                "channel": "EMAIL"
	}
}

Custom Attribute Set

This event occurs when a custom attribute is set.

Parameter Description Example Type Notes
type Type of event custom_attribute.set String
timestamp Timestamp of when the event occured originally 1632945178104 Long
company Company of the originating event
display_name Name of the company that appears in the Attentive platform Hudson & Ivy String
company_id Unique identifier of the company MDc6Q29tcGFueTU String
subscriber User who has opted in
external_id Unique identifier of the subscriber 16467358 Long
phone Phone number of the subscriber +15555555555 String Note that this may not be included if the user only subscribed to receive email
email Email address of the subscriber test@gmail.com String Note that this may not be included if the user only subscribed to receive SMS
external_identifiers Identifiers from third-party sources
client_user_id List of client user identifiers tied to the subscriber List Only will be included if a client user identifier is available.
custom identifiers Collection of customer identifiers tied to the subscriber Object Additional custom identifiers tied to a subscriber. Can be set via the Subscriptions API
user_property Information about the user property
id GID of user property MTY6Q3VzdG9tUHJvcGVydHlJZGlkOiAiMjg3Igo String
name The name of the property Favorite Color String
value The value of the property Blue String

Custom attribute set event type

One Custom Attribute Set event type can be triggered: custom_attribute.set. The following section outlines this event type and provides an example payload.

custom_attribute.set

This event occurs when a custom attribute is set. The following is an example of the custom_attribute.set payload:

  
{
	"type": "custom_attribute.set",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "+15555555555",
		"external_id": 16467358,
		"external_identifiers": {
			"klaviyo_id": ["abc123"],
			"shopify_id": ["123456789"]
		}
	},
	"user_property": {
		"id": "MTY6Q3VzdG9tUHJvcGVydHlJZGlkOiAiMjg3Igo",
		"name": "Favorite Color",
		"value": "Blue"
	}
}

Email Opened

This event occurs when an email is opened.

Parameter Description Example Type Notes
type Type of event email.opened String The following options are available:
  • email.opened
timestamp Timestamp of when the event occured originally 1632945178104 Long
company Company of the originating event
display_name Name of the company that appears in the Attentive platform Hudson & Ivy String
company_id Unique identifier of the company MDc6Q29tcGFueTU String
subscriber User who has opted in
external_id Unique identifier of the subscriber 16467358 Long
phone Phone number of the subscriber +15555555555 String Note that this may not be included if the user only subscribed to receive email
email Email address of the subscriber test@gmail.com String Note that this may not be included if the user only subscribed to receive SMS
external_identifiers Identifiers from third-party sources
client_user_id List of client user identifiers tied to the subscriber List Only will be included if a client user identifier is available.
custom identifiers Collection of customer identifiers tied to the subscriber Object Additional custom identifiers tied to a subscriber. Can be set via the Subscriptions API
message Message that was opened
id Unique identifier of the message MDc6TWVzc2FnZTE String
type The type of message opened ONE_TIME String
name The name of the message opened Discount Available! String
channel The channel the message was the sent through EMAIL String

Email Opened event type

The following section outlines this event type and provides an example payload.

email.opened

This event occurs when an email is opened. The following is an example of the email.opened payload:

{
	"type": "email.opened",
	"timestamp": 1632945178104,
	"company": {
		"display_name": "Hudson & Ivy",
		"company_id": "MDc6Q29tcGFueTU"
	},
	"subscriber": {
		"email": "test@gmail.com",
		"phone": "+15555555555",
		"external_id": 16467358
	},
	"message": {
                "id": "MDc6TWVzc2FnZTE",
                "type": "JOURNEY",
                "name": "Message Name",
                "channel": "TEXT"
	}
}