Get an automation rule by id
const url = 'https://open-api.replyco.com/openapi/messagerule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://open-api.replyco.com/openapi/messagerule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Returns a single rule with its condition and action. The response shape matches the body you send
to create or update a rule (plus server-assigned ids), so you can fetch a rule, modify it, and PUT it back.
Note: the Open API models a rule as one condition and one action. A rule created in the app with several
conditions/actions is shown here by its first condition and first action; PUT replaces all of them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the rule.
Responses
Section titled “Responses”Returns the rule.
An automation rule. When an incoming message matches the condition, the action
is applied automatically.
The Open API represents a rule as a single condition and a single action. A rule created elsewhere with multiple conditions/actions is shown here by its first condition and first action.
object
Unique identifier of the rule.
Human-readable rule name.
Execution priority; lower numbers run first.
When true the rule is disabled.
The condition that must match for an automation rule to fire.
object
Unique identifier of the condition.
The entity the condition reads, e.g. Message, Thread, Customer, Order, Product.
The field on tableName to compare, e.g. Text, Status, Marketplace.
Primary comparison value.
Secondary value, used only with the Between operator.
Navigation path from Message to the target table when the field is not directly on Message, e.g. "Thread".
A single action applied when an automation rule matches.
object
Unique identifier of the action.
The entity the action modifies, e.g. Thread, Task, Message, FolderThreads.
The field to set (for UpdateField).
For UpdateField: the scalar value to set. For InsertRelation: a JSON object describing the record to insert.
Navigation path when the action targets a table related to the thread/message.
Example
{ "condition": { "operator": "0 - Contain" }, "action": { "actionType": "0 - UpdateField" }}User is not authenticated or authorized.
No rule with the given id exists.