Skip to content

Create an autoresponder

POST
/openapi/autoresponder
curl --request POST \
--url https://open-api.replyco.com/openapi/autoresponder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '{ "name": "Out of office", "templateId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "accountIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "condition": { "target": "1 - Sender", "mode": "0 - Contain", "value": "invoice;receipt" }, "delay": 1, "delayHours": 1, "delayInRange": true, "delayRangeFrom": 1, "delayRangeTo": 1, "delayRangeToHours": 1, "startTime": "09:00:00", "endTime": "17:00:00", "isActiveTimeRanged": true, "weekdays": [ 1 ], "startDate": "2026-04-15T12:00:00Z", "endDate": "2026-04-15T12:00:00Z", "priority": 1, "frequency": "0 - Once", "inActive": true, "isSendOutsideWorkingHours": true }'

Creates an autoresponder that automatically replies with a template when an incoming message on a linked integration matches the condition and the schedule allows.

It has exactly one trigger condition.

Need multiple conditions? This endpoint creates single-condition autoresponders. To build one that matches on several conditions, create or edit it in the Replyco app UI instead.

How to build the request

  1. Set name, templateId (the template sent as the reply), and accountIds (the integrations it applies to).
  2. Set the condition:
    • target — which part of the message: Sender (1), Subject (2), Body (4), Language (8), ClientName (16). This is a combinable [Flags] value.
    • mode — Contain, NotContain, StartWith, EndWith, or Equals.
    • value — text to match; separate multiple values with ; (any of them fires the autoresponder).
  3. Set the schedule (below).

Schedule

  • frequency — Once replies only to the first message in a thread; Continuous replies to every matching message.
  • delay — fixed (delay minutes plus delayHours), or a random range when delayInRange is true (delayRangeFrom..delayRangeTo plus delayRangeToHours).
  • time window — when isActiveTimeRanged is true, only send between startTime and endTime (format HH:MM:SS).
  • weekdays — active days as integers, 0=Sunday … 6=Saturday, e.g. [1,2,3,4,5] for Mon–Fri.
  • date window — startDate..endDate. Set them equal to make the autoresponder always active (no date restriction).
  • isSendOutsideWorkingHours — when true, only reply to messages that arrive outside the company’s working hours.

Constraints

  • Required: name, templateId, at least one accountId, and a condition with a non-empty value.
  • startDate must be on or before endDate.
  • Delay values must be zero or greater; delayRangeTo must be at least delayRangeFrom.

Example — out-of-office on invoice emails, weekdays 9–5

{
  "name": "Out of office - invoices",
  "templateId": "{templateId}",
  "accountIds": ["{integrationId}"],
  "condition": { "target": "Subject", "mode": "Contain", "value": "invoice;receipt" },
  "frequency": "Once",
  "isActiveTimeRanged": true, "startTime": "09:00:00", "endTime": "17:00:00",
  "weekdays": [1,2,3,4,5],
  "startDate": "2026-06-17T00:00:00Z", "endDate": "2026-06-17T00:00:00Z"
}
        

Scoped to the current company; the create is recorded in the change log.

The autoresponder to create.

Create or replace an autoresponder. The same shape is used for create and update; update replaces the autoresponder’s conditions and integration links wholesale.

object
name
required

Human-readable name. Required.

string
>= 1 characters

Example

Out of office
templateId
required

Id of the template to send as the reply. Required.

string format: uuid
accountIds
required

Ids of the integrations (accounts) this autoresponder applies to. At least one is required.

Array<string>
>= 1 items
condition
required

A trigger condition for an autoresponder.

object
target
integer format: int32
Allowed values: 1 - Sender 2 - Subject 4 - Body 8 - Language 16 - ClientName
mode
integer format: int32
Allowed values: 0 - Contain 1 - NotContain 2 - StartWith 3 - EndWith 4 - Equals 5 - Between
value
required

Value to match. Multiple values may be separated by semicolons (any match fires the autoresponder). Required.

string
>= 1 characters

Example

invoice;receipt
delay

Fixed delay in minutes before sending (used when delayInRange is false).

integer format: int32
nullable
delayHours

Hours component added to delay.

integer format: int32
nullable
delayInRange

When true, use a random delay between delayRangeFrom and delayRangeTo.

boolean
delayRangeFrom

Minimum delay (minutes) when delayInRange is true.

integer format: int32
nullable
delayRangeTo

Maximum delay (minutes) when delayInRange is true.

integer format: int32
nullable
delayRangeToHours

Hours component added to delayRangeTo.

integer format: int32
nullable
startTime

Start of the active time-of-day window (HH:MM:SS).

string format: date-span

Example

09:00:00
endTime

End of the active time-of-day window (HH:MM:SS).

string format: date-span

Example

17:00:00
isActiveTimeRanged

When true, only send within the StartTime–EndTime window. Defaults to true.

boolean
weekdays

Days of week the autoresponder is active: 0=Sunday … 6=Saturday. e.g. [1,2,3,4,5] for Mon–Fri.

Array<integer>
nullable
startDate

First active date. Set equal to endDate to make the autoresponder always active (no date restriction). Must be ≤ EndDate.

string format: date-time
endDate

Last active date. Must be ≥ StartDate.

string format: date-time
priority

Execution priority when multiple autoresponders match; lower runs first.

integer format: int32
frequency
integer format: int32
Allowed values: 0 - Once 1 - Continuous
inActive

Set true to create/keep the autoresponder disabled.

boolean
isSendOutsideWorkingHours

When true, only send when the message arrives outside the company’s working hours.

boolean

The autoresponder was created and is returned.

Media typeapplication/json

An autoresponder: when an incoming message on a linked integration matches the trigger conditions (and the schedule allows), the linked template is sent back automatically.

object
id

Unique identifier of the autoresponder.

string format: uuid
name

Human-readable name.

string
nullable
templateId

Id of the template sent as the reply.

string format: uuid
accountIds

Ids of the integrations (accounts) this autoresponder applies to.

Array<string>
nullable
condition

A trigger condition for an autoresponder.

object
id

Unique identifier of the condition.

string format: uuid
target
integer format: int32
Allowed values: 1 - Sender 2 - Subject 4 - Body 8 - Language 16 - ClientName
mode
integer format: int32
Allowed values: 0 - Contain 1 - NotContain 2 - StartWith 3 - EndWith 4 - Equals 5 - Between
value

Value(s) to match. Multiple values may be separated by semicolons and any match fires the autoresponder.

string
nullable
delay

Fixed delay (minutes) before sending; used when delayInRange is false.

integer format: int32
nullable
delayHours

Hours component added to delay.

integer format: int32
nullable
delayInRange

When true, a random delay between delayRangeFrom and delayRangeTo is used.

boolean
delayRangeFrom

Minimum delay (minutes) when delayInRange is true.

integer format: int32
nullable
delayRangeTo

Maximum delay (minutes) when delayInRange is true.

integer format: int32
nullable
delayRangeToHours

Hours component added to delayRangeTo.

integer format: int32
nullable
startTime

Start of the active time-of-day window (HH:MM:SS).

string format: date-span
endTime

End of the active time-of-day window (HH:MM:SS).

string format: date-span
isActiveTimeRanged

When true, only send within the StartTime–EndTime window.

boolean
weekdays

Days of week the autoresponder is active: 0=Sunday … 6=Saturday.

Array<integer>
nullable
startDate

First active date. If equal to endDate, the autoresponder is always active (no date restriction).

string format: date-time
endDate

Last active date.

string format: date-time
priority

Execution priority when multiple autoresponders match; lower runs first.

integer format: int32
frequency
integer format: int32
Allowed values: 0 - Once 1 - Continuous
inActive

When true the autoresponder is disabled.

boolean
isSendOutsideWorkingHours

When true, only send when the message arrives outside the company’s working hours.

boolean

Example

{
"condition": {
"target": "1 - Sender",
"mode": "0 - Contain"
},
"frequency": "0 - Once"
}

The request is invalid (missing fields, no condition, no accounts, or startDate after endDate).

User is not authenticated or authorized.