Skip to the page

API reference

Get the sending rules

Pacing, new people per day, texting hours, stop words, expiry and which chats the Mac copies.

GET/v1/settings

Pacing, new people per day, texting hours, stop words, expiry and which chats the Mac copies.

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

Example

curl "https://getdogbot.com/api/v1/settings" \
  -H "Authorization: Bearer $DOGBOT_API_KEY"

Response

200: The settings.

  • 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 daily limits are read in, and the texting hours of people with no known state.

  • pace_secondsintegerrequired

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

  • new_people_per_dayintegerrequired

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

  • texting_hoursobjectrequired

    When texts may go where each person lives. Every place starts at its law: the state’s own rule where it has one, else the federal 8 AM to 9 PM. A text waits until it’s within the hours of the person’s state, from their contact’s state or else their area code.

    Show its 2 fields
    • customarray of objectrequired

      The places whose hours you changed, in the order of TEXTING_PLACES. Every other place follows its law.

      Show its 5 fields
      • placestringrequired

        A state, DC or territory by its two-letter code, or OTHER for people with no known state (group chats, email addresses and numbers from outside the US), whose hours are read in time_zone.

        One of AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, DC, PR, VI, GU, MP, AS, OTHER.

      • start_hourintegerrequired

        The first hour a text may go where the person lives, 0 to 23.

        0 to 23.

      • end_hourintegerrequired

        The hour texts stop, 1 to 24. 24 is midnight.

        1 to 24.

      • sundaysbooleanrequired

        Whether texts may go on Sunday.

      • wider_than_lawbooleanrequired

        Whether these hours let a text go at an hour or on a day the place’s law doesn’t.

    • kept_at_lawarray of strings

      Only in the answer to a save of hours for every place: the places kept at, or put back to, their law because those hours share no hour with it. warnings says the same in words.

      One of AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, DC, PR, VI, GU, MP, AS, OTHER.

  • 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 DogBot’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 DogBot: replies (people DogBot has texted) or everything.

    One of replies, everything.

  • paused_untiltimestamp or nullrequired

    While you have sending paused, until when.

  • platform_daily_limitintegerrequired

    DogBot’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": 20,
  "new_people_per_day": 50,
  "texting_hours": {
    "custom": []
  },
  "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 DogBot 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 DogBot’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.