palbaseDocs

Palbase Notify · API

PUT/notify/settings

Write the project's message settings

Sets the default locale, the from address and name and the reply-to address used with the project's own provider, the countries texts may reach, and when messages that are not transactional go: default_timezone, quiet_hours and marketing_cap. A write that names none of those three keeps them as they are (a client built before them); one named null is taken off. Requires If-Match with the ETag of the settings the change was made against: without it 428 settings_revision_required, with a revision that is no longer current 412 settings_revision_conflict (read again and review before saving). Answers the saved settings and their new ETag.

Called by your server, with the project's secret key.

Headers

If-Matchstring · requiredThe ETag from GET (or a previous PUT) of the settings this change is based on; exactly one.
Idempotency-Keystring · optionalMakes the write safe to send again (at most 255 characters). A retry with the same key and the same request gets the first answer back, marked `Idempotent-Replayed: true`, and changes nothing; the same key with a different request is refused with 422, and while the first request still runs a retry gets 409 with Retry-After. Answers are kept for 24 hours.

Request body

default_localestring · required
default_timezonestring · optionalThe clock of a recipient whose devices say none, an IANA time zone; UTC when unset.
from_emailstring · requiredWho email through the project's own provider is from.
from_namestring · requiredThe sender's display name, through the project's own SMTP, SendGrid or SES provider. ACS shows the name its sender username is registered with on the domain.
in_appobject · optionalHow often in-app messages reach a person at most, unless a campaign says less.
inboxobject · optionalThe project's inbox.
marketing_capobject · optionalHow many messages that are not transactional a recipient gets at most in a window; one more is skipped (skip_reason frequency_cap). Null: no cap. count messages at most in hours.
mx_checkboolean · optionalRefuse an email through the project's own provider whose recipient's domain takes no mail (no MX record, a null one, or no address), before it is queued. Off unless set; the platform's shared sender always refuses one.
quiet_hoursobject · optionalThe hours no message that is not transactional reaches a recipient, on their clock: held until they end, then sent. Null: none. From start to end on the recipient's clock; 22:00 to 08:00 spans midnight.
reply_tostring · requiredWhere replies go.
sms_blocked_countriesstring[] · requiredThe E.164 calling codes the project's texts may not reach even when sms_countries would let them (+1876 within +1); null: none.
sms_countriesstring[] · requiredThe E.164 calling codes the project's texts may reach (+1, +44, +90); null: every country.
curl
curl -X PUT "https://<your-ref>.palbase.studio/notify/settings" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"default_locale":"string","from_email":"string","from_name":"string","reply_to":"string","sms_blocked_countries":["string"],"sms_countries":["string"]}'

Responses

200The settings

400Validation failed or a required field is missing

401Missing or invalid API key

403Not the project's secret key, or not what the shared sender sends for it (`own_provider_required`; `auth_template_reserved`: auth's templates, which auth's own flows alone send through it, but for an organization's invitation, auth.org_invitation); or a change to the platform's own project (`owner_only`) without its owner's access token (X-Palbase-Owner) or its operator's token (X-Palbase-Operator) beside the key. An owner's sign-in that is not a passkey one from the last 15 minutes is 401 `insufficient_user_authentication`.

409A request with this Idempotency-Key is still running

412The resource changed since it was read (If-Match did not match).

422The Idempotency-Key was sent with a different request

428If-Match is missing: read the settings and send their ETag

429Over the project's request limit, or its shared sends for this window

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation PutNotifySettings of notify's contract.