Create an autoresponder
const url = 'https://open-api.replyco.com/openapi/autoresponder';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'}, body: '{ "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 }'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
- Set
name,templateId(the template sent as the reply), andaccountIds(the integrations it applies to). - 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, orEquals.value— text to match; separate multiple values with;(any of them fires the autoresponder).
- Set the schedule (below).
Schedule
frequency—Oncereplies only to the first message in a thread;Continuousreplies to every matching message.- delay — fixed (
delayminutes plusdelayHours), or a random range whendelayInRangeis true (delayRangeFrom..delayRangeToplusdelayRangeToHours). - time window — when
isActiveTimeRangedis true, only send betweenstartTimeandendTime(formatHH: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 oneaccountId, and aconditionwith a non-emptyvalue. startDatemust be on or beforeendDate.- Delay values must be zero or greater;
delayRangeTomust be at leastdelayRangeFrom.
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.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”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
Human-readable name. Required.
Example
Out of officeId of the template to send as the reply. Required.
Ids of the integrations (accounts) this autoresponder applies to. At least one is required.
A trigger condition for an autoresponder.
object
Value to match. Multiple values may be separated by semicolons (any match fires the autoresponder). Required.
Example
invoice;receiptFixed delay in minutes before sending (used when delayInRange is false).
Hours component added to delay.
When true, use a random delay between delayRangeFrom and delayRangeTo.
Minimum delay (minutes) when delayInRange is true.
Maximum delay (minutes) when delayInRange is true.
Hours component added to delayRangeTo.
Start of the active time-of-day window (HH:MM:SS).
Example
09:00:00End of the active time-of-day window (HH:MM:SS).
Example
17:00:00When true, only send within the StartTime–EndTime window. Defaults to true.
Days of week the autoresponder is active: 0=Sunday … 6=Saturday. e.g. [1,2,3,4,5] for Mon–Fri.
First active date. Set equal to endDate to make the autoresponder always active (no date restriction). Must be ≤ EndDate.
Last active date. Must be ≥ StartDate.
Execution priority when multiple autoresponders match; lower runs first.
Set true to create/keep the autoresponder disabled.
When true, only send when the message arrives outside the company’s working hours.
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
Human-readable name. Required.
Example
Out of officeId of the template to send as the reply. Required.
Ids of the integrations (accounts) this autoresponder applies to. At least one is required.
A trigger condition for an autoresponder.
object
Value to match. Multiple values may be separated by semicolons (any match fires the autoresponder). Required.
Example
invoice;receiptFixed delay in minutes before sending (used when delayInRange is false).
Hours component added to delay.
When true, use a random delay between delayRangeFrom and delayRangeTo.
Minimum delay (minutes) when delayInRange is true.
Maximum delay (minutes) when delayInRange is true.
Hours component added to delayRangeTo.
Start of the active time-of-day window (HH:MM:SS).
Example
09:00:00End of the active time-of-day window (HH:MM:SS).
Example
17:00:00When true, only send within the StartTime–EndTime window. Defaults to true.
Days of week the autoresponder is active: 0=Sunday … 6=Saturday. e.g. [1,2,3,4,5] for Mon–Fri.
First active date. Set equal to endDate to make the autoresponder always active (no date restriction). Must be ≤ EndDate.
Last active date. Must be ≥ StartDate.
Execution priority when multiple autoresponders match; lower runs first.
Set true to create/keep the autoresponder disabled.
When true, only send when the message arrives outside the company’s working hours.
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
Human-readable name. Required.
Example
Out of officeId of the template to send as the reply. Required.
Ids of the integrations (accounts) this autoresponder applies to. At least one is required.
A trigger condition for an autoresponder.
object
Value to match. Multiple values may be separated by semicolons (any match fires the autoresponder). Required.
Example
invoice;receiptFixed delay in minutes before sending (used when delayInRange is false).
Hours component added to delay.
When true, use a random delay between delayRangeFrom and delayRangeTo.
Minimum delay (minutes) when delayInRange is true.
Maximum delay (minutes) when delayInRange is true.
Hours component added to delayRangeTo.
Start of the active time-of-day window (HH:MM:SS).
Example
09:00:00End of the active time-of-day window (HH:MM:SS).
Example
17:00:00When true, only send within the StartTime–EndTime window. Defaults to true.
Days of week the autoresponder is active: 0=Sunday … 6=Saturday. e.g. [1,2,3,4,5] for Mon–Fri.
First active date. Set equal to endDate to make the autoresponder always active (no date restriction). Must be ≤ EndDate.
Last active date. Must be ≥ StartDate.
Execution priority when multiple autoresponders match; lower runs first.
Set true to create/keep the autoresponder disabled.
When true, only send when the message arrives outside the company’s working hours.
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
Human-readable name. Required.
Example
Out of officeId of the template to send as the reply. Required.
Ids of the integrations (accounts) this autoresponder applies to. At least one is required.
A trigger condition for an autoresponder.
object
Value to match. Multiple values may be separated by semicolons (any match fires the autoresponder). Required.
Example
invoice;receiptFixed delay in minutes before sending (used when delayInRange is false).
Hours component added to delay.
When true, use a random delay between delayRangeFrom and delayRangeTo.
Minimum delay (minutes) when delayInRange is true.
Maximum delay (minutes) when delayInRange is true.
Hours component added to delayRangeTo.
Start of the active time-of-day window (HH:MM:SS).
Example
09:00:00End of the active time-of-day window (HH:MM:SS).
Example
17:00:00When true, only send within the StartTime–EndTime window. Defaults to true.
Days of week the autoresponder is active: 0=Sunday … 6=Saturday. e.g. [1,2,3,4,5] for Mon–Fri.
First active date. Set equal to endDate to make the autoresponder always active (no date restriction). Must be ≤ EndDate.
Last active date. Must be ≥ StartDate.
Execution priority when multiple autoresponders match; lower runs first.
Set true to create/keep the autoresponder disabled.
When true, only send when the message arrives outside the company’s working hours.
Responses
Section titled “Responses”The autoresponder was created and is returned.
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
Unique identifier of the autoresponder.
Human-readable name.
Id of the template sent as the reply.
Ids of the integrations (accounts) this autoresponder applies to.
A trigger condition for an autoresponder.
object
Unique identifier of the condition.
Value(s) to match. Multiple values may be separated by semicolons and any match fires the autoresponder.
Fixed delay (minutes) before sending; used when delayInRange is false.
Hours component added to delay.
When true, a random delay between delayRangeFrom and delayRangeTo is used.
Minimum delay (minutes) when delayInRange is true.
Maximum delay (minutes) when delayInRange is true.
Hours component added to delayRangeTo.
Start of the active time-of-day window (HH:MM:SS).
End of the active time-of-day window (HH:MM:SS).
When true, only send within the StartTime–EndTime window.
Days of week the autoresponder is active: 0=Sunday … 6=Saturday.
First active date. If equal to endDate, the autoresponder is always active (no date restriction).
Last active date.
Execution priority when multiple autoresponders match; lower runs first.
When true the autoresponder is disabled.
When true, only send when the message arrives outside the company’s working hours.
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.