Invite Rules
Please use the Invite Settings API instead. You may reach out to our integrations team to start migrating to the Invite Settings API.
Get a list of invites
This method returns all invite rules for your account, grouped by event type.
Parameters
HTTP Headers
Name | Description |
---|---|
token | An authorisation header containing meta information, see OAuth2. |
Responses
200 - The invite rules for your account, grouped by event type.
Name | Description |
---|---|
application/json | InviteRuleEventGroupByAccountDto |
|
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.etrusted.com/invite-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer {access_token}",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.etrusted.com/invite-rules",
"method": "GET",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {access_token}",
"cache-control": "no-cache"
},
"processData": false,
"data": ""
}
$.ajax(settings).done(function (response) {
console.log(response);
});
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.etrusted.com/invite-rules")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Create a new invite rule
This method creates a new invite rule object.
Parameters
HTTP Headers
Name | Description |
---|---|
token | An authorisation header containing meta information, see OAuth2. |
Body
Content-Type | Type |
---|---|
application/json | InviteRulePostDto |
|
Responses
200 - The newly created invite rule.
Name | Description |
---|---|
application/json | InviteRuleResponseDto |
|
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.etrusted.com/invite-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{
"name": "Default checkout rule",
"eventTypeRef": "ety-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"templateRef": "ivt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"questionnaireTemplateRef": "qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"sendingDelay": "P3D",
"timeOfDay": "10:00:00Z",
"active": true
}',
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer {access_token}",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.etrusted.com/invite-rules",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {access_token}",
"cache-control": "no-cache"
},
"processData": false,
"data": {
"name": "Default checkout rule",
"eventTypeRef": "ety-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"templateRef": "ivt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"questionnaireTemplateRef": "qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"sendingDelay": "P3D",
"timeOfDay": "10:00:00Z",
"active": true
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{" +
"\"name\": \"Default checkout rule\"," +
"\"eventTypeRef\": \"ety-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"," +
"\"templateRef\": \"ivt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\","
"\"questionnaireTemplateRef\": \"qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"," +
"\"sendingDelay\": \"P3D\"," +
"\"timeOfDay\": \"10:00:00Z\"," +
"\"active\": true" +
"}");
Request request = new Request.Builder()
.url("https://api.etrusted.com/invite-rules")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Get an invite rule by ID
This method retrieves a particular invite rule.
Parameters
Route Parameters
Name | Description |
---|---|
id | The invite rule UUID. |
HTTP Headers
Name | Description |
---|---|
token | An authorisation header containing meta information, see OAuth2. |
Responses
200 - The invite rule object with the requested ID.
Name | Description |
---|---|
application/json | InviteRuleGetResponseDto |
|
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.etrusted.com/invite-rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer {access_token}",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.etrusted.com/invite-rules/{id}",
"method": "GET",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {access_token}",
"cache-control": "no-cache"
},
"processData": false,
"data": ""
}
$.ajax(settings).done(function (response) {
console.log(response);
});
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.etrusted.com/invite-rules/{id}")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Update an invite rule by ID
This method updates an invite rule object.
Parameters
Route Parameters
Name | Description |
---|---|
id | The invite rule UUID. |
HTTP Headers
Name | Description |
---|---|
token | An authorisation header containing meta information, see OAuth2. |
Body
Content-Type | Type |
---|---|
application/json | InviteRulePutDto |
|
Responses
200 - The updated invite rule.
Name | Description |
---|---|
application/json | InviteRuleResponseDto |
|
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.etrusted.com/invite-rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => '{
"name": "Default checkout rule",
"templateRef": "/templates/xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"questionnaireTemplateRef": "qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"sendingDelay": "P3D",
"timeOfDay": "10:00:00Z",
"active": true
}',
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer {access_token}",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.etrusted.com/invite-rules/{id}",
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {access_token}",
"cache-control": "no-cache",
},
"processData": false,
"data": {
"name": "Default checkout rule",
"templateRef": "/templates/xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"questionnaireTemplateRef": "qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
"sendingDelay": "P3D",
"timeOfDay": "10:00:00Z",
"active": true
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{" +
"\"name\": \"Default checkout rule\"," +
"\"templateRef\": \"/templates/xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"," +
"\"questionnaireTemplateRef\": \"qrt-xxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx\"," +
"\"sendingDelay\": \"P3D\", +
"\"timeOfDay\": \"10:00:00Z\"," +
"\"active\": true" +
"}"
);
Request request = new Request.Builder()
.url("https://api.etrusted.com/invite-rules/{id}")
.put(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Delete an invite rule by ID
This method deletes an invite rule object.
Parameters
Route Parameters
Name | Description |
---|---|
id | The invite rule UUID. |
HTTP Headers
Name | Description |
---|---|
token | An authorisation header containing meta information, see OAuth2. |
Responses
204 - No Content
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.etrusted.com/invite-rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer {access_token}",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.etrusted.com/invite-rules/{id}",
"method": "DELETE",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {access_token}",
"cache-control": "no-cache"
},
"processData": false,
"data": ""
}
$.ajax(settings).done(function (response) {
console.log(response);
});
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.etrusted.com/invite-rules/{id}")
.delete(null)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Get invite rules by channel ID
This method returns all invite rules for a channel, grouped by event type.
Parameters
Route Parameters
Name | Description |
---|---|
id | A channel UUID. |
HTTP Headers
Name | Description |
---|---|
token | An authorisation header containing meta information, see OAuth2. |
Responses
200 - The invite rules for this channel, grouped by event type.
Name | Description |
---|---|
application/json | InviteRuleEventGroupByChannelDto |
|
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.etrusted.com/channels/{id}/invite-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer {access_token}",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.etrusted.com/channels/{id}/invite-rules",
"method": "GET",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {access_token}",
"cache-control": "no-cache"
},
"processData": false,
"data": ""
}
$.ajax(settings).done(function (response) {
console.log(response);
});
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.etrusted.com/channels/{id}/invite-rules")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Update an invite rule by channel ID
This method updates an invite rule for a channel.
Parameters
Route Parameters
Name | Description |
---|---|
channelId | The channel UUID. |
inviteRuleId | The invite rule UUID. |
HTTP Headers
Name | Description |
---|---|
token | An authorisation header containing meta information, see OAuth2. |
Body
Content-Type | Type |
---|---|
application/json | InviteRulePutByChannelRequestDto |
|
Responses
204 - No Content
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
<?php
$request = new HttpRequest();
$request->setUrl('https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders(array(
'cache-control' => 'no-cache',
'Authorization' => 'Bearer {access_token}',
'Content-Type' => 'application/json'
));
$request->setBody('{
"active": true
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}",
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {access_token}",
"cache-control": "no-cache"
},
"processData": false,
"data": {
"active": true
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{" +
"\"active\": true" +
"}"
);
Request request = new Request.Builder()
.url("https://api.etrusted.com/channels/{channelId}/invite-rules/{inviteRuleId}")
.put(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Models
InviteRuleListItemByAccountDto
Properties
_object
string
The response object type which is invite rule
.
id
string
A unique identifier for this invite rule.
name
string
The name of the invite rule.
template
object
The invite template the invite rule is associated with.
Properties
name
string
The name of the invite template.
id
string
The invite template UUID.
questionnaireTemplate
object
The questionnaire template the invite rule is associated with.
Properties
name
string
The name of the questionnaire template.
id
string
The questionnaire template UUID.
sendingDelay
string
timeOfDay
string
createdAt
string
updatedAt
string
active
boolean
A boolean value that indicates whether the invite rule is active or inactive.
default
boolean
A boolean value that indicates whether this is the default invite rule.
The response object type which is invite rule
.
A unique identifier for this invite rule.
The name of the invite rule.
The invite template the invite rule is associated with.
The name of the invite template.
The invite template UUID.
The questionnaire template the invite rule is associated with.
The name of the questionnaire template.
The questionnaire template UUID.
A boolean value that indicates whether the invite rule is active or inactive.
A boolean value that indicates whether this is the default invite rule.
InviteRuleEventGroupByAccountDto
Properties
_object
string
The response object type which is event type
.
id
string
The event type UUID the invite rules operates on.
name
string
The event type name.
active
boolean
A boolean value that indicates whether the event type and touchpoint are activated.
rules
The list of invite rule objects for the event type.
The response object type which is event type
.
The event type UUID the invite rules operates on.
The event type name.
A boolean value that indicates whether the event type and touchpoint are activated.
The list of invite rule objects for the event type.
InviteTemplatePriorityDto
Properties
transport
templateRef
string
The template URI for the invite rule.
The template URI for the invite rule.
InviteRulePostDto
Properties
name
string
The name of the invite rule.
eventTypeRef
string
A reference to the event type the rule is applied to.
inviteTemplatePriority
An array of invite template priorities that hold information about the means of transportation of the invites, e.g. via email or sms.
templateRef
string
The email template URI for the invite rule.
questionnaireTemplateRef
string
The questionnaire template uri for the invite rule.
sendingDelay
string
timeOfDay
string
active
boolean
A boolean value to activate or deactivate the invite rule.
The name of the invite rule.
A reference to the event type the rule is applied to.
An array of invite template priorities that hold information about the means of transportation of the invites, e.g. via email or sms.
The email template URI for the invite rule.
The questionnaire template uri for the invite rule.
A boolean value to activate or deactivate the invite rule.
InviteRuleResponseDto
Properties
id
string
The invite rule UUID.
name
string
The name of the invite rule.
eventTypeRef
string
A UUID as event type reference.
The invite rules is applied to this event type.
templateRef
string
A UUID as invite template reference for the invite rule.
questionnaireTemplateRef
string
A UUID as questionnaire template reference for the invite rule.
sendingDelay
string
timeOfDay
string
createdAt
string
updatedAt
string
default
boolean
A boolean value that indicates whether this is the default rule.
The invite rule UUID.
The name of the invite rule.
A UUID as event type reference. The invite rules is applied to this event type.
A UUID as invite template reference for the invite rule.
A UUID as questionnaire template reference for the invite rule.
A boolean value that indicates whether this is the default rule.
InviteRuleChannelActiveDto
Properties
channelRef
string
The channel UUID.
name
string
The name of the channel.
active
boolean
Indicates whether the rule is active for this channel.
The channel UUID.
The name of the channel.
Indicates whether the rule is active for this channel.
InviteRuleGetResponseDto
Properties
id
string
The invite rule UUID.
name
string
The name of the invite rule.
eventTypeRef
string
A UUID as event type reference.
The invite rule is applied to this event type.
templateRef
string
A UUID as invite template reference.
questionnaireTemplateRef
string
A UUID as questionnaire template reference.
sendingDelay
string
timeOfDay
string
createdAt
string
updatedAt
string
default
boolean
A boolean value that indicates whether this is the default invite rule.
channels
The list of channels the rule is applied to.
The invite rule UUID.
The name of the invite rule.
A UUID as event type reference. The invite rule is applied to this event type.
A UUID as invite template reference.
A UUID as questionnaire template reference.
A boolean value that indicates whether this is the default invite rule.
The list of channels the rule is applied to.
InviteRulePutDto
Properties
name
string
The name of the invite rule.
inviteTemplatePriority
An array of invite template priorities that hold information about the means of transportation of the invites, e.g. via email or sms.
templateRef
string
A UUID as invite template reference for the invite rule.
questionnaireTemplateRef
string
A UUID as questionnaire template reference for the invite rule.
sendingDelay
string
timeOfDay
string
active
boolean
A boolean value to activate or deactivate the invite rule.
The name of the invite rule.
An array of invite template priorities that hold information about the means of transportation of the invites, e.g. via email or sms.
A UUID as invite template reference for the invite rule.
A UUID as questionnaire template reference for the invite rule.
A boolean value to activate or deactivate the invite rule.
InviteRuleListItemByChannelDto
Properties
_object
string
The response object type which is invite rule
.
id
string
The invite rule UUID.
name
string
The name of the invite rule.
template
object
The email template of the invite rule.
Properties
name
string
The name of the email template.
id
string
The invite template UUID.
questionnaireTemplate
object
The questionnaire template of the invite rule.
Properties
name
string
The name of the questionnaire template.
id
string
The questionnaire template UUID.
sendingDelay
string
timeOfDay
string
createdAt
string
updatedAt
string
active
boolean
A boolean value that indicates whether the invite rule is active or inactive.
default
boolean
A boolean value that indicates whether this is the default invite rule.
The response object type which is invite rule
.
The invite rule UUID.
The name of the invite rule.
The email template of the invite rule.
The name of the email template.
The invite template UUID.
The questionnaire template of the invite rule.
The name of the questionnaire template.
The questionnaire template UUID.
A boolean value that indicates whether the invite rule is active or inactive.
A boolean value that indicates whether this is the default invite rule.
InviteRuleEventGroupByChannelDto
Properties
_object
string
The response object type which is event type
.
id
string
The event type UUID.
name
string
The event type name that also denotes the corresponding touchpoint.
active
boolean
A boolean value that indicated whether the event type and touchpoint are activated or deactivated.
rules
The response object type which is event type
.
The event type UUID.
The event type name that also denotes the corresponding touchpoint.
A boolean value that indicated whether the event type and touchpoint are activated or deactivated.
InviteRulePutByChannelRequestDto
Properties
active
boolean
A boolean value to activate or deactivate the invite rule.
A boolean value to activate or deactivate the invite rule.
Need further support?
Visit the Help Centre for further information, or contact us. Are some words or terms unfamiliar? Then visit the glossary for clarification.