Rules

"Don't conform to the rules. Create the rules." Rather than adapt your workflow and business, Rebilly can align with your business objectives by giving you the power to automate certain behaviors when key events happen. You can use this to your advantage to mitigate risk, maximize conversions and minimize costs. You have the controls at your fingertips here. If you need more control, or help dialing in on a strategy, feel free to contact us.

When an event happens, it triggers the evaluation of conditions (that you set up), in order from top to bottom. If the condition is met, the corresponding actions are executed. The conditions continue to be checked until either all of the conditions have been executed, or a special "stop" action is executed.

Retrieve a list of existing events

Request
Security:
header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200A list of System Events was retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
get/events
Request samples
// all parameters are optional
const firstCollection = await api.events.getAll();

// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100}; 
const secondCollection = await api.events.getAll(params);

// access the collection items, each item is a Member
secondCollection.items.forEach(event => console.log(event.fields.eventType));
Response samples
application/json
[
  • {
    }
]

Retrieve the event information

Request
Security:
path Parameters
eventType
required
string

The event type.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200Rules were retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/events/{eventType}
Request samples
const eventDetails = await api.events.get({eventType: 'gateway-account-created'});
console.log(eventDetails.fields.rulesCount);
Response samples
application/json
{
  • "eventType": "account-password-reset-requested",
  • "title": "string",
  • "description": "string",
  • "category": "billing",
  • "rulesCount": 0,
  • "bindsCount": 0,
  • "_links": [
    ]
}

Retrieve a list of rules for event

Request
Security:
path Parameters
eventType
required
string

The event type.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200Rules were retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/events/{eventType}/rules
Request samples
const event = await api.events.getRules({eventType: 'transaction-processed'});
console.log(event.fields.rules);
Response samples
application/json
{
  • "version": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Update the rules for event

Request
Security:
path Parameters
eventType
required
string

The event type.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Set of rules resource.

Array of objects (Bind)

All binds are executed regardless of other binds, there can't be a final bind.

Array
id
string <= 50 characters

The rule's unique identifier which defines whether an event is emitted when the rule is created, updated or removed.

name
required
string
labels
Array of strings unique
status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

The filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

required
Array of objects (RuleAction) unique
required
Array of objects (schemas)

Rules are executed depending on other rules: a final rule can stop the execution of following rules after execution.

Array
id
string <= 50 characters

The rule's unique identifier which defines whether an event is emitted when the rule is created, updated or removed.

name
required
string
labels
Array of strings unique
status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

The filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

required
Array of objects (RuleAction) unique
final
boolean
Default: true

Whether rule is final, meaning stop further matching rules if this is matched.

Responses
200Rules were updated.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
422Invalid data was sent.
put/events/{eventType}/rules
Request samples
application/json
{
  • "binds": [
    ],
  • "rules": [
    ]
}
Response samples
application/json
{
  • "version": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve a list of Rules Engine timeline messages

Retrieve a list of Rules Engine timeline messages.

Request
Security:
path Parameters
eventType
required
string

The event type.

query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200A list of Rules Engine timeline messages was retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
get/events/{eventType}/timeline
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/events/:eventType/timeline?limit=1000&offset=0&filter=string&sort=string&q=string' \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Create Rules Engine Timeline comment

Create a Rules Engine Timeline comment.

Request
Security:
path Parameters
eventType
required
string

The event type.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Rules Engine Timeline resource.

message
string

The message that describes the message details.

Responses
201Rules Engine Timeline comment was created.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
422Invalid data was sent.
post/events/{eventType}/timeline
Request samples
application/json
{
  • "message": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "type": "timeline-comment-created",
  • "triggeredBy": "rebilly",
  • "message": "string",
  • "extraData": {
    },
  • "occurredTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve Rules Engine Timeline message

Retrieve a Rules Engine timeline message with specified identifier string.

Request
Security:
path Parameters
eventType
required
string

The event type.

messageId
required
string

The Rules Engine Timeline message ID.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200Rules Engine message was retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/events/{eventType}/timeline/{messageId}
Request samples
curl -i -X GET \
  https://api-sandbox.rebilly.com/events/:eventType/timeline/:messageId \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "type": "timeline-comment-created",
  • "triggeredBy": "rebilly",
  • "message": "string",
  • "extraData": {
    },
  • "occurredTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Delete Rules Engine Timeline message

Delete Rules Engine Timeline message with predefined identifier string.

Request
Security:
path Parameters
eventType
required
string

The event type.

messageId
required
string

The Rules Engine Timeline message ID.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
204Rules Engine Timeline message was deleted.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
409Conflict.
delete/events/{eventType}/timeline/{messageId}
Request samples
curl -i -X DELETE \
  https://api-sandbox.rebilly.com/events/:eventType/timeline/:messageId \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}

Retrieve the change history of the set of rules

Retrieve the change history of the selected set of rules. The history is updated each time you change the rules.

Request
Security:
path Parameters
eventType
required
string

The event type.

query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

q
string

The partial search of the text fields.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

fields
string

Limit the returned fields to the list specified, separated by comma. Note that id is always returned.

expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200History was retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/events/{eventType}/rules/history
Request samples
// get the latest 20 versions for this event ID
const history = await api.events.getRulesVersionNumber({eventType: 'risk-score-changed', limit: 20});
// each item exposes the version and `createdTime`
history.items.forEach(edit => console.log(edit.fields.version));
Response samples
application/json
[
  • {
    }
]

Retrieve the record from the change history of the set of rules

Retrieve the record from the change history of the selected set of rules. A history record is created each time you change the rules.

Request
Security:
path Parameters
eventType
required
string

The event type.

version
required
integer >= 1

The rule set version. Expand response to get full related object instead of ID. See the expand guide for more info.

query Parameters
fields
string

Limit the returned fields to the list specified, separated by comma. Note that id is always returned.

expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200History record was retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/events/{eventType}/rules/history/{version}
Request samples
// get version #2 details for this event ID
const history = await api.events.getRulesVersionNumber({eventType: 'risk-score-changed', version: 2});
// the history exposes the version number and its `createdTime`
console.log(history.fields.createdTime);
Response samples
application/json
{
  • "version": 0,
  • "createdTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve the version of the set of rules

Retrieve the version of the selected set of rules. The versions are created each time you change the rules.

Request
Security:
path Parameters
eventType
required
string

The event type.

version
required
integer >= 1

The rule set version. Expand response to get full related object instead of ID. See the expand guide for more info.

query Parameters
fields
string

Limit the returned fields to the list specified, separated by comma. Note that id is always returned.

expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200Rules version was retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/events/{eventType}/rules/versions/{version}
Request samples
// get version #2 for this event ID
const version = await api.events.getRulesVersionDetail({eventType: 'risk-score-changed', version: 2});
// the version exposes the ruleset 
console.log(version.fields.rules);
Response samples
application/json
{
  • "version": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "createdTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve the list of rules drafts

Retrieve a collection of rules drafts. The result is sorted by the updated time in reverse.

Request
Security:
path Parameters
eventType
required
string

The event type.

query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

q
string

The partial search of the text fields.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

fields
string

Limit the returned fields to the list specified, separated by comma. Note that id is always returned.

expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200Rules drafts were retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/events/{eventType}/rules/drafts
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/events/:eventType/rules/drafts?limit=1000&offset=0&filter=string&q=string&sort=string&fields=string&expand=string' \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Create a rules draft for event

Request
Security:
path Parameters
eventType
required
string

The event type.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Rules draft resource.

baseVersion
required
integer >= 0

The rule set version which the rules draft is based on. Normally it is copied from the other rule set which is being cloned. This can be used to know how further the active rule set has advanced since the draft was created. "0" means that the draft is created from scratch. The field's value is only informational, it's not assigned to the active rule set.

Array of objects (Bind)

All binds are executed regardless of other binds, there can't be a final bind.

Array
id
string <= 50 characters

The rule's unique identifier which defines whether an event is emitted when the rule is created, updated or removed.

name
required
string
labels
Array of strings unique
status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

The filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

required
Array of objects (RuleAction) unique
required
Array of objects (schemas)

Rules are executed depending on other rules: a final rule can stop the execution of following rules after execution.

Array
id
string <= 50 characters

The rule's unique identifier which defines whether an event is emitted when the rule is created, updated or removed.

name
required
string
labels
Array of strings unique
status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

The filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

required
Array of objects (RuleAction) unique
final
boolean
Default: true

Whether rule is final, meaning stop further matching rules if this is matched.

name
required
string

Short name for the rules draft.

description
string

Detailed description of the drafted rule set.

Responses
200Rules draft was created.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
422Invalid data was sent.
post/events/{eventType}/rules/drafts
Request samples
application/json
{
  • "baseVersion": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "name": "string",
  • "description": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "baseVersion": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "author": {
    },
  • "name": "string",
  • "description": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve the rules draft

Retrieve the selected rules draft.

Request
Security:
path Parameters
eventType
required
string

The event type.

id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

query Parameters
fields
string

Limit the returned fields to the list specified, separated by comma. Note that id is always returned.

expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200Rules draft was retrieved successfully.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
get/events/{eventType}/rules/drafts/{id}
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/events/:eventType/rules/drafts/:id?fields=string&expand=string' \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "baseVersion": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "author": {
    },
  • "name": "string",
  • "description": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Delete the rules draft

Delete the rules draft with the predefined identifier string.

Request
Security:
path Parameters
eventType
required
string

The event type.

id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
204The draft was deleted.
401Unauthorized access, invalid credentials was used.
404Resource was not found.
delete/events/{eventType}/rules/drafts/{id}
Request samples
curl -i -X DELETE \
  https://api-sandbox.rebilly.com/events/:eventType/rules/drafts/:id \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}

Update the rules draft for event

Request
Security:
path Parameters
eventType
required
string

The event type.

id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Rules draft resource.

baseVersion
required
integer >= 0

The rule set version which the rules draft is based on. Normally it is copied from the other rule set which is being cloned. This can be used to know how further the active rule set has advanced since the draft was created. "0" means that the draft is created from scratch. The field's value is only informational, it's not assigned to the active rule set.

Array of objects (Bind)

All binds are executed regardless of other binds, there can't be a final bind.

Array
id
string <= 50 characters

The rule's unique identifier which defines whether an event is emitted when the rule is created, updated or removed.

name
required
string
labels
Array of strings unique
status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

The filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

required
Array of objects (RuleAction) unique
required
Array of objects (schemas)

Rules are executed depending on other rules: a final rule can stop the execution of following rules after execution.

Array
id
string <= 50 characters

The rule's unique identifier which defines whether an event is emitted when the rule is created, updated or removed.

name
required
string
labels
Array of strings unique
status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
filter
string

The filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields.

required
Array of objects (RuleAction) unique
final
boolean
Default: true

Whether rule is final, meaning stop further matching rules if this is matched.

name
required
string

Short name for the rules draft.

description
string

Detailed description of the drafted rule set.

Responses
200Rules draft was updated.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
404Resource was not found.
422Invalid data was sent.
put/events/{eventType}/rules/drafts/{id}
Request samples
application/json
{
  • "baseVersion": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "name": "string",
  • "description": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "baseVersion": 0,
  • "binds": [
    ],
  • "rules": [
    ],
  • "author": {
    },
  • "name": "string",
  • "description": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Send a test email

Send a test email.

Request
Security:
header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Test email resource.

id
string <uuid>

The message identifier string.

version
string

The message version (useful for split tests). By default is empty, but if you make multiple versions, you can name or number them to distinguish them.

weight
integer [ 0 .. 100 ]
Default: 100

The value for random-weighted picking of a template in the case of a split test. The split test algorithm does not factor localization when making a weighted-random template selection. Therefore, a version will be selected first, and then after a version is selected a specific localization will be selected. Take the case where two versions have different locale content -- the locales of the content is not considered when selecting the version.

required
Array of objects non-empty

An array of message templates with the language locale identifiers according to RFC 5646. A language will be selected based on the customer's locale.

If there is no locale set for the customer, then en-US (US English) will be used as the locale.

If there is no template with the customer's locale, then a template locale will be selected by Rebilly using a closest match algorithm (which may be random at worst).

If your email message templates are localized into more than one language, you SHOULD set a customer locale.

An invalid placeholder will render to an empty string. For example, Hello {{invalid.placeholder}}! will be rendered to Hello !.

Array
locale
required
string

The language locale identifier according to RFC 5646.

from
required
string <= 254 characters

The sender address. Template placeholders are allowed. If a placeholder does not resolve to a verified from address, then the default verified from address will be used instead. # todo add a link to help docs on how to verify an email address.

to
required
Array of strings non-empty

The recipients addresses. Template placeholders are allowed. If a placeholder does not resolve to an email address, then no email will be sent.

cc
Array of strings

The recipients to be carbon copied addresses. Template placeholders are allowed. If a placeholder does not resolve to an email address, then they will not be added to the cc.

bcc
Array of strings

The blind carbon copy recipients addresses. Template placeholders are allowed. If a placeholder does not resolve to an email address, then they will not be added to the cc.

subject
required
string <= 998 characters

The message subject. Template placeholders are allowed.

text
required
string

The message's text body. Leave empty to use content from "html". Template placeholders are allowed.

html
required
string

The message's html body. Leave empty to use content from "text". Template placeholders are allowed.

editor
string

The source of the message required for the email editor. Not used for sending emails. Used by the editor to reproduce the message for future updates.

Array of objects

The message's attachments.

Responses
200Test email was sent.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
422Invalid data was sent.
post/previews/rule-actions/send-email
Request samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "version": "string",
  • "weight": 75,
  • "templates": [
    ]
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "version": "string",
  • "weight": 75,
  • "templates": [
    ]
}

Trigger a test webhook

Trigger a test webhook.

Request
Security:
header Parameters
Organization-Id
string (ResourceId) <= 50 characters

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Test webhook resource.

method
required
string
Enum: "GET" "POST" "PUT" "PATCH" "DELETE"
url
required
string <uri>
object

The URI parameters.

property name*
string
body
string
credentialHash
string

Webhook Credential identifier string.

Array of objects (WebhookHeader)
Array
name
required
string
status
string (OnOff)
Default: "active"
Enum: "active" "inactive"
value
required
string
Responses
200Test webhook was triggered.
401Unauthorized access, invalid credentials was used.
403Access forbidden.
422Invalid data was sent.
post/previews/rule-actions/trigger-webhook
Request samples
application/json
{
  • "method": "GET",
  • "query": {
    },
  • "body": "string",
  • "credentialHash": "string",
  • "headers": [
    ]
}
Response samples
application/json
{
  • "method": "GET",
  • "query": {
    },
  • "body": "string",
  • "credentialHash": "string",
  • "headers": [
    ]
}