diff --git a/CHANGES.MD b/CHANGES.MD
index 945fbe3c..408f53d3 100644
--- a/CHANGES.MD
+++ b/CHANGES.MD
@@ -1,3 +1,8 @@
+3.22.0 (2026-01-05)
+=================
+- Added support for `$user_email`, `$review.$reviewed_user_id` fields to `$create_content`, `$update_content` events
+- Added support for `$brand_name`, `$site_country`, `$site_domain` fields to `$flag_content` event
+
3.21.2 (2025-07-29)
=================
- Bumped version for `gson` from `2.10` to `2.13.1`
diff --git a/README.md b/README.md
index de6abcbf..efe027b5 100644
--- a/README.md
+++ b/README.md
@@ -13,13 +13,13 @@ Java 1.7 or later.
com.siftscience
sift-java
- 3.21.2
+ 3.22.0
```
### Gradle
```
dependencies {
- compile 'com.siftscience:sift-java:3.21.2'
+ compile 'com.siftscience:sift-java:3.22.0'
}
```
### Other
diff --git a/build.gradle b/build.gradle
index 1bd02452..b46c8139 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ apply plugin: 'signing'
apply plugin: 'java-library-distribution'
group = 'com.siftscience'
-version = '3.21.2'
+version = '3.22.0'
repositories {
mavenCentral()
diff --git a/src/main/java/com/siftscience/Constants.java b/src/main/java/com/siftscience/Constants.java
index 4d401eae..997d53ba 100644
--- a/src/main/java/com/siftscience/Constants.java
+++ b/src/main/java/com/siftscience/Constants.java
@@ -3,6 +3,6 @@
public class Constants {
public static final String API_VERSION = "v205";
- public static final String LIB_VERSION = "3.21.2";
+ public static final String LIB_VERSION = "3.22.0";
public static final String USER_AGENT_HEADER = String.format("SiftScience/%s sift-java/%s", API_VERSION, LIB_VERSION);
}
diff --git a/src/main/java/com/siftscience/model/BaseContentFieldSet.java b/src/main/java/com/siftscience/model/BaseContentFieldSet.java
index 35f15302..34087a2e 100644
--- a/src/main/java/com/siftscience/model/BaseContentFieldSet.java
+++ b/src/main/java/com/siftscience/model/BaseContentFieldSet.java
@@ -7,6 +7,7 @@ public abstract class BaseContentFieldSet>
extends BaseAppBrowserSiteBrandFieldSet {
@Expose @SerializedName("$content_id") private String contentId;
@Expose @SerializedName("$status") private String status;
+ @Expose @SerializedName(USER_EMAIL) private String userEmail;
@Expose @SerializedName(VERIFICATION_PHONE_NUMBER) private String verificationPhoneNumber;
public String getContentId() {
@@ -35,4 +36,13 @@ public T setVerificationPhoneNumber(String verificationPhoneNumber) {
this.verificationPhoneNumber = verificationPhoneNumber;
return (T) this;
}
+
+ public String getUserEmail() {
+ return userEmail;
+ }
+
+ public T setUserEmail(String userEmail) {
+ this.userEmail = userEmail;
+ return (T) this;
+ }
}
diff --git a/src/main/java/com/siftscience/model/FlagContentFieldSet.java b/src/main/java/com/siftscience/model/FlagContentFieldSet.java
index a3485057..98a41572 100644
--- a/src/main/java/com/siftscience/model/FlagContentFieldSet.java
+++ b/src/main/java/com/siftscience/model/FlagContentFieldSet.java
@@ -30,9 +30,12 @@ public String toString() {
}
}
+ @Expose @SerializedName("$brand_name") private String brandName;
@Expose @SerializedName("$content_id") private String contentId;
@Expose @SerializedName("$flagged_by") private String flaggedBy;
@Expose @SerializedName("$reason") private String reason;
+ @Expose @SerializedName("$site_country") private String siteCountry;
+ @Expose @SerializedName("$site_domain") private String siteDomain;
@Expose @SerializedName(USER_EMAIL) private String userEmail;
@Expose @SerializedName(VERIFICATION_PHONE_NUMBER) private String verificationPhoneNumber;
@@ -85,4 +88,31 @@ public FlagContentFieldSet setVerificationPhoneNumber(String verificationPhoneNu
this.verificationPhoneNumber = verificationPhoneNumber;
return this;
}
+
+ public String getSiteDomain() {
+ return siteDomain;
+ }
+
+ public FlagContentFieldSet setSiteDomain(String siteDomain) {
+ this.siteDomain = siteDomain;
+ return this;
+ }
+
+ public String getSiteCountry() {
+ return siteCountry;
+ }
+
+ public FlagContentFieldSet setSiteCountry(String siteCountry) {
+ this.siteCountry = siteCountry;
+ return this;
+ }
+
+ public String getBrandName() {
+ return brandName;
+ }
+
+ public FlagContentFieldSet setBrandName(String brandName) {
+ this.brandName = brandName;
+ return this;
+ }
}
diff --git a/src/main/java/com/siftscience/model/Review.java b/src/main/java/com/siftscience/model/Review.java
index 74bd7b00..2e28b840 100644
--- a/src/main/java/com/siftscience/model/Review.java
+++ b/src/main/java/com/siftscience/model/Review.java
@@ -11,6 +11,7 @@ public class Review {
@Expose @SerializedName("$contact_email") private String contactEmail;
@Expose @SerializedName("$locations") private List locations;
@Expose @SerializedName("$reviewed_content_id") private String reviewedContentId;
+ @Expose @SerializedName("$reviewed_user_id") private String reviewedUserId;
@Expose @SerializedName("$images") private List images;
@Expose @SerializedName("$rating") private Double rating;
@@ -76,4 +77,13 @@ public Review setReviewedContentId(String reviewedContentId) {
this.reviewedContentId = reviewedContentId;
return this;
}
+
+ public String getReviewedUserId() {
+ return reviewedUserId;
+ }
+
+ public Review setReviewedUserId(String reviewedUserId) {
+ this.reviewedUserId = reviewedUserId;
+ return this;
+ }
}
diff --git a/src/test/java/com/siftscience/ContentEventTest.java b/src/test/java/com/siftscience/ContentEventTest.java
index ad80c864..c6dd5c8f 100644
--- a/src/test/java/com/siftscience/ContentEventTest.java
+++ b/src/test/java/com/siftscience/ContentEventTest.java
@@ -48,6 +48,7 @@ public void testCreateComment() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$comment\" : {\n" +
" \"$body\": \"Congrats on the new role!\",\n" +
" \"$contact_email\": \"alex_301@domain.com\",\n" +
@@ -103,6 +104,7 @@ public void testCreateComment() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setComment(c)
.setVerificationPhoneNumber("+12345678901"));
@@ -135,6 +137,7 @@ public void testCreateListing() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$listing\" : {\n" +
" \"$subject\": \"2 Bedroom Apartment for Rent\",\n" +
" \"$body\": \"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\n" +
@@ -232,6 +235,7 @@ public void testCreateListing() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setListing(l)
.setVerificationPhoneNumber("+12345678901"));
@@ -263,6 +267,7 @@ public void testCreateMessage() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$message\" : {\n" +
" \"$body\": \"Let's meet at 5pm\",\n" +
" \"$contact_email\": \"alex_301@domain.com\",\n" +
@@ -316,6 +321,7 @@ public void testCreateMessage() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setMessage(m)
.setVerificationPhoneNumber("+12345678901"));
@@ -347,6 +353,7 @@ public void testCreateProfile() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$profile\" : {\n" +
" \"$body\": \"Hi! My name is Alex and I just moved to New London!\",\n" +
" \"$contact_email\": \"alex_301@domain.com\",\n" +
@@ -417,6 +424,7 @@ public void testCreateProfile() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setProfile(p)
.setVerificationPhoneNumber("+12345678901"));
@@ -448,6 +456,7 @@ public void testCreatePost() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$post\" : {\n" +
" \"$subject\": \"My new apartment!\"," +
" \"$body\": \"Moved into my new apartment yesterday.\",\n" +
@@ -535,6 +544,7 @@ public void testCreatePost() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setPost(p)
.setVerificationPhoneNumber("+12345678901"));
@@ -566,6 +576,7 @@ public void testCreateReview() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$review\" : {\n" +
" \"$subject\": \"Amazing Tacos!\"," +
" \"$body\": \"I ate the tacos.\",\n" +
@@ -577,6 +588,7 @@ public void testCreateReview() throws Exception {
" \"$zipcode\": \"98112\"\n" +
" }],\n" +
" \"$reviewed_content_id\": \"listing-234234\",\n" +
+ " \"$reviewed_user_id\": \"fyw3989sjpqr71\",\n" +
" \"$images\": [{\n" +
" \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" +
" \"$link\": \"https://www.domain.com/file.png\",\n" +
@@ -627,6 +639,7 @@ public void testCreateReview() throws Exception {
.setContactEmail("alex_301@domain.com")
.setLocations(Collections.singletonList(locationAddress))
.setReviewedContentId("listing-234234")
+ .setReviewedUserId("fyw3989sjpqr71")
.setImages(images)
.setRating(4.5);
@@ -637,6 +650,7 @@ public void testCreateReview() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setReview(r)
.setVerificationPhoneNumber("+12345678901"));
@@ -668,6 +682,7 @@ public void testUpdateComment() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$comment\" : {\n" +
" \"$body\": \"Congrats on the new role!\",\n" +
" \"$contact_email\": \"alex_301@domain.com\",\n" +
@@ -724,6 +739,7 @@ public void testUpdateComment() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setComment(c)
.setVerificationPhoneNumber("+12345678901"));
@@ -756,6 +772,7 @@ public void testUpdateListing() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$listing\" : {\n" +
" \"$subject\": \"2 Bedroom Apartment for Rent\",\n" +
" \"$body\": \"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\n" +
@@ -853,6 +870,7 @@ public void testUpdateListing() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setListing(l)
.setVerificationPhoneNumber("+12345678901"));
@@ -884,6 +902,7 @@ public void testUpdateMessage() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$message\" : {\n" +
" \"$body\": \"Let's meet at 5pm\",\n" +
" \"$contact_email\": \"alex_301@domain.com\",\n" +
@@ -941,6 +960,7 @@ public void testUpdateMessage() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setMessage(m)
.setVerificationPhoneNumber("+12345678901"));
@@ -972,6 +992,7 @@ public void testUpdateProfile() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$profile\" : {\n" +
" \"$body\": \"Hi! My name is Alex and I just moved to New London!\",\n" +
" \"$contact_email\": \"alex_301@domain.com\",\n" +
@@ -1042,6 +1063,7 @@ public void testUpdateProfile() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setProfile(p)
.setVerificationPhoneNumber("+12345678901"));
@@ -1073,6 +1095,7 @@ public void testUpdatePost() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$post\" : {\n" +
" \"$subject\": \"My new apartment!\"," +
" \"$body\": \"Moved into my new apartment yesterday.\",\n" +
@@ -1160,6 +1183,7 @@ public void testUpdatePost() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setPost(p)
.setVerificationPhoneNumber("+12345678901"));
@@ -1191,6 +1215,7 @@ public void testUpdateReview() throws Exception {
" \"$session_id\" : \"a234ksjfgn435sfg\",\n" +
" \"$status\" : \"$active\",\n" +
" \"$ip\" : \"255.255.255.0\",\n" +
+ " \"$user_email\" : \"billjones1@example.com\",\n" +
" \"$review\" : {\n" +
" \"$subject\": \"Amazing Tacos!\"," +
" \"$body\": \"I ate the tacos.\",\n" +
@@ -1202,6 +1227,7 @@ public void testUpdateReview() throws Exception {
" \"$zipcode\": \"98112\"\n" +
" }],\n" +
" \"$reviewed_content_id\": \"listing-234234\",\n" +
+ " \"$reviewed_user_id\": \"fyw3989sjpqr71\",\n" +
" \"$images\": [{\n" +
" \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" +
" \"$link\": \"https://www.domain.com/file.png\",\n" +
@@ -1252,6 +1278,7 @@ public void testUpdateReview() throws Exception {
.setContactEmail("alex_301@domain.com")
.setLocations(Collections.singletonList(locationAddress))
.setReviewedContentId("listing-234234")
+ .setReviewedUserId("fyw3989sjpqr71")
.setImages(images)
.setRating(4.5);
@@ -1262,6 +1289,7 @@ public void testUpdateReview() throws Exception {
.setSessionId("a234ksjfgn435sfg")
.setStatus("$active")
.setIp("255.255.255.0")
+ .setUserEmail("billjones1@example.com")
.setReview(r)
.setVerificationPhoneNumber("+12345678901"));
diff --git a/src/test/java/com/siftscience/FlagContentEventTest.java b/src/test/java/com/siftscience/FlagContentEventTest.java
index 34776b74..fd2cb5c2 100644
--- a/src/test/java/com/siftscience/FlagContentEventTest.java
+++ b/src/test/java/com/siftscience/FlagContentEventTest.java
@@ -40,11 +40,14 @@ public void testFlagContent() throws Exception {
String expectedRequestBody = "{\n" +
" \"$type\" : \"$flag_content\", \n" +
" \"$api_key\" : \"YOUR_API_KEY\",\n" +
+ " \"$brand_name\" : \"sift\",\n" +
" \"$user_id\" : \"billy_jones_301\",\n" +
" \"$content_id\" : \"9671500641\",\n" +
"\n" +
" \"$flagged_by\" : \"jamieli89\",\n" +
" \"$reason\" : \"" + this.reason.value + "\",\n" +
+ " \"$site_country\" : \"US\",\n" +
+ " \"$site_domain\" : \"sift.com\",\n" +
" \"$user_email\" : \"billy_jones_301@email.com\",\n" +
" \"$verification_phone_number\" : \"+12345678901\"\n" +
"}";
@@ -75,6 +78,9 @@ public void testFlagContent() throws Exception {
.setContentId("9671500641")
.setFlaggedBy("jamieli89")
.setReason(this.reason)
+ .setBrandName("sift")
+ .setSiteCountry("US")
+ .setSiteDomain("sift.com")
.setUserEmail("billy_jones_301@email.com")
.setVerificationPhoneNumber("+12345678901"));
diff --git a/src/test/java/com/siftscience/SiftRequestTest.java b/src/test/java/com/siftscience/SiftRequestTest.java
index 339d2799..77508e41 100644
--- a/src/test/java/com/siftscience/SiftRequestTest.java
+++ b/src/test/java/com/siftscience/SiftRequestTest.java
@@ -29,7 +29,7 @@ public void testUserAgentHeader() throws Exception {
// then
RecordedRequest recordedRequest = server.takeRequest();
- assertEquals("SiftScience/v205 sift-java/3.21.2",
+ assertEquals("SiftScience/v205 sift-java/3.22.0",
recordedRequest.getHeader("User-Agent"));
}