Skip to the page

API reference

Change the sending rules

Changes the settings you send; the rest stay.

PATCH/v1/settings

Changes the settings you send; the rest stay. Texts already waiting are held, or freed, under the new rules within a minute. paused_until pauses all sending until a time, and null resumes it. stop_words.words replaces the stop words with your own list; null goes back to the defaults.

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

Request body

  • business_namestring or null

    Your business’s name, as {{business}} fills it in. Null clears it.

    Up to 120 characters.

  • time_zonestring

    An IANA zone, such as America/Chicago.

    Up to 64 characters.

  • pace_secondsinteger

    5 to 300.

  • new_people_per_dayinteger

    0 to 1,000.

  • quiet_hoursobject
    Show its 3 fields
    • enabledboolean
    • startstring
    • endstring
  • smart_quiet_hoursboolean
  • stop_wordsobject
    Show its 2 fields
    • enabledboolean
    • wordsarray of strings or null

      Your own stop words, matched without case against a whole reply. Null goes back to the defaults.

      Up to 50 items.

  • expiry_hoursinteger

    1 to 168.

  • inbound_modestring

    One of replies, everything.

  • paused_untiltimestamp or null

    Pause sending until this time; null resumes.

Example

curl -X PATCH "https://usebluebot.com/api/v1/settings" \
  -H "Authorization: Bearer $BLUEBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pace_seconds": 30,
    "quiet_hours": {
      "start": "20:00"
    }
  }'

Response

200: The settings after the change.

  • object"settings"required
  • business_namestring or nullrequired

    Your business’s name, which {{business}} fills in. Null until you set it; texts that would name the business leave it out until then.

  • time_zonestringrequired

    The zone quiet hours and daily limits are read in.

  • pace_secondsintegerrequired

    Seconds between two texts leaving the Mac, 5 to 300.

  • new_people_per_dayintegerrequired

    How many people you have never texted with BlueBot may be texted in a day, 0 to 1,000.

  • quiet_hoursobjectrequired
    Show its 3 fields
    • enabledbooleanrequired
    • startstringrequired

      When quiet hours start, in time_zone.

    • endstringrequired

      When they end.

  • smart_quiet_hoursbooleanrequired

    Read quiet hours in the recipient’s zone, from their area code, where BlueBot knows it.

  • stop_wordsobjectrequired
    Show its 4 fields
    • enabledbooleanrequired

      Whether a reply of only a stop word puts the person on the stop list.

    • wordsarray of stringsrequired

      The stop words: your own list, or the defaults when custom is false.

    • custombooleanrequired

      Whether you changed the list. False means BlueBot’s defaults.

    • start_wordsarray of stringsrequired

      Words that take a person who stopped by reply off the list again.

  • expiry_hoursintegerrequired

    A text still waiting this long after it was due expires, 1 to 168.

  • inbound_modestringrequired

    Which chats the Mac copies to BlueBot: replies (people BlueBot has texted) or everything.

    One of replies, everything.

  • paused_untiltimestamp or nullrequired

    While you have sending paused, until when.

  • platform_daily_limitintegerrequired

    BlueBot’s ceiling on texts a day, which you can’t change.

  • warningsarray of stringsrequired

    Things worth knowing about these settings, in words.

Response200
{
  "object": "settings",
  "business_name": "Dana Realty",
  "time_zone": "America/Chicago",
  "pace_seconds": 30,
  "new_people_per_day": 50,
  "quiet_hours": {
    "enabled": true,
    "start": "20:00",
    "end": "08:00"
  },
  "smart_quiet_hours": false,
  "stop_words": {
    "enabled": true,
    "words": [
      "stop",
      "stopall",
      "unsubscribe",
      "cancel",
      "end",
      "quit"
    ],
    "custom": false,
    "start_words": [
      "start",
      "unstop",
      "yes"
    ]
  },
  "expiry_hours": 24,
  "inbound_mode": "replies",
  "paused_until": null,
  "platform_daily_limit": 1000,
  "warnings": []
}

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.
invalid_request400Something 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.