Change the away message
Turns it on or off, or changes its words, your hours or how often one person can get it.
/v1/automations/away
Turns it on or off, or changes its words, your hours or how often one person can get it. It goes to a one-to-one text that arrives outside your hours when no keyword rule replied, at most once per person per cooldown_hours.
Needs a key with the messages:send scope.
Request body
enabledbooleantextstringThe reply, with
{{variables}}.Up to 2,000 characters.
cooldown_hoursinteger1 to 168.
business_hoursobjectYour hours each day in your time zone; null for a day you’re closed.
Show its 7 fieldsHide its fields
monobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
tueobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
wedobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
thuobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
friobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
satobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
sunobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
Example
/v1/automations/awaycurl -X PATCH "https://usebluebot.com/api/v1/automations/away" \
-H "Authorization: Bearer $BLUEBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"cooldown_hours": 12
}'Response
200: The away message.
object"away_message"requiredenabledbooleanrequiredtextstring or nullrequiredThe reply, with
{{variables}}.cooldown_hoursintegerrequiredEach person gets it at most once in this many hours.
business_hoursobjectrequiredYour hours each day in your time zone; null for a day you’re closed.
Show its 7 fieldsHide its fields
monobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
tueobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
wedobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
thuobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
friobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
satobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
sunobject or nullrequiredShow its 2 fieldsHide its fields
startstringrequiredA time of day as HH:MM in your account’s time zone.
endstringrequiredA time of day as HH:MM in your account’s time zone.
time_zonestringrequiredopen_nowbooleanrequiredWhether it’s inside your business hours right now.
{
"object": "away_message",
"enabled": true,
"text": "Thanks for your text! We’re closed right now and will reply when we open at 9 AM.",
"cooldown_hours": 12,
"business_hours": {
"mon": {
"start": "09:00",
"end": "17:00"
},
"tue": {
"start": "09:00",
"end": "17:00"
},
"wed": {
"start": "09:00",
"end": "17:00"
},
"thu": {
"start": "09:00",
"end": "17:00"
},
"fri": {
"start": "09:00",
"end": "17:00"
},
"sat": null,
"sun": null
},
"time_zone": "America/Chicago",
"open_now": true
}Errors
Every refusal has the same envelope and a page of its own. These are the ones this operation can give.
| Code | Status | What it means |
|---|---|---|
| 401 | The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API. | |
| 403 | The key doesn’t carry the scope the endpoint needs. Each endpoint’s reference names its scope. | |
| 429 | Too many requests. A key may make 120 requests a minute. The RateLimit header says how many are left, and Retry-After how long to wait. | |
| 500 | Something went wrong on BlueBot’s side. It was reported. Send the request again; with an Idempotency-Key that is always safe. | |
| 400 | Something in the request doesn’t fit: a missing or malformed field, a bad id, or a combination the endpoint refuses. details names each field. |
Try it
Call this operation from the page with your own key. The key stays in this tab and is forgotten when you leave.