readyDocs Open the app

Texting at night

Quiet hours hold texts until morning in the contact’s time zone. Texting at night (Settings → Compliance, in the Sending windows & auto-reply card) lets replies and follow ups to people who texted the account before go out at night instead. It is set per account: an agency or platform sets it for each sub-account with X-Sub-Account-Id. Opt-outs and scrubbing are on Opt-outs and scrubbing.

#Every sub-account at once

There is no single call that changes all of your sub-accounts. Make one call each: page through List sub-accounts with before_id while has_more is true, and for each id send POST /v1/compliance/night-texting with that id as X-Sub-Account-Id. Turning it off needs only {"enabled": false}. Turning it on needs the confirmation_text as well, and records that agreement for each sub-account, so only do it for sub-accounts whose contacts at night asked to hear from them. Use the owner’s or an admin’s key: a teammate’s key gets OWNER_ONLY. Read each result back with Get texting at night.

const base = 'https://api.tryready.com/v1';
const h = { 'X-API-Key': process.env.READY_API_KEY, 'Content-Type': 'application/json' };
let before = '';
for (;;) {
  const page = await (await fetch(`${base}/sub-accounts?limit=200${before}`, { headers: h })).json();
  for (const sub of page.data) {
    await fetch(`${base}/compliance/night-texting`, {
      method: 'POST',
      headers: { ...h, 'X-Sub-Account-Id': String(sub.id) },
      body: JSON.stringify({ enabled: false }),
    });
  }
  if (!page.has_more) break;
  before = `&before_id=${page.next_before_id}`;
}

Endpoints

#Get texting at night

Whether the account’s Texting at night setting is on (Settings → Compliance, in the Sending windows & auto-reply card), and the words a caller agrees to when it turns it on. Add X-Sub-Account-Id to read one of your sub-accounts.

Returns
data.enabledboolean
true while texting at night is on. Off by default. It stays on until someone turns it off.
data.signed_atISO 8601 string | null
When it was turned on, or null while off.
data.attestation_textstring
The statement you agree to when you turn it on.
data.attestation_versionstring
Which wording attestation_text is.
data.required_phrasestring
The confirmation_text that turning it on needs: I UNDERSTAND.
curl "https://api.tryready.com/v1/compliance/night-texting" \
  -H "X-API-Key: $READY_API_KEY"
Returns:
{
  "success": true,
  "data": {
    "enabled": false,
    "signed_at": null,
    "attestation_text": "Everyone this account texts at night asked us to text them, or bought from us or asked about our business recently. Night texts are replies or follow ups to that, not new promotions to cold contacts. We choose what, when and who we text, and we’re responsible for following state laws.",
    "attestation_version": "night-v1-2026-11-18",
    "required_phrase": "I UNDERSTAND"
  }
}

#Turn texting at night on or off

While it’s on, a 1:1 text or an API text (POST /v1/messages) to a contact who has texted the account before can go out during quiet hours. Campaigns, drips, automations, /v1/messages/bulk and texts to people who never texted the account still wait for morning. So do texts to Maryland, Mississippi, Pennsylvania, Florida and Oklahoma numbers, texts to Utah on Sundays and holidays, numbers whose time zone Ready can’t tell, and the extra quiet hours the account set itself. Needs the account owner’s key or an admin’s. An agency or platform turns it on for one of its sub-accounts by adding X-Sub-Account-Id. The setting is per account: a sub-account doesn’t get its parent’s setting, and turning it on for one sub-account changes nothing on the others.

Turning it on records attestation_text as the account’s signed statement, with the time, your IP address and the key used. Only send "enabled": true for an account whose contacts at night are people who asked to hear from it.

Parameters

X-Sub-Account-Idinteger · headerOptional
The sub-account to change, one you manage (Sub-accounts). Leave it out to change your own account.
enabledbooleanRequired
true turns it on, false turns it off. A value that isn’t true leaves it off.
confirmation_textstringRequired to turn on
I UNDERSTAND, your agreement to attestation_text. Turning it off needs nothing.
Returns

The same data as Get texting at night, as it is now.

Errors
HTTPCodeWhen
400attestation_required"enabled": true without "confirmation_text": "I UNDERSTAND". Nothing changed.
403OWNER_ONLYThe key belongs to a teammate who isn’t the owner or an admin.
403sub_account_forbiddenX-Sub-Account-Id names an account that isn’t one of your sub-accounts. Nothing changed.
404sub_account_not_foundNo account has that X-Sub-Account-Id.
500internal_errorFailed on our side. Read it back with Get texting at night, then try again.
curl -X POST "https://api.tryready.com/v1/compliance/night-texting" \
  -H "X-API-Key: $READY_API_KEY" \
  -H "X-Sub-Account-Id: 12345" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "confirmation_text": "I UNDERSTAND"
  }'
Returns:
{
  "success": true,
  "data": {
    "enabled": true,
    "signed_at": "2026-11-25T18:04:11.000Z",
    "attestation_text": "Everyone this account texts at night asked us to text them, or bought from us or asked about our business recently. Night texts are replies or follow ups to that, not new promotions to cold contacts. We choose what, when and who we text, and we’re responsible for following state laws.",
    "attestation_version": "night-v1-2026-11-18",
    "required_phrase": "I UNDERSTAND"
  }
}