Skip to content

Get an automation rule by id

GET
/openapi/messagerule/{id}
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.

id
required
string format: uuid

The id of the rule.

Returns the rule.

Media typeapplication/json

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
id

Unique identifier of the rule.

string format: uuid
ruleName

Human-readable rule name.

string
nullable
priority

Execution priority; lower numbers run first.

integer format: int32
inActive

When true the rule is disabled.

boolean
nullable
condition

The condition that must match for an automation rule to fire.

object
id

Unique identifier of the condition.

string format: uuid
tableName

The entity the condition reads, e.g. Message, Thread, Customer, Order, Product.

string
nullable
fieldName

The field on tableName to compare, e.g. Text, Status, Marketplace.

string
nullable
operator
integer format: int32
Allowed values: 0 - Contain 1 - NotContain 2 - StartWith 3 - EndWith 4 - Equals 5 - Between
value1

Primary comparison value.

string
nullable
value2

Secondary value, used only with the Between operator.

string
nullable
relations

Navigation path from Message to the target table when the field is not directly on Message, e.g. "Thread".

string
nullable
action

A single action applied when an automation rule matches.

object
id

Unique identifier of the action.

string format: uuid
tableName

The entity the action modifies, e.g. Thread, Task, Message, FolderThreads.

string
nullable
fieldName

The field to set (for UpdateField).

string
nullable
value

For UpdateField: the scalar value to set. For InsertRelation: a JSON object describing the record to insert.

string
nullable
actionType
integer format: int32
Allowed values: 0 - UpdateField 2 - InsertRelation
relations

Navigation path when the action targets a table related to the thread/message.

string
nullable

Example

{
"condition": {
"operator": "0 - Contain"
},
"action": {
"actionType": "0 - UpdateField"
}
}

User is not authenticated or authorized.

No rule with the given id exists.