Skip to the page

API reference

Get the away message

The reply sent outside your business hours, and the hours.

GET/v1/automations/away

The reply sent outside your business hours, and the hours.

Needs a key with the messages:read scope. Keys and scopes

Example

GET/v1/automations/awayGet the away message →
curl "https://usebluebot.com/api/v1/automations/away" \
  -H "Authorization: Bearer $BLUEBOT_API_KEY"

Response

200: The away message.

  • object"away_message"required
  • enabledbooleanrequired
  • textstring or nullrequired

    The reply, with {{variables}}.

  • cooldown_hoursintegerrequired

    Each person gets it at most once in this many hours.

  • business_hoursobjectrequired

    Your hours each day in your time zone; null for a day you’re closed.

    Show its 7 fields
    • monobject or nullrequired
      Show its 2 fields
      • startstringrequired

        A time of day as HH:MM in your account’s time zone.

      • endstringrequired

        A time of day as HH:MM in your account’s time zone.

    • tueobject or nullrequired
      Show its 2 fields
      • startstringrequired

        A time of day as HH:MM in your account’s time zone.

      • endstringrequired

        A time of day as HH:MM in your account’s time zone.

    • wedobject or nullrequired
      Show its 2 fields
      • startstringrequired

        A time of day as HH:MM in your account’s time zone.

      • endstringrequired

        A time of day as HH:MM in your account’s time zone.

    • thuobject or nullrequired
      Show its 2 fields
      • startstringrequired

        A time of day as HH:MM in your account’s time zone.

      • endstringrequired

        A time of day as HH:MM in your account’s time zone.

    • friobject or nullrequired
      Show its 2 fields
      • startstringrequired

        A time of day as HH:MM in your account’s time zone.

      • endstringrequired

        A time of day as HH:MM in your account’s time zone.

    • satobject or nullrequired
      Show its 2 fields
      • startstringrequired

        A time of day as HH:MM in your account’s time zone.

      • endstringrequired

        A time of day as HH:MM in your account’s time zone.

    • sunobject or nullrequired
      Show its 2 fields
      • startstringrequired

        A time of day as HH:MM in your account’s time zone.

      • endstringrequired

        A time of day as HH:MM in your account’s time zone.

  • time_zonestringrequired
  • open_nowbooleanrequired

    Whether it’s inside your business hours right now.

Response200
{
  "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.

CodeStatusWhat it means
unauthorized401The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API.
insufficient_scope403The key doesn’t carry the scope the endpoint needs. Each endpoint’s reference names its scope.
rate_limited429Too 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.
internal500Something went wrong on BlueBot’s side. It was reported. Send the request again; with an Idempotency-Key that is always safe.

Try it

Call this operation from the page with your own key. The key stays in this tab and is forgotten when you leave.