notification81 ops

Notification API

Push, SMS, and email notifications with per-channel providers and templates.

Queries

QUERY

accountEmails

#

The emails sent to one person of the caller's workspace — a driver, a customer, a merchant, a provider — newest first, each with what its provider has reported since. Requires an admin of the workspace. An account of another workspace returns an empty page: the list is read under the caller's own workspace, whatever id is asked for.

Arguments

  • input!
Returns!
QUERY

adminEmailSuppressions

#

The platform's opt-out list, most recent first (PlatformAdmin only).

Arguments

  • input
Returns!
QUERY

adminEmailSuppressionsExport

#

The platform's whole opt-out list as CSV (PlatformAdmin only).

ReturnsString!
QUERY

adminListAnnouncements

#

List announcements with pagination (admin only)

Arguments

  • input!
Returns!
QUERY

adminMailing

#

One mailing with its content and audiences (PlatformAdmin only).

Arguments

  • id!
Returns!
QUERY

adminMailingAudience

#

One audience (PlatformAdmin only).

Arguments

  • id!
Returns!
QUERY

adminMailingAudiencePreview

#

Who a source would reach right now, saved or not: the count, a sample, and how many are left out and why (PlatformAdmin only).

Arguments

  • input
  • details
Returns!
QUERY

adminMailingAudiences

#

Saved audiences, newest first (PlatformAdmin only).

Arguments

  • input
Returns!
QUERY

adminMailingContacts

#

The addresses of an imported audience (PlatformAdmin only).

Arguments

  • input!
Returns!
QUERY

adminMailingPreflight

#

The launch checklist of a draft, and who it would reach (PlatformAdmin only).

Arguments

  • id!
Returns!
QUERY

adminMailingPreview

#

The mailing exactly as one recipient would receive it, rendered by the path that sends it. Without recipientEmail it is rendered for the first recipient (PlatformAdmin only).

Arguments

  • id!
  • recipientEmailString
Returns!
QUERY

adminMailingRecipients

#

A launched mailing's recipients in sending order, each with what its provider has reported since (PlatformAdmin only).

Arguments

  • input!
Returns!
QUERY

adminMailingReport

#

A launched mailing in numbers (PlatformAdmin only).

Arguments

  • id!
Returns!
QUERY

adminMailings

#

Mailings, newest first, each with its progress once launched (PlatformAdmin only).

Arguments

  • input
Returns!
QUERY

adminMailingStreams

#

The sending streams that are set up (PlatformAdmin only).

Returns[!]!
QUERY

adminTenantEmails

#

The emails sent to a workspace, newest first, each with what its provider has reported since (PlatformAdmin only). audience: WORKSPACE is what BetterSuite sent the workspace itself, from its sign-up verification onwards. audience: USERS is what its people were sent — the sign-in codes and resets of its staff, and the mail the users of its apps received.

Arguments

  • input!
Returns!
QUERY

announcement

#

Get a single announcement by ID (admin only)

Arguments

  • id!
Returns
QUERY

announcements

#

Query active announcements targeted at the current account. The app is taken from the x-app request header.

Arguments

  • limitInt
Returns[!]!
QUERY

deliveryFailureSummary

#

How many of the workspace's texts, pushes and emails were attempted over the last days days, and how many failed, per gateway where the log knows it. Requires an admin of the workspace. days is held to between 1 and 90.

Arguments

  • daysInt!

    Default

    7
Returns!
QUERY

emailContent

#

What one logged email said, while it is kept (90 days from the send). A platform admin may read any email's; an admin of a workspace, those of the emails its own people were sent. Null for everything else: an email that does not exist, one whose content is not kept, and one the caller may not read all answer alike.

Arguments

  • id!
Returns
QUERY

emailProviderDefinitions

#

List all available email provider definitions for the tenant

Returns[!]!
QUERY

emailProviders

#

List all email providers for the tenant

Returns[!]!
QUERY

emailScenarioDefinitions

#

List the email scenario definitions configurable from the caller's panel. Platform admins get platform + shared scenarios; tenant owners/admins get tenant + shared scenarios. Each definition carries its default subject, description, and the variables the system provides. # Authorization Requires PlatformAdmin, TenantOwner, or TenantAdmin role.

Returns[!]!
QUERY

emailTemplates

#

List the email templates configurable from the caller's panel. Templates whose scenario is outside the caller's role (e.g. a platform billing scenario for a tenant admin) are filtered out so the list stays coherent with [super::EmailScenarioDefinitionQuery]. # Authorization Requires PlatformAdmin, TenantOwner, or TenantAdmin role.

Returns[!]!
QUERY

liveActivities

#

Query live activities for the current account

Arguments

  • app!
  • topics[String!]
Returns[!]!
QUERY

messageDeliveries

#

The texts or pushes sent on behalf of the caller's workspace, newest first, each with how its gateway answered. Narrowed by outcome and by when it was sent. Requires an admin of the workspace. A text is kept for 90 days and a push for 14. What a message said is never kept.

Arguments

  • input!
Returns!
QUERY

myNotificationPreferences

#

Get the current user's notification preferences. Returns preferences grouped by category, filtered for the caller's app and role. Merges tenant defaults with user overrides.

Returns!
QUERY

notifications

Deprecated#

Query durable notifications for the current account

Deprecation reason: Use notificationsPage(app, status, pagination); legacy list retires through BET-204

Arguments

  • app!
  • status
  • limitInt
  • offsetInt
Returns[!]!
QUERY

notificationsPage

#

Durable notifications with the same app, role and status visibility as the list.

Arguments

  • app!
  • status
  • pagination
Returns!
QUERY

pushProviders

Deprecated#

Deprecation reason: Use pushProvidersWithValues; BET-205

Arguments

  • ownership
Returns[!]!
QUERY

pushProvidersWithValues

#

List push providers for an owner scope (admin only). Defaults to the caller's tenant-owned providers; ownership: PLATFORM lists the shared platform providers and requires a platform admin.

Arguments

  • ownership
Returns[!]!
QUERY

smsProviderCatalog

#

Every SMS gateway, ranked for the given countries. Pass the tenant's operating countries (from myOperationFootprint) to get per-country prices, a coverage verdict, and a recommendation. Pass an empty list to get the bare catalog — credential schemas and integration status, with no pricing.

Arguments

  • countryCodes[String!]!

    ISO 3166-1 alpha-2 codes the gateway must serve, e.g. ["GB", "SA"].

    Default

    []
Returns[!]!
QUERY

smsProviderCoverage

#

Full SMS provider coverage matrix. Globally-available providers report an empty country_codes list with is_global = true.

Returns[!]!
QUERY

smsProviders

#

List all SMS providers for the tenant (admin only)

Arguments

  • input!

    Default

    {
      "search": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Returns!
QUERY

smsTemplates

#

List all SMS templates for the tenant

Returns[!]!
QUERY

unreadCount

#

Get unread count for an app

Arguments

  • app!
ReturnsInt!
QUERY

workspaceEmails

#

The emails the people of the caller's workspace were sent — its customers, drivers, merchants, providers, and its own staff signing in — newest first, each with what its provider has reported since. Narrowed by outcome and by when it was sent. Requires an admin of the workspace. The workspace is the session's. What BetterSuite sent the workspace itself is not in this list.

Arguments

  • input!
Returns!

Mutations

MUTATION

adminAddEmailSuppressions

#

Opt addresses out of every topic, at most 1,000 a call. An address already opted out is left as it is (PlatformAdmin only).

Arguments

  • input!
Returns!
MUTATION

adminArchiveMailingAudience

#

Take an audience out of the lists; mailings that use it keep it (PlatformAdmin only).

Arguments

  • id!
ReturnsBoolean!
MUTATION

adminCancelMailing

#

Stop a launched mailing for good; what was sent stays sent (PlatformAdmin only).

Arguments

  • id!
Returns!
MUTATION

adminCreateMailing

#

Start a draft on a stream (PlatformAdmin only).

Arguments

  • input!
Returns!
MUTATION

adminCreateMailingAudience

#

Save a new audience (PlatformAdmin only).

Arguments

  • input
  • details
Returns!
MUTATION

adminDeleteMailing

#

Delete a draft (PlatformAdmin only).

Arguments

  • id!
ReturnsBoolean!
MUTATION

adminImportMailingContacts

#

Add rows to an imported audience, at most 1,000 a call; a row whose address is already there refreshes it (PlatformAdmin only).

Arguments

  • input!
Returns!
MUTATION

adminLaunchMailing

#

Freeze a draft's recipients and start sending, at once or at startAt. Refused until every check of the launch checklist passes (PlatformAdmin only).

Arguments

  • id!
  • startAt
Returns!
MUTATION

adminLiftEmailSuppression

#

Lift an opt-out an admin or an import added. One the recipient made, or that a bounce or complaint wrote, stays (PlatformAdmin only).

Arguments

  • emailString!
ReturnsBoolean!
MUTATION

adminPauseMailing

#

Hold a launched mailing (PlatformAdmin only).

Arguments

  • id!
Returns!
MUTATION

adminResumeMailing

#

Release a paused mailing (PlatformAdmin only).

Arguments

  • id!
Returns!
MUTATION

adminResumeMailingStream

#

Let a halted stream send again (PlatformAdmin only).

Arguments

  • id!
Returns!
MUTATION

adminSaveMailingStream

#

Set up the stream of a kind, or change the one that is there (PlatformAdmin only).

Arguments

  • input!
Returns!
MUTATION

adminSendMailingTest

#

Send the mailing as it stands to one address, through its stream and with its unsubscribe header. It does not count in the mailing's numbers (PlatformAdmin only).

Arguments

  • id!
  • toEmailString!
ReturnsBoolean!
MUTATION

adminUpdateMailing

#

Edit a draft; a launched mailing's content is locked (PlatformAdmin only).

Arguments

  • id!
  • input!
Returns!
MUTATION

adminUpdateMailingAudience

#

Change an audience's name, filter or provenance. Its kind is fixed (PlatformAdmin only).

Arguments

  • id!
  • input
  • details
Returns!
MUTATION

createAnnouncement

#

Create an announcement (admin only)

Arguments

  • input!
Returns!
MUTATION

createEmailProvider

#

Create a new email provider configuration

Arguments

  • input!
Returns!
MUTATION

createEmailTemplate

#

Create a new email template. # Authorization Requires an admin-tier role *and* that the scenario belongs to the caller's panel (tenant admins cannot create platform templates, and vice versa).

Arguments

  • input!
Returns!
MUTATION

createSmsProvider

#

Create a new SMS provider (admin only)

Arguments

  • input
  • details
Returns!
MUTATION

createSmsTemplate

#

Create a new SMS template

Arguments

  • input!
Returns!
MUTATION

deleteAnnouncement

#

Delete an announcement (admin only)

Arguments

  • id!
ReturnsBoolean!
MUTATION

deleteEmailProvider

#

Delete an email provider

Arguments

  • idString!
ReturnsBoolean!
MUTATION

deleteEmailTemplate

#

Delete an email template. # Authorization Requires an admin-tier role; the template's scenario must belong to the caller's panel (enforced in the use case once the template is loaded).

Arguments

  • idString!
ReturnsBoolean!
MUTATION

deleteSmsProvider

#

Delete an SMS provider (admin only)

Arguments

  • idString!
ReturnsBoolean!
MUTATION

deleteSmsTemplate

#

Delete an SMS template

Arguments

  • idString!
ReturnsBoolean!
MUTATION

dismissNotification

#

Dismiss a notification

Arguments

  • input!
ReturnsBoolean!
MUTATION

markAllRead

#

Mark all notifications as read

Arguments

  • input!
ReturnsInt!
MUTATION

markNotificationRead

#

Mark a notification as read

Arguments

  • input!
ReturnsBoolean!
MUTATION

registerLiveActivityToken

Deprecated#

Deprecation reason: Use registerLiveActivityTokenResult; BET-205

Arguments

  • input!
Returns!
MUTATION

registerLiveActivityTokenResult

#

Register an iOS ActivityKit Live Activity push token for direct APNs delivery of content-state updates.

Arguments

  • input!
Returns!
MUTATION

registerPushToken

#

Register a push notification token for the authenticated device

Arguments

  • input!
Returns!
MUTATION

removePushToken

#

Remove the push token for the authenticated device (call on logout).

ReturnsBoolean!
MUTATION

sendTestEmail

#

Send a test email for the given scenario, using the caller's tenant's default email provider and its configured template. Always returns the rendered preview. When dryRun is true the email is rendered but not dispatched, so admins can verify placeholder substitution before committing to a real send. # Authorization Requires an admin-tier role *and* that the scenario belongs to the caller's panel — a tenant cannot test-send a platform scenario, and vice versa.

Arguments

  • input!
Returns!
MUTATION

setDefaultEmailProvider

#

Set an email provider as the default for the tenant

Arguments

  • idString!
ReturnsBoolean!
MUTATION

setDefaultSmsProvider

#

Set an SMS provider as the default (admin only)

Arguments

  • idString!
ReturnsBoolean!
MUTATION

testSmsProvider

Deprecated#

Deprecation reason: Use testSmsProviderResult; BET-205

Arguments

  • idString!
  • phoneNumberString!
Returns!
MUTATION

testSmsProviderResult

#

Test an SMS provider by sending a test message (admin only)

Arguments

  • idString!
  • phoneNumberString!
Returns!
MUTATION

updateAnnouncement

#

Update an announcement (admin only)

Arguments

  • input!
Returns!
MUTATION

updateEmailProvider

#

Update an existing email provider

Arguments

  • input!
Returns!
MUTATION

updateEmailTemplate

#

Update an existing email template. # Authorization Requires an admin-tier role; the template's scenario must belong to the caller's panel (enforced in the use case once the template is loaded).

Arguments

  • input!
Returns!
MUTATION

updateMyNotificationPreferences

#

Update the current user's notification preferences. Accepts a list of preference changes (subject + channel + enabled). Only marketing/optable subjects can be toggled — transactional and OTP subjects are rejected. Returns the full updated preferences after applying changes.

Arguments

  • input!
Returns!
MUTATION

updateSmsProvider

#

Update an existing SMS provider (admin only)

Arguments

  • input
  • details
Returns!
MUTATION

updateSmsTemplate

#

Update an existing SMS template

Arguments

  • input!
Returns!